Panda3D
panda
src
pgraph
rescaleNormalAttrib.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 rescaleNormalAttrib.I
10
* @author drose
11
* @date 2004-12-30
12
*/
13
14
/**
15
* Use RescaleNormalAttrib::make() to construct a new RescaleNormalAttrib
16
* object.
17
*/
18
INLINE RescaleNormalAttrib::
19
RescaleNormalAttrib(RescaleNormalAttrib::Mode mode) :
20
_mode(mode)
21
{
22
}
23
24
/**
25
* Constructs a RescaleNormalAttrib object that's suitable for putting at the
26
* top of a scene graph. This will contain whatever attrib was suggested by
27
* the user's rescale-normals Config variable.
28
*/
29
INLINE
CPT
(
RenderAttrib
) RescaleNormalAttrib::
30
make_default() {
31
return
RenderAttribRegistry::quick_get_global_ptr
()->
get_slot_default
(_attrib_slot);
32
}
33
34
/**
35
* Returns the render mode.
36
*/
37
INLINE RescaleNormalAttrib::Mode
RescaleNormalAttrib::
38
get_mode
()
const
{
39
return
_mode;
40
}
RescaleNormalAttrib::get_mode
get_mode
Returns the render mode.
Definition:
rescaleNormalAttrib.h:52
CPT
CPT(RenderAttrib) RescaleNormalAttrib
Constructs a RescaleNormalAttrib object that's suitable for putting at the top of a scene graph.
Definition:
rescaleNormalAttrib.I:29
RenderAttrib
This is the base class for a number of render attributes (other than transform) that may be set on sc...
Definition:
renderAttrib.h:51
RenderAttribRegistry::get_slot_default
const RenderAttrib * get_slot_default(int slot) const
Returns the default RenderAttrib object associated with slot n.
Definition:
renderAttribRegistry.I:60
RenderAttribRegistry::quick_get_global_ptr
static RenderAttribRegistry * quick_get_global_ptr()
Returns the global_ptr without first ensuring it has been initialized.
Definition:
renderAttribRegistry.I:100
Generated on Sat Jan 11 2020 15:15:25 for Panda3D by
1.8.17