# panda3d.core.ScissorEffect¶

class ScissorEffect

Bases: RenderEffect

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.

Inheritance diagram

addPoint(point: LPoint3, node: NodePath) → RenderEffect

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.

Return type

RenderEffect

static getClassType() → TypeHandle
Return type

TypeHandle

getClip() → bool

Returns true if this ScissorEffect actually enables scissoring, or false if it culls only.

getFrame() → LVecBase4

If isScreen() 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.

Return type

LVecBase4

getNode(n: int) → NodePath

Returns the node to which the nth point is relative, or empty NodePath to indicate the current node.

Return type

NodePath

getNodes() → list
getNumPoints() → int

Returns the number of node-based scissor points. See getPoint().

getPoint(n: int) → LPoint3

If isScreen() returns false, then getNumPoints() and getPoint() 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.

Return type

LPoint3

getPoints() → list
isScreen() → bool

Returns true if the ScissorEffect is a screen-based effect, meaning getFrame() has a meaningful value, but get_a() and get_b() do not.

static makeNode(a: LPoint3, b: LPoint3, c: LPoint3, d: LPoint3, node: NodePath) → RenderEffect

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.

Return type

RenderEffect

static makeNode(a: LPoint3, b: LPoint3, node: NodePath) → RenderEffect

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.

Return type

RenderEffect

static makeNode(clip: bool) → RenderEffect

Constructs a new node-relative ScissorEffect, with no points. This empty ScissorEffect does nothing. You must then call addPoint() a number of times to add the points you require.

Return type

RenderEffect

static makeScreen(frame: LVecBase4, clip: bool) → RenderEffect

Constructs a new screen-relative ScissorEffect. The frame defines a left, right, bottom, top region, relative to the DisplayRegion. See ScissorAttrib.

Return type

RenderEffect