HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
GA_ForwardDifference< T > Class Template Reference

Polynomial forward differencer. More...

#include <GA_ForwardDifference.h>

Public Member Functions

 GA_ForwardDifference (const GA_ROGenericHandleVertex< T > &gah)
 Perform forward differencing. More...
 
 GA_ForwardDifference (const GA_ROGenericHandleVertex< T > &gah, int uord, fpreal uinc, int vord=1, fpreal vinc=1)
 
 ~GA_ForwardDifference ()
 
void initialize (const GA_ROGenericHandleVertex< T > &gah, int uord, fpreal uinc, int vord=1, fpreal vinc=1)
 
void walk (const GA_ROGenericHandleVertex< T > &gah, int ucount, int uoff, T *results)
 
void walk (const GA_ROGenericHandleVertex< T > &gah, int ucount, int vcount, int uoff, int voff, int ncols, T *results)
 
int getUOrder () const
 
fpreal getUStep () const
 Return the initialized U integration step size. More...
 
int getVOrder () const
 Return the initialized V order. More...
 
fpreal getVStep () const
 Return the initialized V integration step size. More...
 
TgetDerivative (int u, int v=0)
 Return the offset for the derivative. More...
 

Detailed Description

template<typename T>
class GA_ForwardDifference< T >

Polynomial forward differencer.

This class performs forward differencing of polynomial functions by forward differencing. To use this class, you need to specify

  • The order of the polynomial
  • The N derivatives of the polynomial (one for each degree) The forward differencer can then evaluate the polynomial very efficiently.

Definition at line 34 of file GA_ForwardDifference.h.

Constructor & Destructor Documentation

Perform forward differencing.

template<typename T >
GA_ForwardDifference< T >::GA_ForwardDifference ( const GA_ROGenericHandleVertex< T > &  gah,
int  uord,
fpreal  uinc,
int  vord = 1,
fpreal  vinc = 1 
)
template<typename T >
GA_ForwardDifference< T >::~GA_ForwardDifference ( )

Member Function Documentation

template<typename T >
T& GA_ForwardDifference< T >::getDerivative ( int  u,
int  v = 0 
)
inline

Return the offset for the derivative.

Definition at line 63 of file GA_ForwardDifference.h.

template<typename T >
int GA_ForwardDifference< T >::getUOrder ( ) const
inline

Return the initialized U order

Definition at line 53 of file GA_ForwardDifference.h.

template<typename T >
fpreal GA_ForwardDifference< T >::getUStep ( ) const
inline

Return the initialized U integration step size.

Definition at line 55 of file GA_ForwardDifference.h.

template<typename T >
int GA_ForwardDifference< T >::getVOrder ( ) const
inline

Return the initialized V order.

Definition at line 58 of file GA_ForwardDifference.h.

template<typename T >
fpreal GA_ForwardDifference< T >::getVStep ( ) const
inline

Return the initialized V integration step size.

Definition at line 60 of file GA_ForwardDifference.h.

template<typename T >
void GA_ForwardDifference< T >::initialize ( const GA_ROGenericHandleVertex< T > &  gah,
int  uord,
fpreal  uinc,
int  vord = 1,
fpreal  vinc = 1 
)

Initialize the forward differencer with

Parameters
uordOrder of the spline in U
uincStepping increment for integration in U
vordOrder of the spline in V. For 1D curves, this is ignored.
vincStepping increment for integration in V
template<typename T >
void GA_ForwardDifference< T >::walk ( const GA_ROGenericHandleVertex< T > &  gah,
int  ucount,
int  uoff,
T results 
)

1D forward difference a hull into a curve

Parameters
gahis the set of attributes to evaluate.
ucountis the number of vertices to fill
uoffOffset into the results. That is, the results will be stored in
results[uoff]-results[uoff+ucount-1]
derivNth Derivatives. When the hull and the results exist in different details, the derivatives are represented by the RHS in the gah (source mapping).
resultsList of vertex offsets where the result should be stored. When the hull and results are in different details, the results are the LHS of the gah (destination mapping).
template<typename T >
void GA_ForwardDifference< T >::walk ( const GA_ROGenericHandleVertex< T > &  gah,
int  ucount,
int  vcount,
int  uoff,
int  voff,
int  ncols,
T results 
)

2D forward difference a hull into a mesh

Parameters
gahis the set of attributes to evaluate.
ucountis the number of vertices to fill in U (columns)
vcountis the number of vertices to fill in V (rows)
uoffOffset into the results (stride).
voffOffset into the results (stride).
ncolsNumber of columns in the full matrix of result vertices. This is used to stride into the offsets/rows.
derivNth Derivatives. When the hull and the results exist in different details, the derivatives are represented by the RHS in the gah (source mapping).
resultsList of vertex offsets where the result should be stored. When the hull and results are in different details, the results are the LHS of the gah (destination mapping).

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