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.

Classes

class  SoInterpolate
 Base class for all interpolator engines. More...
class  SoInterpolateFloat
 Interpolates floating-point values. More...
class  SoInterpolateRotation
 Interpolates rotation values. More...
class  SoInterpolateVec2f
 Interpolates 2D floating-point vectors. More...
class  SoInterpolateVec3f
 Interpolates 3D floating-point vectors. More...
class  SoInterpolateVec4f
 Interpolates 4D floating-point vectors. More...

Defines

#define SO_INTERPOLATE_HEADER(className)
#define SO_INTERPOLATE_SOURCE(className, type,valType, defaultVal0, defaultVal1, interpVal)
#define SO_INTERPOLATE_INITCLASS(className, classPrintName)
#define SO_INTERPOLATE_EXITCLASS(className)

Define Documentation

#define SO_INTERPOLATE_EXITCLASS ( className   ) 
Value:
#define SO_INTERPOLATE_HEADER ( className   ) 
Value:
\
    SO_ENGINE_HEADER(className);                                        \
                                                                        \
  private:                                                            \
    ~className();                                                       \
                                                                      \
    virtual void        evaluate();                                     \
                                                                        \
 private:\
    static void         initClass();                                    \
    static void         exitClass();                                    \
                                                                        \
  public:                                                               \
                                                      \
    className()
#define SO_INTERPOLATE_INITCLASS ( className,
classPrintName   ) 
Value:
\
void                                                                    \
className::initClass()                                                  \
{                                                                       \
    SO__ENGINE_INIT_CLASS(className, classPrintName, SoInterpolate);    \
}
#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


Open Inventor Toolkit reference manual, generated on 12 Feb 2024
Copyright © Thermo Fisher Scientific All rights reserved.
http://www.openinventor.com/