VectorProcessingSettings

Post Reply
dtudin01
Posts: 2
Joined: Wed Aug 08, 2012 12:06 pm

VectorProcessingSettings

Post by dtudin01 »

Hello,

I've just started using the Camera SDK, and I've got a few questions about some of the classes/functions I'm seeing.

I'm using a TrackIR 5 camera with this SDK, and following the included VectorTracking sample.

Rather than draw anything as in the example, I'm trying to get the orientation of the user, so after the

Code: Select all

vec->Calculate();
vecprocessor->PushData(vec);
part, I'm calling

Code: Select all

vecprocessor->GetOrientation(&yaw, &pitch, &roll);
which seems to be working for me.

I'm curious, though. In the ModuleVectorProcessing class there's a smooth function. I'm not sure what values that function smooths out. Can you please explain to me how to use that function?

Also - in the VectorProcessingSettings class, there are a bunch of variables for smoothing/scaling, etc. Can I just set those before resetting the settings to the ModuleVectorProcessing instance? What are the units used for the SmoothingX, SmoothingY and SmoothingZ parameters?

Thanks,
david
beckdo
Posts: 520
Joined: Tue Jan 02, 2007 2:02 pm

Re: VectorProcessingSettings

Post by beckdo »

Hi David,

The ModuleVectorProcessing class unfortunately does not provide any smoothing. However as you can see in the class definition there is a hook to add your own smoothing via the overridable virtual Smooth function. If you look closely in the header you can see { }, which means the current defined virtual function doesn't do anything.

If you derive from the class, your own 'MyModuleVectorProcessing' and overload that function, then you can provide anything to smooth out the raw values passed by reference so you can smooth them yourself.

The smoothing variables in the settings structure are also not used.
dtudin01
Posts: 2
Joined: Wed Aug 08, 2012 12:06 pm

Re: VectorProcessingSettings

Post by dtudin01 »

Hi Doug,

How do I use that function? Is that something I would still need to call myself, or does it called automatically by the VectorProcessing class?

When I call GetOrientation and GetPosition, will those be the smoothed results?

Thanks,
david
Post Reply