Inventor/engines/SoInterpolate.h File Reference
#include <Inventor/SoDB.h>
#include <Inventor/engines/SoSubEngine.h>
#include <Inventor/fields/SoSFFloat.h>
#include <Inventor/fields/SoMFFloat.h>
#include <Inventor/fields/SoMFRotation.h>
#include <Inventor/fields/SoMFVec2f.h>
#include <Inventor/fields/SoMFVec2i32.h>
#include <Inventor/fields/SoMFVec2s.h>
#include <Inventor/fields/SoMFVec3f.h>
#include <Inventor/fields/SoMFVec4f.h>
Go to the source code of this file.
Define Documentation
#define SO_INTERPOLATE_EXITCLASS |
( |
className |
|
) |
|
#define SO_INTERPOLATE_INITCLASS |
( |
className, |
|
|
classPrintName |
|
) |
|
#define SO_INTERPOLATE_SOURCE |
( |
className, |
|
|
type, |
|
|
valType, |
|
|
defaultVal0, |
|
|
defaultVal1, |
|
|
interpVal |
|
) |
|
Value:\
SO_ENGINE_SOURCE(className) \
\
className::className() \
{ \
SO_ENGINE_CONSTRUCTOR(className); \
SO_ENGINE_ADD_INPUT(alpha, (0.0)); \
SO_ENGINE_ADD_INPUT(input0, defaultVal0); \
SO_ENGINE_ADD_INPUT(input1, defaultVal1); \
SO_ENGINE_ADD_OUTPUT(output, type); \
isBuiltIn = TRUE; \
} \
\
className::~className() \
{ \
} \
\
void \
className::evaluate() \
{ \
int n0 = input0.getNum(); \
int n1 = input1.getNum(); \
float a = alpha.getValue(); \
for (int i=findMax(n0,n1)-1; i>=0; i--) { \
valType v0 = input0[clamp(i,n0)]; \
valType v1 = input1[clamp(i,n1)]; \
SO_ENGINE_OUTPUT(output, type, set1Value(i, interpVal)); \
} \
}
\ User-written evaluation engine.
\ Constructor