|
|
|
This provides a higher-level wrapper around ScissorAttrib.
More...
List of all members.
Public Member Functions |
| RenderEffect const | addPoint (Point3 const point, NodePath const node) |
| | Returns a new ScissorEffect with the indicated point added.
|
| RenderEffect const | addPoint (Point3 const point) |
| | Returns a new ScissorEffect with the indicated point added.
|
| bool | getClip () |
| | Returns true if this ScissorEffect actually enables scissoring, or false if it culls only.
|
| VBase4 const | getFrame () |
| | If is_screen() returns true, this method may be called to query the screen-based scissor frame.
|
| NodePath | getNode (int n) |
| | Returns the node to which the nth point is relative, or empty NodePath to indicate the current node.
|
| list | getNodes () |
| int | getNumPoints () |
| | Returns the number of node-based scissor points.
|
| Point3 const | getPoint (int n) |
| | If is_screen() returns false, then get_num_points() and get_point() may be called to query the node-based scissor frame.
|
| list | getPoints () |
| bool | isScreen () |
| | Returns true if the ScissorEffect is a screen-based effect, meaning get_frame() has a meaningful value, but get_a() and get_b() do not.
|
Static Public Member Functions |
| static TypeHandle | getClassType () |
| static RenderEffect const | makeNode () |
| | Constructs a new node-relative ScissorEffect, with no points.
|
| static RenderEffect const | makeNode (Point3 const a, Point3 const b, Point3 const c, Point3 const d, NodePath const node) |
| | Constructs a new node-relative ScissorEffect.
|
| static RenderEffect const | makeNode (bool clip) |
| | Constructs a new node-relative ScissorEffect, with no points.
|
| static RenderEffect const | makeNode (Point3 const a, Point3 const b, Point3 const c, Point3 const d) |
| | Constructs a new node-relative ScissorEffect.
|
| static RenderEffect const | makeNode (Point3 const a, Point3 const b, NodePath const node) |
| | Constructs a new node-relative ScissorEffect.
|
| static RenderEffect const | makeNode (Point3 const a, Point3 const b) |
| | Constructs a new node-relative ScissorEffect.
|
| static RenderEffect const | makeScreen (VBase4 const frame) |
| | Constructs a new screen-relative ScissorEffect.
|
| static RenderEffect const | makeScreen (VBase4 const frame, bool clip) |
| | Constructs a new screen-relative ScissorEffect.
|
Detailed Description
This provides a higher-level wrapper around ScissorAttrib.
It allows for the scissor region to be defined via points relative to the current node, and also performs culling based on the scissor region.
Member Function Documentation
Returns a new ScissorEffect with the indicated point added.
It is only valid to call this on a "node" type ScissorEffect. The full set of points, projected into screen space, defines the bounding volume of the rectangular scissor region.
Each point may be relative to a different node, if desired.
Returns a new ScissorEffect with the indicated point added.
It is only valid to call this on a "node" type ScissorEffect. The full set of points, projected into screen space, defines the bounding volume of the rectangular scissor region.
Each point may be relative to a different node, if desired.
Returns true if this ScissorEffect actually enables scissoring, or false if it culls only.
If is_screen() returns true, this method may be called to query the screen-based scissor frame.
This is a series of left, right, bottom, top, representing the scissor frame relative to the current DisplayRegion. See ScissorAttrib.
Returns the node to which the nth point is relative, or empty NodePath to indicate the current node.
Returns the number of node-based scissor points.
See get_point().
If is_screen() returns false, then get_num_points() and get_point() may be called to query the node-based scissor frame.
These return n points (at least two), which are understood to be in the space of this node, and which define any opposite corners of the scissor frame.
Returns true if the ScissorEffect is a screen-based effect, meaning get_frame() has a meaningful value, but get_a() and get_b() do not.
Constructs a new node-relative ScissorEffect, with no points.
This empty ScissorEffect does nothing. You must then call add_point a number of times to add the points you require.
Constructs a new node-relative ScissorEffect.
The four points are understood to be relative to the indicated node, or the current node if the indicated NodePath is empty, and determine four points surrounding the scissor region.
Constructs a new node-relative ScissorEffect.
The two points are understood to be relative to the indicated node, or the current node if the NodePath is empty, and determine the diagonally opposite corners of the scissor region.
Constructs a new node-relative ScissorEffect, with no points.
This empty ScissorEffect does nothing. You must then call add_point a number of times to add the points you require.
Constructs a new node-relative ScissorEffect.
The four points are understood to be relative to the indicated node, or the current node if the indicated NodePath is empty, and determine four points surrounding the scissor region.
Constructs a new node-relative ScissorEffect.
The two points are understood to be relative to the indicated node, or the current node if the NodePath is empty, and determine the diagonally opposite corners of the scissor region.
| | |