cee::vtfx::GeometryInfoBlock Class Reference

A block that associates geometries to part names. More...

Public Member Functions

 GeometryInfoBlock (size_t geometryCountPerState)
 Construct an empty geometry info block. More...
 
size_t geometryCountPerState () const
 Returns the number of geometries per state. More...
 
size_t partCount (size_t geometryIndex) const
 Returns the number of parts in this geometry. This is equal to the number of element blocks. More...
 
int partId (size_t geometryIndex, size_t partIndex) const
 Returns the id of the part at the specified part index. More...
 
Str partName (size_t geometryIndex, size_t partIndex) const
 Returns the part name for the part at the given index. More...
 
void addPartInfo (size_t geometryIndex, int id, const Str &name)
 Adds a part info, specifying the id and name of the part for the given geometry. 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...
 
virtual bool checkValidity () const
 Does a weak check for valid block contents just before the block is being written. 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::GeometryInfoBlock:
cee::vtfx::Block cee::RefCountedObject

Detailed Description

A block that associates geometries to part names.

There must only be one geometry info block in each database.

This block is used to associate part names to all the geometries defined in the database. Its contents must match the geometry defined in the GeometryBlock of the database: same number of geometries and matching part ids.

See also
cee::vtfx::GeometryBlock

Constructor & Destructor Documentation

cee::vtfx::GeometryInfoBlock::GeometryInfoBlock ( size_t  geometryCountPerState)

Construct an empty geometry info block.

Only one geometry block per database is needed and allowed.

Set the number of geometries per state upon construction. The number of geometries must be identical for the GeometryInfoBlock and the GeometryBlock of a given database.

Member Function Documentation

void cee::vtfx::GeometryInfoBlock::addPartInfo ( size_t  geometryIndex,
int  id,
const Str name 
)

Adds a part info, specifying the id and name of the part for the given geometry.

size_t cee::vtfx::GeometryInfoBlock::geometryCountPerState ( ) const

Returns the number of geometries per state.

size_t cee::vtfx::GeometryInfoBlock::partCount ( size_t  geometryIndex) const

Returns the number of parts in this geometry. This is equal to the number of element blocks.

int cee::vtfx::GeometryInfoBlock::partId ( size_t  geometryIndex,
size_t  partIndex 
) const

Returns the id of the part at the specified part index.

Returns -1 if an invalid part index was specified.

cee::Str cee::vtfx::GeometryInfoBlock::partName ( size_t  geometryIndex,
size_t  partIndex 
) const

Returns the part name for the part at the given index.

Returns an empty string if an invalid part index was specified.