ValueFunctionTeardropCurvedEnd Class Reference

Provides an interface by which the caller can obtain the value of a given function at a given "position". More...

#include <valfunc.h>

Inheritance diagram for ValueFunctionTeardropCurvedEnd:

ValueFunctionBlip ValueFunction ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

 ValueFunctionTeardropCurvedEnd (double MaxPosition=0.20)
virtual double GetValue (double Position)
 To read the value of this function at a given position.
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 ValueFunctionBlipCreateInstance (void)
 Creates a new blank object of the same type as this one. Internal function used in ValueFunctionTeardrop & ValueFunctionTeardropS.

Private Member Functions

 CC_DECLARE_DYNAMIC (ValueFunctionTeardropCurvedEnd)

Detailed Description

Provides an interface by which the caller can obtain the value of a given function at a given "position".

Author:
Priestley (Xara Group Ltd) <camelotdev@xara.com> from Jason
Date:
9/10/2000
This derived class returns a Teardrop shape with a curved trailing edge

Definition at line 737 of file valfunc.h.


Constructor & Destructor Documentation

ValueFunctionTeardropCurvedEnd::ValueFunctionTeardropCurvedEnd double  MaxPosition = 0.20  )  [inline]
 

Definition at line 742 of file valfunc.h.

00742 : ValueFunctionBlip(MaxPosition) {};


Member Function Documentation

ValueFunctionTeardropCurvedEnd::CC_DECLARE_DYNAMIC ValueFunctionTeardropCurvedEnd   )  [private]
 

ValueFunctionBlip * ValueFunctionTeardropCurvedEnd::CreateInstance void   )  [protected, virtual]
 

Creates a new blank object of the same type as this one. Internal function used in ValueFunctionTeardrop & ValueFunctionTeardropS.

Author:
Priestley (Xara Group Ltd) <camelotdev@xara.com> from Jason
Date:
9/10/2000
Returns:
NULL if it failed, else a pointer to new ValueFunctionTeardrop object of the same type as "this" one. Used to allow derived Teardrop classes to use all the base class code, and merely override the GetValue method.
Notes: Called by ValueFunctionBlip::Clone and CreateAndReadFileRecord, as this is the only action in those functions that depends on the type of the class that is being used

Reimplemented from ValueFunctionBlip.

Definition at line 2672 of file valfunc.cpp.

02673 {   
02674     return(new ValueFunctionTeardropCurvedEnd);
02675 }

INT32 ValueFunctionTeardropCurvedEnd::GetMinimumRecursionDepth  )  [virtual]
 

Overriden function to indicate to the path stroker how many recursions to perform at minimum before declaring a line segment 'flat' enough.

Author:
Priestley (Xara Group Ltd) <camelotdev@xara.com>
Date:
9/10/2000

Reimplemented from ValueFunction.

Definition at line 2646 of file valfunc.cpp.

02647 {
02648     return 2;
02649 }

virtual ValueFunctionID ValueFunctionTeardropCurvedEnd::GetUniqueID void   )  [inline, virtual]
 

Reimplemented from ValueFunctionBlip.

Definition at line 746 of file valfunc.h.

double ValueFunctionTeardropCurvedEnd::GetValue double  Position  )  [virtual]
 

To read the value of this function at a given position.

Author:
Priestley (Xara Group Ltd) <camelotdev@xara.com> from Jason
Date:
9/10/2000
Parameters:
Position - A value between 0.0 and 1.0 [INPUTS]
Returns:
A value representing the value of the function at the given Position.

Reimplemented from ValueFunctionBlip.

Definition at line 2602 of file valfunc.cpp.

02603 {
02604     double Value;
02605     if (Position < 0.2)
02606     {
02607         Position = 1.0 - Position/0.2;
02608         if ( Position>1.0 )
02609             Position = 1.0;
02610         Value = sqrt(1-Position*Position);
02611     }
02612     else
02613     {
02614         Position = (Position - 0.2) / 0.8;
02615         Value = sqrt(1.0 - Position);
02616     }
02617 
02618 /*      if (Position > 0.9)
02619         {
02620             Position = (Position - 0.9) / 0.1;
02621             Value = 0.4 * (cos(asin(Position)));
02622         }
02623         else
02624         {
02625             Position = (Position - 0.2) / 0.7;
02626             Value = ((1.0 - (Position * Position)) * 0.6) + 0.4;
02627         }
02628     }
02629 */
02630     return(Value);
02631 }


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 04:02:54 2007 for Camelot by  doxygen 1.4.4