cee::geo::Part Class Reference

Geometry part and how it is to be drawn. More...

Public Member Functions

 Part ()
 Constructs an empty part. More...
 
 Part (Data *data)
 Constructs a part. More...
 
Datadata ()
 Returns the part data. More...
 
const Datadata () const
 Returns a const ptr to the part data. More...
 
void setData (Data *data)
 Specifies new part data. More...
 
int id () const
 Returns the id of the part. More...
 
void setId (int id)
 Sets the id of the part. More...
 
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. More...
 
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. More...
 
TextureCoordinatestextureCoordinates ()
 Returns the texture coordinates or NULL if none specified. More...
 
void setTextureCoordinates (TextureCoordinates *coordinates)
 Specifies the texture coordinates. More...
 
PartSettingssettings ()
 Returns the part settings. More...
 
const PartSettingssettings () const
 Returns the part settings. More...
 
const Mat4dtransformation () const
 Returns the transformation matrix. More...
 
void setTransformation (const Mat4d &matrix)
 Specifies the transformation matrix. More...
 
BoundingBox boundingBox ()
 Returns the bounding box of the associated part data adjusted for the transformation matrix, if set. 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...
 
Inheritance diagram for cee::geo::Part:
cee::RefCountedObject

Detailed Description

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
See also
cee::geo::GeometryModel
cee::geo::PartSettings
cee::geo::Data

Constructor & Destructor Documentation

cee::geo::Part::Part ( )

Constructs an empty part.

cee::geo::Part::Part ( Data data)

Constructs a part.

Member Function Documentation

cee::BoundingBox cee::geo::Part::boundingBox ( )

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

See also
Data
transformation()
boundingBox()
Data * cee::geo::Part::data ( )

Returns the part data.

const Data * cee::geo::Part::data ( ) const

Returns a const ptr to the part data.

template<typename T >
const T * cee::geo::Part::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 * cee::geo::Part::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.

int cee::geo::Part::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.
See also
setId()
cee::geo::GeometryModel::partById()
void cee::geo::Part::setData ( Data data)

Specifies new part data.

void cee::geo::Part::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.
See also
id()
cee::geo::GeometryModel::partById()
void cee::geo::Part::setTextureCoordinates ( TextureCoordinates coordinates)

Specifies the texture coordinates.

Set to NULL to clear data

PartSettings & cee::geo::Part::settings ( )

Returns the part settings.

const PartSettings & cee::geo::Part::settings ( ) const

Returns the part settings.

void cee::geo::Part::setTransformation ( const Mat4d matrix)

Specifies the transformation matrix.

See also
boundingBox()
TextureCoordinates * cee::geo::Part::textureCoordinates ( )

Returns the texture coordinates or NULL if none specified.

const Mat4d & cee::geo::Part::transformation ( ) const

Returns the transformation matrix.