#include <valfunc.h>
Inheritance diagram for ValueFunctionRampS2:
Public Member Functions | |
ValueFunctionRampS2 (double StartValue=1.0, double EndValue=0.2) | |
virtual double | GetValue (double Position) |
To read the value of this function at a given position. | |
virtual ValueFunction * | Clone (void) |
Clone operator. Creates an exact copy of this object. | |
virtual INT32 | GetMinimumRecursionDepth () |
Overriden function to indicate to the path stroker how many recursions to perform at minimum before declaring a line segment 'flat' enough. | |
virtual ValueFunctionID | GetUniqueID (void) |
Protected Member Functions | |
virtual ValueFunction * | CreateAndReadFileRecord (CXaraFileRecord *pInputRecord) |
Loads a ValueFunction object from a record which was saved into a file using the WriteFileRecord call. This is called by the base class loader routine ReadFileRecord, which finds an appropriate instance of a derived class to call to load the data in question. | |
Private Member Functions | |
CC_DECLARE_DYNAMIC (ValueFunctionRampS2) |
Definition at line 428 of file valfunc.h.
|
Definition at line 433 of file valfunc.h. 00434 : ValueFunctionRamp(StartValue, EndValue) 00435 {};
|
|
|
|
Clone operator. Creates an exact copy of this object.
Implements ValueFunction. Definition at line 1296 of file valfunc.cpp. 01297 { 01298 ValueFunction *pClone = new ValueFunctionRampS2(Value1, Value2); 01299 return(pClone); 01300 }
|
|
Loads a ValueFunction object from a record which was saved into a file using the WriteFileRecord call. This is called by the base class loader routine ReadFileRecord, which finds an appropriate instance of a derived class to call to load the data in question.
Implements ValueFunction. Definition at line 1331 of file valfunc.cpp. 01332 { 01333 ERROR3IF(pInputRecord == NULL, "Illegal NULL param"); 01334 01335 float Value1 = (float) 1.0; 01336 float Value2 = (float) 0.2; 01337 01338 pInputRecord->ReadFLOAT(&Value1); 01339 pInputRecord->ReadFLOAT(&Value2); 01340 01341 return(new ValueFunctionRampS2((double) Value1, (double) Value2)); 01342 }
|
|
Overriden function to indicate to the path stroker how many recursions to perform at minimum before declaring a line segment 'flat' enough.
Reimplemented from ValueFunction. Definition at line 1356 of file valfunc.cpp.
|
|
Implements ValueFunction. Definition at line 441 of file valfunc.h. 00441 { return(ValueFunctionID_RampS2); };
|
|
To read the value of this function at a given position.
Implements ValueFunction. Definition at line 1274 of file valfunc.cpp. 01275 { 01276 const double MixValue = (cos(Position * Pi) + 1.0) / 2.0; 01277 01278 return((MixValue * Value1) + ((1.0 - MixValue) * Value2)); 01279 }
|