cee::geo::PartSettings
-
class
PartSettings
: public RefCountedObject Part settings represents how to draw a part and its 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.
- It is not allowed to enter an effect not applicable for the associated part data.
- Default effects are used if not provided, where needed.
- Effects are organized in a stack and the system will use the first applicable unused effect type found, ignoring any other effects in the same group further down the stack.
See also
Part, Effect, EffectColor, EffectEyeLift, EffectFrontAndBackColor, EffectFrontAndBackOpacity, EffectHalo, EffectLighting, EffectLineWidth, EffectOpacity, EffectPointSize, EffectPolygonOffset, and EffectTexture
Public Functions
-
PartSettings
() Constructs an empty part settings.
-
void
setVisible
(bool visible) Shows or hides the whole part.
-
bool
visible
() const Returns true if the part is drawn.
-
void
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.
-
bool
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().
See also
-
size_t
effectCount
() const Returns the number of associated effects.
-
void
removeEffect
(Effect *effect) Removes effect from part.
Warning
Effect must already be present in the part settings
-
void
removeAllEffects
() Removes all associated effects.
-
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.
-
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.
-
template<typename
T
>
voidremoveAllEffectsOfType
() Removes all effects of the given type.