Purpose:
|
Defines an infinite line as an object in the model.
|
|
Derivation:
|
STRAIGHT : CURVE : ENTITY : ACIS_OBJECT : -
|
|
SAT Identifier:
|
"straight"
|
|
Filename:
|
kern/kernel/kerndata/geom/straight.hxx
|
|
Description:
|
STRAIGHT is a model geometry class that contains a pointer to a (lowercase)
straight, 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.
|
|
|
STRAIGHT is one of several classes derived from
CURVE to define a specific type of curve. The
straight class defines an infinite line by a point (SPAposition) on the line and its direction (SPAunit_vector).
|
|
|
Along with the usual
CURVE and
ENTITY class methods,
STRAIGHT has member methods to provide access to specific implementations of the geometry. For example, methods are available to set and retrieve the root point and direction of a line.
|
|
|
A use count allows references to multiple
STRAIGHTs. The construction of a new
STRAIGHT 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
|
straight
|
|
Constructor:
|
public: STRAIGHT::STRAIGHT
();
|
|
|
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: STRAIGHT::STRAIGHT
(
|
|
|
SPAposition const&,
|
// position
|
|
|
SPAunit_vector const&
|
// unit vector
|
|
|
);
|
|
|
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
STRAIGHT that passes through a given
SPAposition and in the direction of a given unit vector.
|
|
|
|
|
|
|
public: STRAIGHT::STRAIGHT
(
|
|
|
straight const&
|
// straight 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.
|
|
|
|
|
Destructor:
|
public: virtual void STRAIGHT::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 STRAIGHT::~STRAIGHT
();
|
|
|
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 STRAIGHT(...) then later
x->lose.)
|
|
|
|
Methods:
|
protected: virtual logical
|
|
|
STRAIGHT::bulletin_no_change_vf (
|
|
|
ENTITY const* other,
|
|
// other entity
|
|
|
logical identical_comparator
|
// comparator
|
|
|
) const;
|
|
|
Virtual function for comparing subclass data - called by
bulletin_no_change. For identical_comparator to be
TRUE requires an exact match when comparing doubles, and returns the result of
memcmp as a default (for non-overridden subclasses).
FALSE indicates tolerant compares and returns
FALSE as a default.
|
|
|
|
|
|
|
public: virtual void STRAIGHT::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&
|
|
|
STRAIGHT::direction () const;
|
|
|
Returns the
SPAunit_vector defining the direction of the line.
|
|
|
|
|
|
|
public: curve const& STRAIGHT::equation
() const;
|
|
|
Returns the
curve's equation for reading only.
|
|
|
|
|
|
|
public: curve& STRAIGHT::equation_for_update
();
|
|
|
Returns the address of the
curve's 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 STRAIGHT::identity
(
|
|
|
int
|
|
// level
|
|
|
|
= 0
|
|
|
) const;
|
|
|
If
level is unspecified or 0, returns the type identifier
STRAIGHT_TYPE. If
level is specified, returns
STRAIGHT_TYPE for that level of derivation from
ENTITY. The level of this class is defined as
STRAIGHT_LEVEL.
|
|
|
|
|
|
|
public: virtual logical STRAIGHT::is_deepcopyable
(
|
|
|
) const;
|
|
|
Returns
TRUE if this can be deep copied.
|
|
|
|
|
|
|
public: void STRAIGHT::operator*=
(
|
|
|
SPAtransf const&
|
// transform
|
|
|
);
|
|
|
Transforms a
STRAIGHT. 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 STRAIGHT::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.
|
|
|
straight::restore_data
|
|
Low-level geometry definition for a line.
|
|
|
|
|
|
|
public: SPAposition const&
|
|
|
STRAIGHT::root_point () const;
|
|
|
Returns a
SPAposition defining a point on the line.
|
|
|
|
|
|
|
public: void STRAIGHT::set_direction
(
|
|
|
SPAunit_vector const&
|
// unit vector
|
|
|
);
|
|
|
Sets the
STRAIGHT'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 STRAIGHT::set_root_point
(
|
|
|
SPAposition const&
|
// root point
|
|
|
);
|
|
|
Sets the
STRAIGHT'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: curve* STRAIGHT::trans_curve
(
|
|
|
SPAtransf const&
|
|
// transform
|
|
|
|
= * (SPAtransf* ) NULL_REF,
|
|
|
logical
|
|
// reversed flag
|
|
|
|
= FALSE
|
|
|
) const;
|
|
|
Transforms the
curve's equation. If the logical is
TRUE, the
curve is reversed.
|
|
|
|
|
|
|
public: virtual const char*
|
|
|
STRAIGHT::type_name () const;
|
|
|
Returns the string "straight".
|
|
Internal Use:
|
full_size
|
|
|
|
|
Related Fncs:
|
is_STRAIGHT
|