Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Static Public Member Functions

# ScissorAttrib Class Reference

This restricts rendering to within a rectangular region of the scene, without otherwise affecting the viewport or lens properties. More...

Inheritance diagram for ScissorAttrib:

List of all members.

## Public Member Functions
VBase4 const | getFrame ()
| Returns the left, right, bottom, top coordinates of the scissor frame.
## Static Public Member Functions
static int | getClassSlot ()
static TypeHandle | getClassType ()
static RenderAttrib const | make (VBase4 const frame)
| Constructs a ScissorAttrib that restricts rendering to the indicated frame within the current DisplayRegion.
static RenderAttrib const | make (float left, float right, float bottom, float top)
| Constructs a ScissorAttrib that restricts rendering to the indicated frame within the current DisplayRegion.
static RenderAttrib const | makeDefault ()
| Returns a RenderAttrib that corresponds to whatever the standard default properties for render attributes of this type ought to be.
static RenderAttrib const | makeOff ()
| Constructs a new ScissorAttrib object that removes the scissor region and fills the DisplayRegion.

## Detailed Description

This restricts rendering to within a rectangular region of the scene, without otherwise affecting the viewport or lens properties.

Geometry that falls outside the scissor region is not rendered. It is akin to the OpenGL glScissor() function.

The ScissorAttrib always specifies its region relative to its enclosing DisplayRegion, in screen space, and performs no culling.

See ScissorEffect if you wish to define a region relative to 2-D or 3-D coordinates in the scene graph, with culling.

## Member Function Documentation

static int getClassSlot | ( |  | ) | `[static]`

static TypeHandle getClassType | ( |  | ) | `[static]`

Reimplemented from RenderAttrib.

VBase4 const getFrame | ( |  | ) |

Returns the left, right, bottom, top coordinates of the scissor frame.

This defines a frame within the current DisplayRegion, where 0,0 is the lower-left corner of the DisplayRegion, and 1,1 is the upper-right corner.

static RenderAttrib const make | ( | VBase4 const | frame | ) | `[static]`

Constructs a ScissorAttrib that restricts rendering to the indicated frame within the current DisplayRegion.

(0,0) is the lower-left corner of the DisplayRegion, and (1,1) is the upper-right corner.

static RenderAttrib const make | ( | float | left,
|  | float | right,
|  | float | bottom,
|  | float | top
| ) |  | `[static]`

Constructs a ScissorAttrib that restricts rendering to the indicated frame within the current DisplayRegion.

(0,0) is the lower-left corner of the DisplayRegion, and (1,1) is the upper-right corner.

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.

static RenderAttrib const makeOff | ( |  | ) | `[static]`

Constructs a new ScissorAttrib object that removes the scissor region and fills the DisplayRegion.

All Classes Namespaces Functions Variables Enumerations Enumerator Properties