pcurve_law_data
List of: Classes
Subjects: Construction Geometry, Laws, SAT Save and Restore, Spline Interface
Contents: Kernel

Purpose: Creates a wrapper for pcurve classes for passing as arguments to laws.

Derivation: pcurve_law_data : base_pcurve_law_data : path_law_data : law_data : ACIS_OBJECT : -

SAT Identifier: PCURVE

Filename: kern/kernel/kernutil/law/law.hxx

Description: This is a wrapper to handle specific ACISpcurve classes. These wrapper classes are used by api_str_to_law. These are returned by the law method string_and_data.

References: KERN pcurve

BASE SPAposition, SPAvector

Data: protected double *tvalue;

Holds the parameter values.


protected int *which_cached;

Holds the time tags.


protected int derivative_level;

Holds how many derivatives are cached.


protected int point_level;

Size of tvalue.


protected pcurve *acis_pcurve;

The actual ACISpcurve.


protected SPAposition *cached_f;

Holds the positions.


protected SPAvector *cached_ddf;

Holds the second derivatives at the position.


protected SPAvector *cached_df;

Holds the first derivatives at the position.

Constructor: public: pcurve_law_data::pcurve_law_data (


pcurve const& in_acis_pcurve, // pointer to






// ACIS pcurve


double in_start

// starting



= 0,

// parameter


double in_end

// ending



= 0

// parameter


);


C++ initialize constructor requests memory for an instance of pcurve_law_data and populates it with the data supplied as arguments. This sets the use_count to 1 and increments the how_many_laws. It sets dlaw, slaw, and lawdomain to NULL.




Destructor: public: pcurve_law_data::~pcurve_law_data ();


C++ destructor, deleting a pcurve_law_data.



Methods: public: double pcurve_law_data::curvature (


double para // parameter for calc


);


This calculates the curvature at the given parameter value on the pcurve.






public: virtual law_data*


pcurve_law_data::deep_copy (


base_pointer_map* pm // list of items within



= NULL // the entity that are




// already deep copied


) const;


Creates a copy of an item that does not share any data with the original. Allocates new storage for all member data and any pointers. Returns a pointer to the copied item.






public: SPAvector pcurve_law_data::eval (


double para, // parameter for eval


int deriv, // which derivative


int side // which side



= 0 //


);


Evaluates the pcurve at the given input parameter value and takes the respective derivative.






public: pcurve* pcurve_law_data::pcurve_data ();


Returns a pointer to the actual ACISpcurve.






public: virtual void pcurve_law_data::save ();


Saves the law to the SAT file.






public: void pcurve_law_data::set_levels (


int in_point_level // input point level



= 4,


int in_derivative_level // number of derivatives



= 2


);


Changes the number of points and derivative levels to cache.






public: int pcurve_law_data::singularities (


double** where, // where singularity is


int** type, // type of singularity


double start, // start value


double end // end value


);


This specifies where in the given law there might be singularities.






public: char const* pcurve_law_data::symbol (


law_symbol_type type // type of law


);


This method is a pure virtual method for all classes derived from this one. The definition of this virtual method forces derived classes to have this method defined. This method is called from the derived class and not from this abstract class.




Related Fncs: restore_law, restore_law_data, save_law
PDF/KERN/34CLP.PDF
HTM/DATA/KERN/KERN/34CLP/0006.HTM