RescaleNormalAttrib
-
class RescaleNormalAttrib
Bases:
RenderAttrib
Specifies how polygons are to be drawn.
Inheritance diagram
-
enum Mode
-
enumerator M_none = 0
No adjustments are made to normals.
-
enumerator M_rescale = 1
Normals are counterscaled by the transform’s uniform scale, if supported by the graphics API.
-
enumerator M_normalize = 2
Normals are scaled to unit length; potentially expensive.
-
enumerator M_auto = 3
Normals are counterscaled in the presence of a uniform scale transform, or normalized in the presence of a non-uniform scale transform.
-
enumerator M_none = 0
-
static int get_class_slot(void)
-
static TypeHandle get_class_type(void)
-
static ConstPointerTo<RenderAttrib> make(RescaleNormalAttrib::Mode mode)
Constructs a new
RescaleNormalAttrib
object that specifies whether to rescale normals to compensate for transform scales or incorrectly defined normals.
-
ConstPointerTo<RenderAttrib> make_default(void)
Constructs a
RescaleNormalAttrib
object that’s suitable for putting at the top of a scene graph. This will contain whatever attrib was suggested by the user’s rescale-normals Config variable.
-
enum Mode