cee::vtfx::TransformationResultBlock Class Reference

A block defining a rigid body transformation result in a VTFx database. More...

Public Member Functions

 TransformationResultBlock (int blockId)
 Constructs an empty transformation result block. More...
 
Str name () const
 Returns the name of the transformation result. More...
 
void setName (const Str &resultName)
 Sets the name of the result. More...
 
int resultId () const
 Returns the id of the transformation result. More...
 
void setResultId (int resultId)
 Sets the result id for the transformation result. More...
 
std::vector< int > transformationResultValuesBlocks (size_t stateIndex) const
 Returns an array of transformation result values block ids defined for a state. More...
 
int transformationResultValuesBlockCount (size_t stateIndex) const
 Returns number of transformation result values blocks defined in the state at given state index. More...
 
bool addTransformationResultValuesBlock (int transformationResultValuesBlockId, int stateId=1)
 Adds the transformation result values block for the specified state. More...
 
bool setTransformationResultValuesBlocks (const std::vector< int > &transformationResultValuesBlockIds, int stateId=1)
 Sets the transformation result values blocks for the specified state. More...
 
size_t stateCount () const
 Returns the number of states for the transformation result. More...
 
size_t stateIndex (int stateId) const
 Returns the zero-based state index for a given state id. More...
 
int stateId (size_t stateIndex) const
 Returns the state id for the give state index. More...
 
bool checkValidity () const
 Returns false if weak validity check failed. More...
 
- Public Member Functions inherited from cee::vtfx::Block
 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...
 
- Public Member Functions inherited from cee::RefCountedObject
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

- Public Types inherited from cee::vtfx::Block
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...
 
Inheritance diagram for cee::vtfx::TransformationResultBlock:
cee::vtfx::Block cee::RefCountedObject

Detailed Description

A block defining a rigid body transformation result in a VTFx database.

A VTFx database can contain many transformation result blocks. The transformation result block defines the result meta data and references transformation result values blocks which contain the actual transformation matrices.

The result meta data contains a "result id" which shall not be confused with the block id. The result id must be unique within all transformation results in a database.

For a static dataset, it is sufficient to define transformation result value blocks for one state (using stateId = 1). For adaptive results, the same rule applies as for geometry blocks: a transformation result has to be defined for every state, but it is possible to re-use transformation result values blocks that had been defined for other states.

For further information on states and adaptive results, please see the API documentation and StateInfoBlock.

Constructor & Destructor Documentation

cee::vtfx::TransformationResultBlock::TransformationResultBlock ( int  blockId)

Constructs an empty transformation result block.

All transformation result blocks must have a unique id within a database. The name of the result is set to "Transformation result blockId"

Member Function Documentation

bool cee::vtfx::TransformationResultBlock::addTransformationResultValuesBlock ( int  transformationResultValuesBlockId,
int  stateId = 1 
)

Adds the transformation result values block for the specified state.

transformationResultValuesBlockId is the id of the transformation result values block to add

The rule is that transformation result values blocks need to be defined for every state, but blocks can be re-used in multiple states if required.

Returns false if an error occurred. Check the log for further information.

bool cee::vtfx::TransformationResultBlock::checkValidity ( ) const
virtual

Returns false if weak validity check failed.

Reimplemented from cee::vtfx::Block.

Str cee::vtfx::TransformationResultBlock::name ( ) const

Returns the name of the transformation result.

int cee::vtfx::TransformationResultBlock::resultId ( ) const

Returns the id of the transformation result.

void cee::vtfx::TransformationResultBlock::setName ( const Str resultName)

Sets the name of the result.

void cee::vtfx::TransformationResultBlock::setResultId ( int  resultId)

Sets the result id for the transformation result.

The result id is used when specifying properties for the result.

bool cee::vtfx::TransformationResultBlock::setTransformationResultValuesBlocks ( const std::vector< int > &  transformationResultValuesBlockIds,
int  stateId = 1 
)

Sets the transformation result values blocks for the specified state.

transformationResultValuesBlockIds is an array of with ids of transformation result values.

The rule is that transformation result values blocks need to be defined for every state, but blocks can be re-used in multiple states if required.

Returns false if an error occurred. Check the log for further information.

size_t cee::vtfx::TransformationResultBlock::stateCount ( ) const

Returns the number of states for the transformation result.

int cee::vtfx::TransformationResultBlock::stateId ( size_t  stateIndex) const

Returns the state id for the give state index.

stateIndex is the zero-based index of the state (not to be mixed with state id!).

Returns -1 if an invalid state index was specified.

size_t cee::vtfx::TransformationResultBlock::stateIndex ( int  stateId) const

Returns the zero-based state index for a given state id.

Returns cee::UNDEFINED_SIZE_T if no state with the given state id was found.

int cee::vtfx::TransformationResultBlock::transformationResultValuesBlockCount ( size_t  stateIndex) const

Returns number of transformation result values blocks defined in the state at given state index.

stateIndex is the zero-based index of the state (not to be mixed with state id!)

Returns -1 if an invalid state index was specified.

std::vector< int > cee::vtfx::TransformationResultBlock::transformationResultValuesBlocks ( size_t  stateIndex) const

Returns an array of transformation result values block ids defined for a state.

stateIndex is the zero-based state index (not to be mixed with state id!)

Returns an empty array if invalid state index was specified.