Part settings represents how to draw a part and it's associated part data. More...
Public Member Functions | |
PartSettings () | |
Constructs an empty part settings. More... | |
void | setVisible (bool visible) |
Shows or hides the whole part. More... | |
bool | visible () const |
Returns true if the part is drawn. More... | |
void | setIntersectable (bool intersectable) |
Sets if the part should be "selectable" or not when doing rayIntersect/regionIntersect. More... | |
bool | intersectable () const |
Returns true if the part is "selectable" (default), i.e. considered in rayIntersect() or regionIntersect(). More... | |
size_t | effectCount () const |
Returns the number of associated effects. More... | |
size_t | effectIndex (const Effect *effect) const |
Returns index of the given effect. More... | |
Effect * | effect (size_t index) |
Returns the effect at the given index. More... | |
const Effect * | effect (size_t index) const |
Returns the effect at the given index. More... | |
void | addEffect (Effect *effect) |
Adds an effect. More... | |
void | removeEffect (Effect *effect) |
Removes effect from part. More... | |
void | removeAllEffects () |
Removes all associated effects. More... | |
template<typename T > | |
const T * | activeEffectOfType () 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 * | activeEffectOfType () |
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 > | |
void | removeAllEffectsOfType () |
Removes all effects of the given type. More... | |
![]() | |
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... | |
Part settings represents how to draw a part and it's associated part data.
Each part can have any number of effects. Add effects for manipulating how the part data should be drawn. These effect are added, queried and retrieved from the parts part settings.
cee::geo::PartSettings::PartSettings | ( | ) |
Constructs an empty part settings.
const T * cee::geo::PartSettings::activeEffectOfType | ( | ) | 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.
T * cee::geo::PartSettings::activeEffectOfType | ( | ) |
Returns the active (last inserted/top of stack) effect of the given type T, or NULL if no effect of that type was found.
void cee::geo::PartSettings::addEffect | ( | Effect * | effect | ) |
Adds an effect.
Effect * cee::geo::PartSettings::effect | ( | size_t | index | ) |
Returns the effect at the given index.
const Effect * cee::geo::PartSettings::effect | ( | size_t | index | ) | const |
Returns the effect at the given index.
size_t cee::geo::PartSettings::effectCount | ( | ) | const |
Returns the number of associated effects.
size_t cee::geo::PartSettings::effectIndex | ( | const Effect * | effect | ) | const |
Returns index of the given effect.
bool cee::geo::PartSettings::intersectable | ( | ) | const |
Returns true if the part is "selectable" (default), i.e. considered in rayIntersect() or regionIntersect().
If this method returns false, the part will not be hit in GeometryModel::rayIntersect() or GeometryModel::regionIntersect().
void cee::geo::PartSettings::removeAllEffects | ( | ) |
Removes all associated effects.
void cee::geo::PartSettings::removeAllEffectsOfType | ( | ) |
Removes all effects of the given type.
void cee::geo::PartSettings::removeEffect | ( | Effect * | effect | ) |
Removes effect from part.
void cee::geo::PartSettings::setIntersectable | ( | bool | intersectable | ) |
Sets if the part should be "selectable" or not when doing rayIntersect/regionIntersect.
The default is true. If this is set to false, this part will not be hit by the GeometryModel::rayIntersect() or GeometryModel::regionIntersect() methods.
This is useful if you only want the user to be able to pick/select parts of the model.
void cee::geo::PartSettings::setVisible | ( | bool | visible | ) |
Shows or hides the whole part.
bool cee::geo::PartSettings::visible | ( | ) | const |
Returns true if the part is drawn.