A block for a rigid body transformation matrix. More...
Public Member Functions | |
TransformationResultValuesBlock (int blockId) | |
Constructs an empty transformation result values block. More... | |
int | mapToBlockId (BlockType *blockType) const |
Returns the id of the block the transformation matrix maps to. More... | |
bool | setMapToBlockId (int blockId, Block::BlockType blockType) |
Sets the id of the element or indexed face set block to map the transformation matrix to. More... | |
Mat4d | matrix () const |
Returns the transformation matrix defined in this block. More... | |
void | setMatrix (const Mat4d &matrix) |
Sets the transformation matrix. More... | |
bool | checkValidity () const |
Returns false if the weak validity check fails. More... | |
![]() | |
Block (int blockId) | |
Constructs an empty block with given block id. More... | |
int | blockId () const |
Returns the block id. More... | |
BlockType | blockType () const |
Returns the block type. More... | |
![]() | |
void | addRef () const |
Increments the reference count for this object. More... | |
void | release () const |
Decrements the reference count for this object. More... | |
int | refCount () const |
Returns the reference count for this object. More... | |
void | setRefCountZero () const |
Sets the ref count to zero, but DOES NOT delete the object. More... | |
Additional Inherited Members | |
![]() | |
enum | BlockType { NODES, ELEMENTS, GEOMETRY, GEOMETRYINFO, RESULT, RESULTVALUES, TRANSFORMATIONRESULT, TRANSFORMATIONRESULTVALUES, STATEINFO, SET, ILLEGAL } |
Global block type constants used by Ceetron Export. Normally users do not need these, except for some methods of TransformationResultValuesBlock. More... | |
A block for a rigid body transformation matrix.
The block maps to an element block.
As expected for a rigid body transformation, the matrix applies to every item of an element block. The matrix is specified as 3 columns by 4 rows:
| 00 01 02 | M = | 10 11 12 | | 20 21 22 | | 30 31 32 |
The first index is the row index, the second is the column index. The array is stored in a row first, then column order.
This is equivalent to the standard four by four transformation matrices used with homogeneous coordinates, where the fourth column is taken to be [0 0 0 1]T. The coordinates (x0, y0, z0) are transformed into (x,y,z) as specified in the following equation:
[x, y, z] = [x0, y0, z0, 1]*M
Use the transformation result block (see TransformationResultBlock) to define which transformation result value blocks shall apply for which state.
cee::vtfx::TransformationResultValuesBlock::TransformationResultValuesBlock | ( | int | blockId | ) |
Constructs an empty transformation result values block.
Id must be >= 0 and unique for all result transformation result values blocks within a database.
|
virtual |
Returns false if the weak validity check fails.
Reimplemented from cee::vtfx::Block.
int cee::vtfx::TransformationResultValuesBlock::mapToBlockId | ( | BlockType * | blockType | ) | const |
Returns the id of the block the transformation matrix maps to.
blockType is a pointer to the int variable to store the block type.
Returns -1 if an error occurred. Check the log for more information.
Mat4d cee::vtfx::TransformationResultValuesBlock::matrix | ( | ) | const |
Returns the transformation matrix defined in this block.
Use this method to get the matrix defined in this block.
bool cee::vtfx::TransformationResultValuesBlock::setMapToBlockId | ( | int | blockId, |
Block::BlockType | blockType | ||
) |
Sets the id of the element or indexed face set block to map the transformation matrix to.
Returns false if error occurred. Check the log for more information.
void cee::vtfx::TransformationResultValuesBlock::setMatrix | ( | const Mat4d & | matrix | ) |
Sets the transformation matrix.