Panda3D
 All Classes Functions Variables Enumerations
scissorAttrib.I
00001 // Filename: scissorAttrib.I
00002 // Created by:  drose (29Jul08)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 
00016 ////////////////////////////////////////////////////////////////////
00017 //     Function: ScissorAttrib::make
00018 //       Access: Published, Static
00019 //  Description: Constructs a ScissorAttrib that restricts rendering
00020 //               to the indicated frame within the current
00021 //               DisplayRegion.  (0,0) is the lower-left corner of the
00022 //               DisplayRegion, and (1,1) is the upper-right corner.
00023 ////////////////////////////////////////////////////////////////////
00024 INLINE CPT(RenderAttrib) ScissorAttrib::
00025 make(PN_stdfloat left, PN_stdfloat right, PN_stdfloat bottom, PN_stdfloat top) {
00026   return make(LVecBase4(left, right, bottom, top));
00027 }
00028 
00029 ////////////////////////////////////////////////////////////////////
00030 //     Function: ScissorAttrib::get_frame
00031 //       Access: Published
00032 //  Description: Returns the left, right, bottom, top coordinates of
00033 //               the scissor frame.  This defines a frame within the
00034 //               current DisplayRegion, where 0,0 is the lower-left
00035 //               corner of the DisplayRegion, and 1,1 is the
00036 //               upper-right corner.
00037 ////////////////////////////////////////////////////////////////////
00038 INLINE const LVecBase4 &ScissorAttrib::
00039 get_frame() const {
00040   return _frame;
00041 }
 All Classes Functions Variables Enumerations