Purpose:
|
Defines the creation of a working coordinate system.
|
|
Derivation:
|
WCS : ENTITY : ACIS_OBJECT : -
|
|
SAT Identifier:
|
"wcs"
|
|
Filename:
|
kern/kernel/geomhusk/wcs.hxx
|
|
Description:
|
The
WCS class defines the creation of a working coordinate system. A working coordinate system (WCS) is a local coordinate system that simplifies entering position or vector information while creating models.
|
|
|
Multiple working coordinate systems can be created; however, only one can be active at a time. Some of the curve and solid creation API routines use the active
WCS to determine the orientation of the object being created. The
xy-plane of the active
WCS defines the plane of planar curves such as arcs. API routines create a
WCS, make a
WCS active, and query the active
WCS.
|
|
|
Deriving a
WCS from an
ENTITY provides a way for saving, restoring, and rolling. It defines a transformation that maps input into the coordinate system of the model. For example, when mapping both from and to model space, both transformations are kept to avoid recomputing the inverse.
|
|
References:
|
BASE
|
SPAtransf
|
|
Constructor:
|
public: WCS::WCS
();
|
|
|
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: WCS::WCS
(
|
|
|
SPAtransf const& to_model_space
|
// transformation
|
|
|
);
|
|
|
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.
|
|
|
Creates a
WCS from a transformation. The
SPAtransf defines the transformation that maps from the
WCS to model space.
|
|
|
|
|
Destructor:
|
public: virtual void WCS::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 WCS::~WCS
();
|
|
|
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 WCS(...) then later
x->lose.)
|
|
|
|
Methods:
|
public: virtual void WCS::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: virtual int WCS::identity
(
|
|
|
int
|
|
// level
|
|
|
|
= 0
|
|
|
) const;
|
|
|
If
level is unspecified or 0, returns the type identifier
WCS_TYPE. If
level is specified, returns
WCS_TYPE for that level of derivation from
ENTITY. The level of this class is defined as
WCS_LEVEL.
|
|
|
|
|
|
|
public: virtual logical
|
|
|
WCS::is_deepcopyable () const;
|
|
|
Returns
TRUE if this can be deep copied.
|
|
|
|
|
|
|
public: void WCS::operator*=
(
|
|
|
const SPAtransf&
|
// transformation
|
|
|
);
|
|
|
Applies a transformation to the WCS.
|
|
|
|
|
|
|
public: SPAposition WCS::origin
() const;
|
|
|
Gets the origin of the axes in model space.
|
|
|
|
|
|
|
public: void WCS::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.
|
|
|
read_transf
|
|
|
|
Transform to get to model space.
|
|
|
|
|
|
|
public: void WCS::set_to_model
(
|
|
|
SPAtransf const&
|
// transformation
|
|
|
);
|
|
|
Sets the transformation that maps from this WCS to model space.
|
|
|
|
|
|
|
public: SPAposition WCS::to_model
(
|
|
|
const SPAposition&
|
// position
|
|
|
) const;
|
|
|
Maps a position from this WCS to model space.
|
|
|
|
|
|
|
public: SPAtransf const& WCS::to_model
() const;
|
|
|
Gets a transformation that maps from this
WCS to model space.
|
|
|
|
|
|
|
public: SPAunit_vector WCS::to_model
(
|
|
|
const SPAunit_vector&
|
// unit vector
|
|
|
) const;
|
|
|
Maps a
SPAunit_vector from this WCS to model space.
|
|
|
|
|
|
|
public: SPAvector WCS::to_model
(
|
|
|
const SPAvector&
|
// vector
|
|
|
) const;
|
|
|
Maps a vector from this WCS to model space.
|
|
|
|
|
|
|
public: SPAposition WCS::to_wcs
(
|
|
|
const SPAposition&
|
// position
|
|
|
) const;
|
|
|
Maps a position from model space to this WCS.
|
|
|
|
|
|
|
public: SPAtransf const& WCS::to_wcs
() const;
|
|
|
Gets a transformation that maps from model space to this WCS.
|
|
|
|
|
|
|
public: SPAunit_vector WCS::to_wcs
(
|
|
|
const SPAunit_vector&
|
// unit vector
|
|
|
) const;
|
|
|
Maps a
SPAunit_vector from model space to this WCS:
|
|
|
|
|
|
|
public: SPAvector WCS::to_wcs
(
|
|
|
const SPAvector&
|
// vector
|
|
|
) const;
|
|
|
Maps a vector from model space to this WCS.
|
|
|
|
|
|
|
public: virtual const char* WCS::type_name
() const;
|
|
|
Returns the string "wcs".
|
|
|
|
|
|
|
public: SPAunit_vector WCS::x_axis
() const;
|
|
|
Gets the
x-axis in model space.
|
|
|
|
|
|
|
public: SPAunit_vector WCS::y_axis
() const;
|
|
|
Gets the
y-axis in model space.
|
|
|
|
|
|
|
public: SPAunit_vector WCS::z_axis
() const;
|
|
|
Gets the
z-axis in model space.
|
|
|
|
|
Related Fncs:
|
is_WCS
|