Panda3D
Loading...
Searching...
No Matches
depthOffsetAttrib.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 depthOffsetAttrib.I
10 * @author drose
11 * @date 2002-03-14
12 */
13
14/**
15 * Use DepthOffsetAttrib::make() to construct a new DepthOffsetAttrib object.
16 */
17INLINE DepthOffsetAttrib::
18DepthOffsetAttrib(int offset, PN_stdfloat min_value, PN_stdfloat max_value) :
19 _offset(offset),
20 _min_value(min_value),
21 _max_value(max_value)
22{
23}
24
25/**
26 * Returns the depth offset represented by this attrib.
27 */
28INLINE int DepthOffsetAttrib::
29get_offset() const {
30 return _offset;
31}
32
33/**
34 * Returns the value for the minimum (closest) depth value to be stored in the
35 * buffer, in the range 0 .. 1.
36 */
37INLINE PN_stdfloat DepthOffsetAttrib::
38get_min_value() const {
39 return _min_value;
40}
41
42/**
43 * Returns the value for the maximum (farthest) depth value to be stored in
44 * the buffer, in the range 0 .. 1.
45 */
46INLINE PN_stdfloat DepthOffsetAttrib::
47get_max_value() const {
48 return _max_value;
49}
get_offset
Returns the depth offset represented by this attrib.
get_min_value
Returns the value for the minimum (closest) depth value to be stored in the buffer,...
get_max_value
Returns the value for the maximum (farthest) depth value to be stored in the buffer,...