#include <valfunc.h>
Inheritance diagram for ValueFunctionSawTooth:
Public Member Functions | |
ValueFunctionSawTooth (double StartValue=1.0, double EndValue=0.0) | |
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 ValueFunctionID | GetUniqueID (void) |
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. | |
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 (ValueFunctionSawTooth) |
Definition at line 496 of file valfunc.h.
|
Definition at line 501 of file valfunc.h. 00502 : ValueFunctionRamp(StartValue, EndValue) 00503 {};
|
|
|
|
Clone operator. Creates an exact copy of this object.
Implements ValueFunction. Definition at line 1621 of file valfunc.cpp. 01622 { 01623 ValueFunction *pClone = new ValueFunctionSawTooth(Value1, Value2); 01624 return(pClone); 01625 }
|
|
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 1675 of file valfunc.cpp. 01676 { 01677 ERROR3IF(pInputRecord == NULL, "Illegal NULL param"); 01678 01679 float Value1 = (float) 1.0; 01680 float Value2 = (float) 0.0; 01681 01682 pInputRecord->ReadFLOAT(&Value1); 01683 pInputRecord->ReadFLOAT(&Value2); 01684 01685 return(new ValueFunctionSawTooth((double) Value1, (double) Value2)); 01686 }
|
|
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 1641 of file valfunc.cpp.
|
|
Implements ValueFunction. Definition at line 508 of file valfunc.h. 00508 { return(ValueFunctionID_SawTooth); };
|
|
To read the value of this function at a given position.
Implements ValueFunction. Definition at line 1593 of file valfunc.cpp. 01594 { 01595 if (Position == 1.0) 01596 { 01597 return 0.0; 01598 } 01599 else 01600 { 01601 double Value = (9.0 * Position) - (floor(9.0 * Position)); 01602 return(1.0 - (Value * Value)); 01603 } 01604 }
|