This functions similarly to a LightAttrib. More...
Public Types | |
enum | Operation { OSet = 0, OAdd = 1, ORemove = 2 } |
Public Member Functions | |
RenderAttrib const | addOffPlane (NodePath const plane) |
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane added to the list of planes disabled by this attrib. | |
RenderAttrib const | addOnPlane (NodePath const plane) |
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane added to the list of planes enabled by this attrib. | |
RenderAttrib const | addPlane (PlaneNode plane) |
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane added to the list of planes. | |
ClipPlaneAttrib const | filterToMax (int max_clip_planes) |
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. | |
int | getNumOffPlanes () |
Returns the number of planes that are disabled by the attribute. | |
int | getNumOnPlanes () |
Returns the number of planes that are enabled by the attribute. | |
int | getNumPlanes () |
Returns the number of planes listed in the attribute. | |
NodePath | getOffPlane (int n) |
Returns the nth plane disabled by the attribute, sorted in arbitrary (pointer) order. | |
list | getOffPlanes () |
NodePath | getOnPlane (int n) |
Returns the nth plane enabled by the attribute, sorted in render order. | |
list | getOnPlanes () |
Operation | getOperation () |
Returns the basic operation type of the ClipPlaneAttrib. | |
PlaneNode | getPlane (int n) |
Returns the nth plane listed in the attribute. | |
bool | hasAllOff () |
Returns true if this attrib disables all planes (although it may also enable some). | |
bool | hasOffPlane (NodePath const plane) |
Returns true if the indicated plane is disabled by the attrib, false otherwise. | |
bool | hasOnPlane (NodePath const plane) |
Returns true if the indicated plane is enabled by the attrib, false otherwise. | |
bool | hasPlane (PlaneNode plane) |
Returns true if the indicated plane is listed in the attrib, false otherwise. | |
bool | isIdentity () |
Returns true if this is an identity attrib: it does not change the set of planes in use. | |
RenderAttrib const | removeOffPlane (NodePath const plane) |
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane removed from the list of planes disabled by this attrib. | |
RenderAttrib const | removeOnPlane (NodePath const plane) |
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane removed from the list of planes enabled by this attrib. | |
RenderAttrib const | removePlane (PlaneNode plane) |
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane removed from the list of planes. | |
Static Public Member Functions | |
static int | getClassSlot () |
static TypeHandle | getClassType () |
static RenderAttrib const | make () |
Constructs a new ClipPlaneAttrib object that does nothing. | |
static RenderAttrib const | make (Operation op, PlaneNode plane) |
Constructs a new ClipPlaneAttrib object that enables (or disables, according to op) the indicated plane(s). | |
static RenderAttrib const | make (Operation op, PlaneNode plane1, PlaneNode plane2) |
Constructs a new ClipPlaneAttrib object that turns on (or off, according to op) the indicate plane(s). | |
static RenderAttrib const | make (Operation op, PlaneNode plane1, PlaneNode plane2, PlaneNode plane3) |
Constructs a new ClipPlaneAttrib object that turns on (or off, according to op) the indicate plane(s). | |
static RenderAttrib const | make (Operation op, PlaneNode plane1, PlaneNode plane2, PlaneNode plane3, PlaneNode plane4) |
Constructs a new ClipPlaneAttrib object that turns on (or off, according to op) the indicate plane(s). | |
static RenderAttrib const | makeAllOff () |
Constructs a new ClipPlaneAttrib object that disables all planes (and hence disables clipping). | |
static RenderAttrib const | makeDefault () |
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be. |
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.
enum Operation |
RenderAttrib const addOffPlane | ( | NodePath const | plane | ) |
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane added to the list of planes disabled by this attrib.
RenderAttrib const addOnPlane | ( | NodePath const | plane | ) |
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane added to the list of planes enabled by this attrib.
RenderAttrib const addPlane | ( | PlaneNode | plane | ) |
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane added to the list of planes.
This method is now deprecated. Use add_on_plane() or add_off_plane() instead.
ClipPlaneAttrib const filterToMax | ( | int | max_clip_planes | ) |
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.
static int getClassSlot | ( | ) | [static] |
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from RenderAttrib.
int getNumOffPlanes | ( | ) |
Returns the number of planes that are disabled by the attribute.
int getNumOnPlanes | ( | ) |
Returns the number of planes that are enabled by the attribute.
int getNumPlanes | ( | ) |
Returns the number of planes listed in the attribute.
This method is now deprecated. ClipPlaneAttribs nowadays have a separate list of on_planes and off_planes, so this method doesn't make sense. Query the lists independently.
NodePath getOffPlane | ( | int | n | ) |
Returns the nth plane disabled by the attribute, sorted in arbitrary (pointer) order.
list getOffPlanes | ( | ) |
NodePath getOnPlane | ( | int | n | ) |
Returns the nth plane enabled by the attribute, sorted in render order.
list getOnPlanes | ( | ) |
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 of planes that were already on, and if O_remove, the planes here are removed from the set of planes that were on.
This method is now deprecated. ClipPlaneAttribs nowadays have a separate list of on_planes and off_planes, so this method doesn't make sense. Query the lists independently.
Returns the nth plane listed in the attribute.
This method is now deprecated. ClipPlaneAttribs nowadays have a separate list of on_planes and off_planes, so this method doesn't make sense. Query the lists independently.
bool hasAllOff | ( | ) |
Returns true if this attrib disables all planes (although it may also enable some).
bool hasOffPlane | ( | NodePath const | plane | ) |
Returns true if the indicated plane is disabled by the attrib, false otherwise.
bool hasOnPlane | ( | NodePath const | plane | ) |
Returns true if the indicated plane is enabled by the attrib, false otherwise.
Returns true if the indicated plane is listed in the attrib, false otherwise.
This method is now deprecated. ClipPlaneAttribs nowadays have a separate list of on_planes and off_planes, so this method doesn't make sense. Query the lists independently.
bool isIdentity | ( | ) |
Returns true if this is an identity attrib: it does not change the set of planes in use.
static RenderAttrib const make | ( | ) | [static] |
Constructs a new ClipPlaneAttrib object that does nothing.
static RenderAttrib const make | ( | Operation | op, |
PlaneNode | plane | ||
) | [static] |
Constructs a new ClipPlaneAttrib object that enables (or disables, according to op) the indicated plane(s).
This method is now deprecated. Use add_on_plane() or add_off_plane() instead.
static RenderAttrib const make | ( | Operation | op, |
PlaneNode | plane1, | ||
PlaneNode | plane2 | ||
) | [static] |
Constructs a new ClipPlaneAttrib object that turns on (or off, according to op) the indicate plane(s).
This method is now deprecated. Use add_on_plane() or add_off_plane() instead.
static RenderAttrib const make | ( | Operation | op, |
PlaneNode | plane1, | ||
PlaneNode | plane2, | ||
PlaneNode | plane3 | ||
) | [static] |
Constructs a new ClipPlaneAttrib object that turns on (or off, according to op) the indicate plane(s).
This method is now deprecated. Use add_on_plane() or add_off_plane() instead.
static RenderAttrib const make | ( | Operation | op, |
PlaneNode | plane1, | ||
PlaneNode | plane2, | ||
PlaneNode | plane3, | ||
PlaneNode | plane4 | ||
) | [static] |
Constructs a new ClipPlaneAttrib object that turns on (or off, according to op) the indicate plane(s).
This method is now deprecated. Use add_on_plane() or add_off_plane() instead.
static RenderAttrib const makeAllOff | ( | ) | [static] |
Constructs a new ClipPlaneAttrib object that disables all planes (and hence disables clipping).
static RenderAttrib const makeDefault | ( | ) | [static] |
Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.
RenderAttrib const removeOffPlane | ( | NodePath const | plane | ) |
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane removed from the list of planes disabled by this attrib.
RenderAttrib const removeOnPlane | ( | NodePath const | plane | ) |
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane removed from the list of planes enabled by this attrib.
RenderAttrib const removePlane | ( | PlaneNode | plane | ) |
Returns a new ClipPlaneAttrib, just like this one, but with the indicated plane removed from the list of planes.
This method is now deprecated. Use remove_on_plane() or remove_off_plane() instead.