cee::vtfx::GeometryInfoBlock

class GeometryInfoBlock : public Block

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.

Public Functions

GeometryInfoBlock(size_t geometryCountPerState)

Constructs 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.

virtual ~GeometryInfoBlock()
size_t geometryCountPerState() const

Returns the number of geometries per state.

size_t partCount(size_t geometryIndex) const

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

int 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.

Str 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.

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.