ValueFunctionEllipse 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 ValueFunctionEllipse:

ValueFunctionBlip ValueFunction ListItem CCObject SimpleCCObject List of all members.

Public Member Functions

virtual double GetValue (double Position)
 To read the value of this function at a given position.
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 ValueFunctionEllipse & ValueFunctionEllipseS.

Private Member Functions

 CC_DECLARE_DYNAMIC (ValueFunctionEllipse)

Detailed Description

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

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
30/12/96
This derived class returns an elliptical arc: ___ / \ | |

Definition at line 771 of file valfunc.h.


Member Function Documentation

ValueFunctionEllipse::CC_DECLARE_DYNAMIC ValueFunctionEllipse   )  [private]
 

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

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

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/2/97
Returns:
NULL if it failed, else a pointer to new ValueFunctionEllipse object of the same type as "this" one. Used to allow derived Ellipse 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 2731 of file valfunc.cpp.

02732 {   
02733     return(new ValueFunctionEllipse);
02734 }

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

Reimplemented from ValueFunctionBlip.

Definition at line 778 of file valfunc.h.

00778 { return(ValueFunctionID_Ellipse); };

double ValueFunctionEllipse::GetValue double  Position  )  [virtual]
 

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

Author:
Jason_Williams (Xara Group Ltd) <camelotdev@xara.com>
Date:
1/2/97
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 2698 of file valfunc.cpp.

02699 {
02700     if (Position < MaxPos)
02701         Position = 1.0 - Position/MaxPos;
02702     else
02703         Position = (Position - MaxPos) / (1.0 - MaxPos);
02704     if ( Position>1.0 )
02705         Position = 1.0;
02706     return sqrt(1-Position*Position);
02707 }


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