default dot tracking parameters

Post Reply
relieved_mouse
Posts: 18
Joined: Sun Apr 03, 2005 5:00 am
Location: Germany

default dot tracking parameters

Post by relieved_mouse »

I am using the VC8 sample code for making my own application for use with a Slim v100.

I want to be able to start the application with dot tracking parameters that are different to the default values. For example, for the OBJECT_MASS type dot tracking parameters I would like to be able to start the application with a MIN value of 500 instead of 3.

I can see that the default values are first called around line 282 in CameraOptionsDlg.cpp. But I can't work out how to set up my own values to initialise the application with, without losing the ability to adjust these values via the GUI.

If anyone could give me some advice on this I would be very grateful.
relieved_mouse
Posts: 18
Joined: Sun Apr 03, 2005 5:00 am
Location: Germany

Re: default dot tracking parameters

Post by relieved_mouse »

To clarify, I mean the C++ VC8 sample code.
Birch
Posts: 1139
Joined: Thu Jan 30, 2003 5:00 am
Location: Corvallis, Oregon

Re: default dot tracking parameters

Post by Birch »

If you initialize the tracking parameters in CCameraDlg's OnInitDialog() (or a function called by it), the Options dialog will automatically pick up those changed values when it is opened (and allow you to alter them).

CCameraDlg::OnInitDialog()
{
.
.
.
CComVariant newOptionVal;
newOptionVal.dblval = (double)500;
m_spCamera->SetOption(NP_OPTION_OBJECT_MASS_MIN, newOpitionVal);
relieved_mouse
Posts: 18
Joined: Sun Apr 03, 2005 5:00 am
Location: Germany

Re: default dot tracking parameters

Post by relieved_mouse »

Thanks for your advice, I finally got round to implementing it and it works great. Thanks!
Post Reply