RescaleNormalAttrib

from panda3d.core import RescaleNormalAttrib
class RescaleNormalAttrib

Bases:

Bases: RenderAttrib

Specifies how polygons are to be drawn.

Inheritance diagram

Inheritance diagram of RescaleNormalAttrib

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.

property class_slot int
static getClassSlot() int
static getClassType() TypeHandle
getMode() Mode

Returns the render mode.

static make(mode: Mode) RenderAttrib

Constructs a new RescaleNormalAttrib object that specifies whether to rescale normals to compensate for transform scales or incorrectly defined normals.

static makeDefault() RenderAttrib

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.

property mode Mode

Returns the render mode.