#include <valfunc.h>
Inheritance diagram for ValueFunctionRampL2:
Public Member Functions | |
ValueFunctionRampL2 (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 (ValueFunctionRampL2) |
Definition at line 472 of file valfunc.h.
|
Definition at line 477 of file valfunc.h. 00478 : ValueFunctionRamp(StartValue, EndValue) 00479 {};
|
|
|
|
Clone operator. Creates an exact copy of this object.
Implements ValueFunction. Definition at line 1526 of file valfunc.cpp. 01527 { 01528 ValueFunction *pClone = new ValueFunctionRampL2(Value1, Value2); 01529 return(pClone); 01530 }
|
|
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 1561 of file valfunc.cpp. 01562 { 01563 ERROR3IF(pInputRecord == NULL, "Illegal NULL param"); 01564 01565 float Value1 = (float) 1.0; 01566 float Value2 = (float) 0.2; 01567 01568 pInputRecord->ReadFLOAT(&Value1); 01569 pInputRecord->ReadFLOAT(&Value2); 01570 01571 return(new ValueFunctionRampL2((double) Value1, (double) Value2)); 01572 }
|
|
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 1507 of file valfunc.cpp.
|
|
Implements ValueFunction. Definition at line 485 of file valfunc.h. 00485 { return(ValueFunctionID_RampL2); };
|
|
To read the value of this function at a given position.
Implements ValueFunction. Definition at line 1487 of file valfunc.cpp. 01488 { 01489 const double MixValue = cos((Pi/2.0) + (Position * Pi/2.0)) + 1.0; 01490 01491 return((MixValue * Value1) + ((1.0 - MixValue) * Value2)); 01492 }
|