# 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

    setIntersectable

  size_t `effectCount`() const

    Returns the number of associated effects.

  size_t `effectIndex`(const Effect *effect) const

    Returns index of the given effect.

  Effect *`effect`(size_t index)

    Returns the effect at the given index.

  const Effect *`effect`(size_t index) const

    Returns the effect at the given index.

  void `addEffect`(Effect *effect)

    Adds an effect.

  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`>
  void `removeAllEffectsOfType`()

    Removes all effects of the given type.

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your multilingual generative AI assistant for documentation. Ask me anything about HOOPS Envision for Desktop in your own language, or choose a sample question below to start a conversation:

What is HOOPS Envision for Desktop?
What are the latest release notes for HOOPS Envision for Desktop?
How do I start evaluating HOOPS Envision for Desktop?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...