Panda3D
depthOffsetAttrib.I
1 // Filename: depthOffsetAttrib.I
2 // Created by: drose (14Mar02)
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: DepthOffsetAttrib::Constructor
18 // Access: Private
19 // Description: Use DepthOffsetAttrib::make() to construct a new
20 // DepthOffsetAttrib object.
21 ////////////////////////////////////////////////////////////////////
22 INLINE DepthOffsetAttrib::
23 DepthOffsetAttrib(int offset, PN_stdfloat min_value, PN_stdfloat max_value) :
24  _offset(offset),
25  _min_value(min_value),
26  _max_value(max_value)
27 {
28 }
29 
30 ////////////////////////////////////////////////////////////////////
31 // Function: DepthOffsetAttrib::get_offset
32 // Access: Published
33 // Description: Returns the depth offset represented by this attrib.
34 ////////////////////////////////////////////////////////////////////
35 INLINE int DepthOffsetAttrib::
36 get_offset() const {
37  return _offset;
38 }
39 
40 ////////////////////////////////////////////////////////////////////
41 // Function: DepthOffsetAttrib::get_min_value
42 // Access: Published
43 // Description: Returns the value for the minimum (closest) depth
44 // value to be stored in the buffer, in the range 0
45 // .. 1.
46 ////////////////////////////////////////////////////////////////////
47 INLINE PN_stdfloat DepthOffsetAttrib::
48 get_min_value() const {
49  return _min_value;
50 }
51 
52 ////////////////////////////////////////////////////////////////////
53 // Function: DepthOffsetAttrib::get_max_value
54 // Access: Published
55 // Description: Returns the value for the maximum (farthest) depth
56 // value to be stored in the buffer, in the range 0
57 // .. 1.
58 ////////////////////////////////////////////////////////////////////
59 INLINE PN_stdfloat DepthOffsetAttrib::
60 get_max_value() const {
61  return _max_value;
62 }
int get_offset() const
Returns the depth offset represented by this attrib.
PN_stdfloat get_max_value() const
Returns the value for the maximum (farthest) depth value to be stored in the buffer, in the range 0
PN_stdfloat get_min_value() const
Returns the value for the minimum (closest) depth value to be stored in the buffer, in the range 0