surface_law
List of: Classes
Subjects: Geometric Analysis, Laws, SAT Save and Restore
Contents: Laws

Purpose: Returns the position on a surface.

Derivation: surface_law : unary_data_law : law : ACIS_OBJECT : -

SAT Identifier: "SURF"

Filename: law/lawutil/main_law.hxx

Description: The parameterization of the surface_law is equal to the parameterization of the underlying ACISsurface.


Applications should call the virtual remove method instead of the tilde (~) destructor to get rid of a law. This decrements the use_count. This is called by the law destructors for the law being destructed, as well as for all of its sublaws. remove calls the destructor if use_count falls to zero. Used for memory management.

Constructor: public: surface_law::surface_law (


base_surface_law_data* // surface law



in_law_data // data that




// contains a




// surface


);


C++ constructor, creating a surface_law. The in_law_data is a surface_law_data structure that holds an ACIS surface data structure and a starting and ending parameter.



Methods: public: char const* surface_law::class_name ();


This method returns a string that contains the name of this class. It is provided as a user-friendly interface to laws.






protected: law* surface_law::deriv (


int which // variable to take



= 0 // derivative with




// respect to default




// value (X or A1)


) const;


This method returns a law pointer that is the derivative of the given law with respect to the which variable. Variables in C++ are numbered starting at zero (0). The default is to take a derivative with respect to the first variable, which in a law function string is A1 or X. The variables X, Y, and Z are equivalent to the indices 0, 1, and 2, respectively.


The deriv method implements the code to perform the actual derivative calculation and caches its value in memory. All classes derived from law (or its children) must implement their own deriv method.


The deriv method should not be called directly by applications. Applications should call the derivative method instead, which is inherited by all classes derived from law. The derivative method accesses the cached derivative value in memory, if one exists; otherwise it calls the deriv method.






public: void surface_law::evaluate (


double const* x, // values used in




// evaluation


double* answer // multi-dimension answer




// range for evaluation


) const;


This method takes two pointers to memory that the caller is responsible for creating and freezing. The x argument tells where to evaluate the law. This can be more than one dimension. The answer argument returns the evaluation. This can be more than one dimension. x should be the size returned by the take_dim method, and answer should be the size returned by the return_dim method. All derived law classes must have this method or inherit it.






public: static int surface_law::id ();


This method should not be called directly by the application. All derived law classes must have this method. The isa, id, and and type methods are used to identify a law's class type.






public: logical surface_law::isa (


int t // id method return


) const;


All derived law classes must have this method. The isa, id, and and type methods are used to identify a law's class type. The methods should be the same for all law classes with the exception of the isa method that calls the isa method of its parent class. To test to see if a law is a given type, use test_law->isa(constant_law::id()). If test_law is a constant_law or is derived from the constant_law class, this returns TRUE.






public: unary_data_law* surface_law::make_one (


law_data* in_data // pointer to law data


) const;


Returns a pointer to a law of this type. Used by parsing to create an instance of this law.






public: int surface_law::return_size () const;


Returns the dimension of the range (output) of the law. The default for a surface is 3. All derived law classes must have this method or inherit it.






protected: law* surface_law::sub_inverse () const;


Returns a pointer to the sublaws that are used to make up the inverse law of this class.






public: char const* surface_law::symbol (


law_symbol_type type // type of law symbol



= DEFAULT


) const;


Returns the string that represents this law class's symbol. The symbol is used for parsing the law and for saving and restoring law-based geometry. For a law to be saved and restored, it must have or inherit this method.


The default law symbol for this class is SURF.






public: int surface_law::take_size () const;


Returns the dimension of the law's domain (input). The default is 1. All derived law classes must have this method or inherit it.






public: logical surface_law::term_domain (


int term, // term to bound


SPAinterval& domain // bounds for term


) const;


Establishes the domain of a given term in the law.






public: int surface_law::type () const;


All derived law classes must have this method. The isa, id, and and type methods are used to identify a law's class type. The methods should be the same for all law classes.




Related Fncs: initialize_law, terminate_law
PDF/LAW/07CLS.PDF
HTM/DATA/LAW/LAW/07CLS/0003.HTM