H3DNetworkingUtils::VecFilter Class Reference

The VecFilter class is a weighted averaging filter in the time domain. More...

#include <H3DNetworkingUtils/VecFilter.h>

List of all members.

Public Member Functions

 VecFilter (int sample_sz)
 Constructor = the sample_sz is the number of past samples to average over.
H3DUtil::ArithmeticTypes::Vec3f filter (H3DUtil::ArithmeticTypes::Vec3f const &raw_value, double time)
 Returns the filtered average of the values in raw_vals
The parameters to filter() are deque's to enable a sliding window of raw_values to be used, by popping a value off the start and adding one on to the end before each call.
virtual void resetValue (int sample_sz)
 Reset all historical values to start sampling a fresh, with a new sample size.
int sampleSize () const
 Returns the sample size.


Detailed Description

The VecFilter class is a weighted averaging filter in the time domain.

It takes a moving Vec3f, (represented by a number of Vec3f / time pairs), and filters it with a sin(t)/t function. The number of samples averaged is the number of samples in the array passed to filter.


Member Function Documentation

H3DUtil::ArithmeticTypes::Vec3f H3DNetworkingUtils::VecFilter::filter ( H3DUtil::ArithmeticTypes::Vec3f const &  raw_value,
double  time 
)

Returns the filtered average of the values in raw_vals
The parameters to filter() are deque's to enable a sliding window of raw_values to be used, by popping a value off the start and adding one on to the end before each call.

Referenced by H3DNetworkingUtils::FilteredSFVec3f::update().


The documentation for this class was generated from the following files:

Generated on Fri Mar 12 10:23:11 2010 for H3DNetworkingUtils by  doxygen 1.5.6