panda3d.core.OccluderNode

class OccluderNode

Bases: PandaNode

A node in the scene graph that can hold an occluder polygon, which must be a rectangle. When the occluder is activated with something like render.set_occluder(), then objects whose bouding volume lies entirely behind the occluder will not be rendered.

Inheritance diagram

Inheritance diagram of OccluderNode

__init__(name: str) → None

The default constructor creates a default occlusion polygon in the XZ plane (or XY plane in a y-up coordinate system). Use the normal Panda set_pos(), set_hpr(), set_scale() to position it appropriately, or replace the vertices with setVertices().

setDoubleSided(value: bool) → None

If true, the back-face will also be used to occlude

isDoubleSided() → bool

Is this occluder double-sided

setMinCoverage(value: float) → None

Minimum screen coverage needed before occluder used. Range should be 0 to 1. For example, setting to 0.2 would mean that the occluder needs to cover 20% of the screen to be considered.

getMinCoverage() → float

Returns the minimum screen coverage.

setVertices(v0: LPoint3, v1: LPoint3, v2: LPoint3, v3: LPoint3) → None

Replaces the four vertices of the occluder polygon. The vertices should be defined in a counterclockwise orientation when looking at the face of the occluder.

getNumVertices() → size_t

Returns the number of vertices in the occluder polygon. This should always return 4.

Return type

size_t

getVertex(n: size_t) → LPoint3

Returns the nth vertex of the occluder polygon.

Return type

LPoint3

setVertex(n: size_t, v: LPoint3) → None

Sets the nth vertex of the occluder polygon.

static getClassType() → TypeHandle
Return type

TypeHandle

getVertices() → list
property double_sided
Getter

Is this occluder double-sided

Setter

If true, the back-face will also be used to occlude

Return type

bool

property min_coverage
Getter

Returns the minimum screen coverage.

Setter

Minimum screen coverage needed before occluder used. Range should be 0 to 1. For example, setting to 0.2 would mean that the occluder needs to cover 20% of the screen to be considered.

Return type

float

property vertices
Getter

Returns the nth vertex of the occluder polygon.

Setter

Sets the nth vertex of the occluder polygon.

Return type

Sequence[LPoint3]