cee::geo::Part

class Part : public RefCountedObject

Geometry part and how it is to be drawn.

May be built up from points, lines or triangles. Add parts to model using GeometryModel::addPart().

Note! A part can only be in one model at a time

Public Functions

Part()

Constructs an empty part.

Part(Data *data)

Constructs a part.

Data *data()

Returns the part data.

const Data *data() const

Returns a const ptr to the part data.

void setData(Data *data)

Specifies new part data.

int id() const

Returns the id of the part.

Note! It’s up to the user if this is a unique value or not. Default id is -1.

void setId(int id)

Sets the id of the part.

Note! It’s up to the user if this is a unique value or not. Default id is -1.

template<typename T>
const T *dataOfType() const

Returns the active (last inserted/top of stack) effect of the given type T, or NULL if no effect of that type was found.

template<typename T>
T *dataOfType()

Returns the active (last inserted/top of stack) effect of the given type T, or NULL if no effect of that type was found.

TextureCoordinates *textureCoordinates()

Returns the texture coordinates or NULL if none specified.

void setTextureCoordinates(TextureCoordinates *coordinates)

Specifies the texture coordinates.

Set to NULL to clear data

PartSettings &settings()

Returns the part settings.

const PartSettings &settings() const

Returns the part settings.

const Mat4d &transformation() const

Returns the transformation matrix.

void setTransformation(const Mat4d &matrix)

Specifies the transformation matrix.

See also

boundingBox()

BoundingBox boundingBox()

Returns the bounding box of the associated part data adjusted for the transformation matrix, if set.