# cee::vis::Clipping

class `Clipping` : public RefCountedObject

  Clipping planes are used to clip parts of the geometry in the scene to be able to look inside.

  Anything behind (on the opposite side of the plane normal) the given planes is hidden.

  Bounded clipping planes

  HOOPS Envision supports bounded clipping planes. This allows for cutting out parts of the model in many different ways. Normal clipping planes will clip an object/fragment if it is on the wrong side of any of the active clipping planes. By default an object/fragment will be clipped if it is behind (on the opposite side of the plane normal) at least one of the specified planes. Setting mustBeBehindAllToClip to true will require that an object/fragment be behind all the specified planes in order to be clipped.

  No clipping:

  Model with 5 clipping plane defining the bottom, right, back, left and top clipping plane. setMustBeBehindAllPlanesToClip(true) is used:

  See also

  Plane

  Public Functions

  size_t `planeCount`() const

    Returns the number of clipping planes defined for the view.

  const Plane &`plane`(size_t index) const

    Returns the clipping plane at the given index.

    The plane clips anything behind the plane (on the opposite side of the plane normal)

  void `addPlane`(const Plane &plane)

    Adds a clipping plane to the view.

    The plane clips anything behind the plane (on the opposite side of the plane normal).

  void `setPlane`(size_t index, const Plane &plane)

    Sets a clipping plane at the given index.

    The plane clips anything behind the plane (on the opposite side of the plane normal).

  void `removePlane`(size_t index)

    Removes the clipping plane at the given index.

  void `removeAllPlanes`()

    Removes all clipping planes defined for the view.

  bool `mustBeBehindAllPlanesToClip`() const

    Returns how clipping will be performed if more than one plane has been specified.

    See also

    setMustBeBehindAllPlanesToClip

  void `setMustBeBehindAllPlanesToClip`(bool mustBeBehindAllToClip)

    Controls how clipping will be done if more than one plane is specified.

    This setting is useful for creating “bounded clipping planes” where you define multiple planes in such a way that only fragments clipped by all planes (e.g. inside a box) will be rejected. This allows for “cutting into” a model without removing everything one one side of a plane.

    By default an object/fragment will be clipped if it is behind (on the opposite side of the plane normal) at least one of the specified planes. Setting mustBeBehindAllToClip to true will require that an object/fragment be behind all the specified planes in order to be clipped.

    Example:

    Original model

    No clipping.

    Bounded clipping planes

    Model with 5 clipping plane defining the bottom, right, back, left and top clipping plane. setMustBeBehindAllPlanesToClip(true) is used:

  void `setupRayDistancesFilters`(Ray *ray) const

    Sets up the ray’s distance filter based on the current clipping planes.

    When doing rayIntersect the distance filter stored in the ray is used for determine if the hit item is visible or not (hidden by clipping planes or not).

    This function will setup the legal distance ranges of the given ray so it will respect the current clipping planes in the view.

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...