A node in the scene graph that can hold an occluder polygon, which must be a rectangle. More...

Inheritance diagram for OccluderNode:
PandaNode TypedWritable Namable LinkedListNode ReferenceCount TypedObject

List of all members.

Public Member Functions

 __init__ (string name)
 The default constructor creates a default occlusion polygon in the XZ plane (or XY plane in a y-up coordinate system).
float getMinCoverage ()
 Returns the minimum screen coverage.
int getNumVertices ()
 Returns the number of vertices in the occluder polygon.
LPoint3f const getVertex (int n)
 Returns the nth vertex of the occluder polygon.
list getVertices ()
bool isDoubleSided ()
 Is this occluder double-sided.
 setDoubleSided (bool value)
 If true, the back-face will also be used to occlude.
 setMinCoverage (float value)
 Minimum screen coverage needed before occluder used.
 setVertices (LPoint3f const v0, LPoint3f const v1, LPoint3f const v2, LPoint3f const v3)
 Replaces the four vertices of the occluder polygon.

Static Public Member Functions

static TypeHandle getClassType ()

Detailed Description

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.


Member Function Documentation

__init__ ( string  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().

Reimplemented from PandaNode.

static TypeHandle getClassType ( ) [static]

Reimplemented from PandaNode.

float getMinCoverage ( )

Returns the minimum screen coverage.

Returns the number of vertices in the occluder polygon.

This should always return 4.

LPoint3f const getVertex ( int  n)

Returns the nth vertex of the occluder polygon.

list getVertices ( )
bool isDoubleSided ( )

Is this occluder double-sided.

setDoubleSided ( bool  value)

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

setMinCoverage ( float  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.

setVertices ( LPoint3f const  v0,
LPoint3f const  v1,
LPoint3f const  v2,
LPoint3f 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.