panda3d.core.ClipPlaneAttrib

class ClipPlaneAttrib

Bases: RenderAttrib

This functions similarly to a LightAttrib. It indicates the set of clipping planes that modify the geometry at this level and below. A ClipPlaneAttrib can either add planes or remove planes from the total set of clipping planes in effect.

Inheritance diagram

Inheritance diagram of ClipPlaneAttrib

enum Operation

This is the old, deprecated interface to ClipPlaneAttrib. Do not use any of these methods for new code; these methods will be removed soon.

enumerator O_set = 0
enumerator O_add = 1
enumerator O_remove = 2
addOffPlane(plane: NodePath) → RenderAttrib

Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane added to the list of planes disabled by this attrib.

Return type

RenderAttrib

addOnPlane(plane: NodePath) → RenderAttrib

Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane added to the list of planes enabled by this attrib.

Return type

RenderAttrib

addPlane(plane: PlaneNode) → RenderAttrib

Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane added to the list of planes.

Deprecated: Use addOnPlane() or addOffPlane() instead.

Return type

RenderAttrib

property class_slot
Return type

int

filterToMax(max_clip_planes: int) → ClipPlaneAttrib

Returns a new ClipPlaneAttrib, very much like this one, but with the number of on_planes reduced to be no more than max_clip_planes. The number of off_planes in the new ClipPlaneAttrib is undefined.

Return type

ClipPlaneAttrib

static getClassSlot() → int
static getClassType() → TypeHandle
Return type

TypeHandle

getNumOffPlanes() → int

Returns the number of planes that are disabled by the attribute.

getNumOnPlanes() → int

Returns the number of planes that are enabled by the attribute.

getNumPlanes() → int

Returns the number of planes listed in the attribute.

Deprecated: ClipPlaneAttribs nowadays have a separate list of on_planes and

off_planes, so this method no longer makes sense. Query the lists independently.

getOffPlane(n: int) → NodePath

Returns the nth plane disabled by the attribute, sorted in arbitrary (pointer) order.

Return type

NodePath

getOffPlanes() → list
getOnPlane(n: int) → NodePath

Returns the nth plane enabled by the attribute, sorted in render order.

Return type

NodePath

getOnPlanes() → list
getOperation() → Operation

Returns the basic operation type of the ClipPlaneAttrib. If this is O_set, the planes listed here completely replace any planes that were already on. If this is O_add, the planes here are added to the set of planes that were already on, and if O_remove, the planes here are removed from the set of planes that were on.

Deprecated: ClipPlaneAttribs nowadays have a separate list of on_planes and

off_planes, so this method no longer makes sense. Query the lists independently.

Return type

Operation

getPlane(n: int) → PlaneNode

Returns the nth plane listed in the attribute.

Deprecated: ClipPlaneAttribs nowadays have a separate list of on_planes and

off_planes, so this method no longer makes sense. Query the lists independently.

Return type

PlaneNode

hasAllOff() → bool

Returns true if this attrib disables all planes (although it may also enable some).

hasOffPlane(plane: NodePath) → bool

Returns true if the indicated plane is disabled by the attrib, false otherwise.

hasOnPlane(plane: NodePath) → bool

Returns true if the indicated plane is enabled by the attrib, false otherwise.

hasPlane(plane: PlaneNode) → bool

Returns true if the indicated plane is listed in the attrib, false otherwise.

Deprecated: ClipPlaneAttribs nowadays have a separate list of on_planes and

off_planes, so this method no longer makes sense. Query the lists independently.

isIdentity() → bool

Returns true if this is an identity attrib: it does not change the set of planes in use.

static make() → RenderAttrib

The following is the new, more general interface to the ClipPlaneAttrib.

Return type

RenderAttrib

static make(op: Operation, plane: PlaneNode) → RenderAttrib

Constructs a new ClipPlaneAttrib object that enables (or disables, according to op) the indicated plane(s).

Deprecated: Use addOnPlane() or addOffPlane() instead.

Return type

RenderAttrib

static make(op: Operation, plane1: PlaneNode, plane2: PlaneNode) → RenderAttrib

Constructs a new ClipPlaneAttrib object that turns on (or off, according to op) the indicate plane(s).

Deprecated: Use addOnPlane() or addOffPlane() instead.

Return type

RenderAttrib

static make(op: Operation, plane1: PlaneNode, plane2: PlaneNode, plane3: PlaneNode) → RenderAttrib

Constructs a new ClipPlaneAttrib object that turns on (or off, according to op) the indicate plane(s).

Deprecated: Use addOnPlane() or addOffPlane() instead.

Return type

RenderAttrib

static make(op: Operation, plane1: PlaneNode, plane2: PlaneNode, plane3: PlaneNode, plane4: PlaneNode) → RenderAttrib

Constructs a new ClipPlaneAttrib object that turns on (or off, according to op) the indicate plane(s).

Deprecated: Use addOnPlane() or addOffPlane() instead.

Return type

RenderAttrib

static makeAllOff() → RenderAttrib

Constructs a new ClipPlaneAttrib object that disables all planes (and hence disables clipping).

Return type

RenderAttrib

static makeDefault() → RenderAttrib

Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.

Return type

RenderAttrib

removeOffPlane(plane: NodePath) → RenderAttrib

Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane removed from the list of planes disabled by this attrib.

Return type

RenderAttrib

removeOnPlane(plane: NodePath) → RenderAttrib

Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane removed from the list of planes enabled by this attrib.

Return type

RenderAttrib

removePlane(plane: PlaneNode) → RenderAttrib

Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane removed from the list of planes.

Deprecated: Use removeOnPlane() or removeOffPlane() instead.

Return type

RenderAttrib