All Frameworks  Class Hierarchy  This Framework  Previous  Next  Indexes

SPAkern Class TRANSFORM

SPAbase.ACIS_OBJECT
  |
  +---SPAkern.ENTITY
    |
    +---TRANSFORM
 

Usage: you can derive this class.


public class TRANSFORM

Represents an overall transformation applied to a BODY, and is saved as part of the model.

Role: The TRANSFORM class represents an overall transformation applied to a BODY. TRANSFORM allows object-space transformations to be applied without the need to recompute the BODY geometry (until two BODYs are to be combined and their internal coordinate systems have to be brought into agreement).

It allows a general affine transformation, but records the separate elements of the transformation (scaling, rotation, translation, etc.) to simplify the task of geometry transformation in the common case of solid-body transformations.

In particular, differential scaling, or shear, can change certain surface and curve types, so this is an important consideration. Also a reflection changes the sense of the relationship between edge tangents and surface normals and the topology has to be reversed to maintain the conventional edge direction.

See also:
BODY


Constructor and Destructor Index


o TRANSFORM()
Constructs a TRANSFORM (default constructor).
o TRANSFORM(SPAtransf&)
Constructs a TRANSFORM containing a specified SPAtransf.

Method Index


o deletable()
Indicates whether this TRANSFORM is normally destroyed by lose.
o identity(int)
Returns a type identifier for this object.
o lose()
Posts a delete bulletin to the bulletin board indicating this TRANSFORM is no longer used in the active model.
o operator*=(SPAtransf&)
Composes an existing transformation with a new one.
o owner()
Returns a pointer to the owning BODY.
o restore_common()
Restores this TRANSFORM from a SAT file.
o set_owner(ENTITY*)
Sets the owner of this TRANSFORM.
o set_transform(SPAtransf&)
Sets this TRANSFORM to the given SPAtransf object.
o transform()
Returns the SPAtransf object for this TRANSFORM.
o type_name()
Returns the string "transform".

Constructor and Destructor


o TRANSFORM
public TRANSFORM()
Constructs a TRANSFORM (default constructor).

Role: The allocation constructor is used primarily by restore. Applications should call this constructor only with the overloaded new operator inherited from the ENTITY class (for example, x = new TRANSFORM, because this reserves the memory on the heap, a requirement to support roll back and history management.
o TRANSFORM
public TRANSFORM( const SPAtransf& transf)
Constructs a TRANSFORM containing a specified SPAtransf.

Role: Requests memory for this object and populates it with the data supplied as the 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.

Parameters:
transf
SPAtransf to be wrapped by the constructed TRANSFORM.

Methods


o deletable
public virtual logical deletable()const
Indicates whether this TRANSFORM is normally destroyed by lose.

Role: The method returns FALSE, indicating that TRANSFORMs are, by default, shared among multiple owners by means of use-count tracking, and so are destroyed implicitly when every owner has been lost. Classes derived from TRANSFORM may of course override this behavior
o identity
public virtual int identity(int level= 0 )const
Returns a type identifier for this object.

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

Parameters:
level
the derivation level at which the object is to be identified.
o lose
public virtual void lose()
Posts a delete bulletin to the bulletin board indicating this TRANSFORM is no longer used in the active model.

Role: The lose methods for attached attributes are also called.
o operator*=
public TRANSFORM& operator*=( const SPAtransf& transf)
Composes an existing transformation with a new one.

Role: Let T1() represent the existing transformation and let T2() represent the new one. Then this method replaces the former by the composition T2(T1()).

Before performing the change, this method checks if the data structure is posted on the bulletin board. If not, it calls backup to put an entry on the bulletin board.

Parameters:
transf
the new SPAtransf.
o owner
public ENTITY * owner()const
Returns a pointer to the owning BODY.
o restore_common
public void restore_common()
Restores this TRANSFORM from a SAT file.

Role: 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      Transformation matrix
o set_owner
public void set_owner(ENTITY* owner)
Sets the owner of this TRANSFORM.

Role: 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.

Parameters:
owner
entity.
o set_transform
public void set_transform( const SPAtransf& transf)
Sets this TRANSFORM to the given SPAtransf object.

Role: Before performing the change, it checks if the data structure is posted on the bulletin board. If not, the method calls backup to put an entry on the bulletin board.

Parameters:
transf
the new SPAtransf.
o transform
public const SPAtransf & transform()
Returns the SPAtransf object for this TRANSFORM.
o type_name
public virtual const char * type_name()const
Returns the string "transform".

This object is included in the file: transfrm.hxx

Copyright (c) 1989-2007 by Spatial Corp. All rights reserved.