Panda3D
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  */
19 INLINE CPT(RenderAttrib) ScissorAttrib::
20 make(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  */
28 INLINE bool ScissorAttrib::
29 is_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  */
38 INLINE const LVecBase4 &ScissorAttrib::
39 get_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...
Definition: renderAttrib.h:51
CPT(RenderAttrib) ScissorAttrib
Constructs a ScissorAttrib that restricts rendering to the indicated frame within the current Display...
Definition: scissorAttrib.I:19
bool is_off() const
Returns true if the ScissorAttrib is an 'off' ScissorAttrib, indicating that scissor testing is disab...
Definition: scissorAttrib.I:29