Post

ClipPlane

ClipPlane

Overview

ClipPlane specifies a single plane equation used to clip (i.e. cull or hide) displayed geometry. The plane field specifies a four-component plane equation that describes both inside and outside half space.

The ClipPlane node belongs to the Rendering component and requires at least level 5, its default container field is children. It is available from X3D version 3.2 or higher.

Hierarchy

1
2
3
+ X3DNode
  + X3DChildNode
    + ClipPlane

Fields

SFNode [in, out] metadata NULL [X3DMetadataObject]

Information about this node can be contained in a MetadataBoolean, MetadataDouble, MetadataFloat, MetadataInteger, MetadataString or MetadataSet node.

Hint

SFBool [in, out] enabled TRUE

Enables/disables node operation.

SFVec4f [in, out] plane 0 1 0 0 [0,1] or (-∞,∞)

If (a,b,c,d) is the plane, with the first three components being a normalized vector describing the plane’s normal direction (and thus the fourth component d being distance from the origin), a point (x,y,z) is visible to the user, with regards to the clipping plane, if ax+by+c*z+d is greater than 0.

Hints

Warning

  • (a, b, c) value of (0, 0, 0) is forbidden since the zero vector has ambiguous direction and is thus degenerate, not defining a plane.

Advice

Hint

  • ClipPlane nodes only affect peer and descendant nodes, thus a parent grouping node can limit its effect.

Warning

Example

See Also

This post is licensed under CC BY 4.0 by the author.