FxSceneWindow2D::setCameraInterpolationMode("SIGMOID")
by Hans Sjunnesson · in Torque Game Builder · 09/02/2005 (1:36 am) · 3 replies
Just a quick FYI, there's a typo in the T2D docs. The docs state that there are two modes which you can insert into setCameraInterpolationMode, and those are "LINEAR" and "SIGMOID", but a quick look at fxSceneWindow2D.cc shows that...
the string you need to use is actually "SLERP", not "SIGMOID".
--
Hans
//-----------------------------------------------------------------------------
// Interpolation Mode Table.
//-----------------------------------------------------------------------------
static EnumTable::Enums interpolationModeLookup[] =
{
{ fxSceneWindow2D::LINEAR, "LINEAR" },
{ fxSceneWindow2D::SIGMOID, "SLERP" },
};
static EnumTable interpolationModeTable(2, &interpolationModeLookup[0]);
//-----------------------------------------------------------------------------
// Interpolation Mode Script-Enumerator.
//-----------------------------------------------------------------------------
static fxSceneWindow2D::eCameraInterpolationMode getInterpolationMode(const char* label)
{
// Search for Mnemonic.
for(U32 i = 0; i < (sizeof(interpolationModeLookup) / sizeof(interpolationModeLookup[0])); i++)
if( dStricmp(interpolationModeLookup[i].label, label) == 0)
return((fxSceneWindow2D::eCameraInterpolationMode)interpolationModeLookup[i].index);
// Invalid Interpolation Mode!
AssertFatal(false, "fxSceneWindow2D::getInterpolationMode() - Invalid Interpolation Mode!");
// Bah!
return fxSceneWindow2D::SIGMOID;
}the string you need to use is actually "SLERP", not "SIGMOID".
--
Hans
Associate Melv May
- Melv.