Panda3D
Loading...
Searching...
No Matches
scissorAttrib.I
Go to the documentation of this file.
1/**
2 * PANDA 3D SOFTWARE
3 * Copyright (c) Carnegie Mellon University. All rights reserved.
4 *
5 * All use of this software is subject to the terms of the revised BSD
6 * license. You should have received a copy of this license along
7 * with this source code in a file named "LICENSE."
8 *
9 * @file scissorAttrib.I
10 * @author drose
11 * @date 2008-07-29
12 */
13
14/**
15 * Constructs a ScissorAttrib that restricts rendering to the indicated frame
16 * within the current DisplayRegion. (0,0) is the lower-left corner of the
17 * DisplayRegion, and (1,1) is the upper-right corner.
18 */
19INLINE CPT(RenderAttrib) ScissorAttrib::
20make(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top) {
21 return make(LVecBase4(left, right, bottom, top));
22}
23
24/**
25 * Returns true if the ScissorAttrib is an 'off' ScissorAttrib, indicating
26 * that scissor testing is disabled.
27 */
28INLINE bool ScissorAttrib::
29is_off() const {
30 return _off;
31}
32
33/**
34 * Returns the left, right, bottom, top coordinates of the scissor frame.
35 * This defines a frame within the current DisplayRegion, where 0,0 is the
36 * lower-left corner of the DisplayRegion, and 1,1 is the upper-right corner.
37 */
38INLINE const LVecBase4 &ScissorAttrib::
39get_frame() const {
40 return _frame;
41}
This is the base class for a number of render attributes (other than transform) that may be set on sc...
bool is_off() const
Returns true if the ScissorAttrib is an 'off' ScissorAttrib, indicating that scissor testing is disab...
get_frame
Returns the left, right, bottom, top coordinates of the scissor frame.