Panda3D
 All Classes Functions Variables Enumerations
scissorAttrib.I
1 // Filename: scissorAttrib.I
2 // Created by: drose (29Jul08)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 
16 ////////////////////////////////////////////////////////////////////
17 // Function: ScissorAttrib::make
18 // Access: Published, Static
19 // Description: Constructs a ScissorAttrib that restricts rendering
20 // to the indicated frame within the current
21 // DisplayRegion. (0,0) is the lower-left corner of the
22 // DisplayRegion, and (1,1) is the upper-right corner.
23 ////////////////////////////////////////////////////////////////////
24 INLINE CPT(RenderAttrib) ScissorAttrib::
25 make(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top) {
26  return make(LVecBase4(left, right, bottom, top));
27 }
28 
29 ////////////////////////////////////////////////////////////////////
30 // Function: ScissorAttrib::is_off
31 // Access: Published
32 // Description: Returns true if the ScissorAttrib is an 'off'
33 // ScissorAttrib, indicating that scissor testing is
34 // disabled.
35 ////////////////////////////////////////////////////////////////////
36 INLINE bool ScissorAttrib::
37 is_off() const {
38  return _off;
39 }
40 
41 ////////////////////////////////////////////////////////////////////
42 // Function: ScissorAttrib::get_frame
43 // Access: Published
44 // Description: Returns the left, right, bottom, top coordinates of
45 // the scissor frame. This defines a frame within the
46 // current DisplayRegion, where 0,0 is the lower-left
47 // corner of the DisplayRegion, and 1,1 is the
48 // upper-right corner.
49 ////////////////////////////////////////////////////////////////////
50 INLINE const LVecBase4 &ScissorAttrib::
51 get_frame() const {
52  return _frame;
53 }
This is the base class for a number of render attributes (other than transform) that may be set on sc...
Definition: renderAttrib.h:60
This is the base class for all three-component vectors and points.
Definition: lvecBase4.h:111
This restricts rendering to within a rectangular region of the scene, without otherwise affecting the...
Definition: scissorAttrib.h:41
const LVecBase4 & get_frame() const
Returns the left, right, bottom, top coordinates of the scissor frame.
Definition: scissorAttrib.I:51
bool is_off() const
Returns true if the ScissorAttrib is an 'off' ScissorAttrib, indicating that scissor testing is disab...
Definition: scissorAttrib.I:37