CONE
List of: Classes
Subjects: Model Geometry, SAT Save and Restore
Contents: Kernel

Purpose: Defines a cone as an object in the model.

Derivation: CONE : SURFACE : ENTITY : ACIS_OBJECT : -

SAT Identifier: "cone"

Filename: kern/kernel/kerndata/geom/cone.hxx

Description: CONE is a model geometry class that contains a pointer to a (lowercase) cone, the corresponding construction geometry class. In general, a model geometry class is derived from ENTITY and is used to define a permanent model object. It provides model management functionality, in addition to the geometry definition.


CONE is one of several classes derived from SURFACE to define a specific type of surface. The cone class defines a cone by the base ellipse and the sine and cosine of the major half-angle.


Along with the usual SURFACE and ENTITY class methods, CONE has member methods to provide access to specific implementations of the geometry. For example, methods are available to set and retrieve the axes, center, and other information about a cone.


A use count allows multiple references to a CONE. The construction of a new CONE initializes the use count to 0. Methods are provided to increment and decrement the use count, and after the use count returns to 0, the entity is deleted.

References: KERN cone

Constructor: public: CONE::CONE ();


C++ allocation constructor requests memory for this object but does not populate it. The allocation constructor is used primarily by restore. Applications should call this constructor only with the overloaded new operator, because this reserves the memory on the heap, a requirement to support roll back and history management.






public: CONE::CONE (


cone const& // cone object


);


C++ copy constructor requests memory for this object and populates it with the data from the object supplied as an argument. Applications should call this constructor only with the overloaded new operator, because this reserves the memory on the heap, a requirement to support roll back and history management.






public: CONE::CONE (


SPAposition const&, // center point


SPAunit_vector const&, // cone axis


SPAvector const&, // major axis


double // major:minor ratio



= 1,


double // half angle sine



= 0,


double // half angle cosine



= 1


);


C++ initialize constructor requests memory for this object and populates it with the data supplied as arguments. Applications should call this constructor only with the overloaded new operator, because this reserves the memory on the heap, a requirement to support roll back and history management.


Makes a CONE from the center point, a SPAunit_vector defining the cone-axis, a SPAvector defining the major-axis (including length), the ratio of the minor to major-axis, the sine of the cone half angle, and the cosine of the half angle:




Destructor: public: virtual void CONE::lose ();


Posts a delete bulletin to the bulletin board indicating the instance is no longer used in the active model. The lose methods for attached attributes are also called.






protected: virtual CONE::~CONE ();


This C++ destructor should never be called directly. Instead, applications should use the overloaded lose method inherited from the ENTITY class, because this supports history management. (For example, x=new CONE(...) then later x->lose.)



Methods: protected: virtual logical


CONE::bulletin_no_change_vf (


ENTITY const* other,
// other entity


logical identical_comparator // comparator


) const;


A virtual compare function for api_get_modified_faces.






public: double CONE::cosine_angle () const;


Returns the cosine of the half-angle defining the CONE.






public: virtual void CONE::debug_ent (


FILE* // file pointer


) const;


Prints the type and address of this object, roll back pointer, attributes, and any unknown subtype information to the specified file. Refer to the ENTITY class for more details.






public: SPAunit_vector const& CONE::direction () const;


Returns the normal to the plane of the ellipse defining the CONE; i.e., the cone-axis.






public: surface const& CONE::equation () const;


Returns the surface equation of the CONE.






public: surface& CONE::equation_for_update ();


Returns a pointer to surface equation for update operations. Before performing a change it checks whether the data structure is posted on the bulletin board. If not, the routine calls backup to put an entry on the bulletin board.






public: virtual int CONE::identity (


int
// level



= 0


) const;


If level is unspecified or 0, returns the type identifier CONE_TYPE. If level is specified, returns CONE_TYPE for that level of derivation from ENTITY. The level of this class is defined as CONE_LEVEL.






public: virtual logical CONE::is_deepcopyable (


) const;


Returns TRUE if this can be deep copied.






public: SPAvector const& CONE::major_axis () const;


Returns the major-axis of the ellipse defining the CONE.






public: void CONE::operator*= (


SPAtransf const& // transform


);


Transforms a CONE. Before performing a change it checks whether the data structure is posted on the bulletin board. If not, the routine calls backup to put an entry on the bulletin board.






public: double CONE::radius_ratio () const;


Returns the ratio of the minor-axis length to the major-axis length of the ellipse defining the CONE.






public: void CONE::restore_common ();


The RESTORE_DEF macro expands to the restore_common method, which is used in reading information from a SAT file. This method is never called directly. It is called by a higher hierarchical function if an item in the SAT file is determined to be of this class type. An instance of this class will already have been created through the allocation constructor. This method then populates the class instance with the appropriate data from the SAT file.


cone::restore_data
Cone data definition.






public: SPAposition const& CONE::root_point () const;


Returns the center of the ellipse defining the CONE.






public: void CONE::set_cosine_angle (


double // cosine angle


);


Sets the CONE's cosine angle to the given angle. Before performing a change it checks whether the data structure is posted on the bulletin board. If not, the routine calls backup to put an entry on the bulletin board.






public: void CONE::set_direction (


SPAunit_vector const& // direction


);


Sets the CONE's direction to the given SPAunit_vector. Before performing a change it checks whether the data structure is posted on the bulletin board. If not, the routine calls backup to put an entry on the bulletin board.






public: void CONE::set_major_axis (


SPAvector const& // major axis


);


Sets the CONE's major axis to the given SPAvector. Before performing a change it checks whether the data structure is posted on the bulletin board. If not, the routine calls backup to put an entry on the bulletin board.






public: void CONE::set_radius_ratio (


double // major:minor rad. ratio


);


Sets the CONE's major to minor radius ratio to the given value. Before performing a change it checks whether the data structure is posted on the bulletin board. If not, the routine calls backup to put an entry on the bulletin board.






public: void CONE::set_root_point (


SPAposition const& // root point


);


Sets the CONE's root point to the given SPAposition. Before performing a change it checks whether the data structure is posted on the bulletin board. If not, the routine calls backup to put an entry on the bulletin board.






public: void CONE::set_sine_angle (


double // sine angle


);


Sets the CONE's sine angle to the given angle. Before performing a change it checks whether the data structure is posted on the bulletin board. If not, the routine calls backup to put an entry on the bulletin board.






public: double CONE::sine_angle () const;


Returns the sine of the half-angle defining the CONE.






public: surface* CONE::trans_surface (


SPAtransf const&
// transform



= * (SPAtransf* ) NULL_REF,


logical
// reversed



= FALSE


) const;


Returns the transformed surface equation of the CONE. If the logical is TRUE, the surface is reversed.






public: virtual const char* CONE::type_name () const;


Returns the string "cone".

Internal Use: full_size




Related Fncs: is_CONE
PDF/KERN/29CLC.PDF
HTM/DATA/KERN/KERN/29CLC/0003.HTM