# 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

explicit OccluderNode(std::string const &name)

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 set_vertices().

static TypeHandle get_class_type(void)
PN_stdfloat get_min_coverage(void)

Returns the minimum screen coverage.

std::size_t get_num_vertices(void) const

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

LPoint3 const &get_vertex(std::size_t n) const

Returns the nth vertex of the occluder polygon.

bool is_double_sided(void)

Is this occluder double-sided

void set_double_sided(bool value)

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

void set_min_coverage(PN_stdfloat value)

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.

void set_vertex(std::size_t n, LPoint3 const &v)

Sets the nth vertex of the occluder polygon.

void set_vertices(LPoint3 const &v0, LPoint3 const &v1, LPoint3 const &v2, LPoint3 const &v3)

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.