panda3d.core.RescaleNormalAttrib

class RescaleNormalAttrib

Bases: RenderAttrib

Specifies how polygons are to be drawn.

Inheritance diagram

Inheritance diagram of RescaleNormalAttrib

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.

Return type

RenderAttrib

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.

Return type

RenderAttrib

getMode() → Mode

Returns the render mode.

Return type

Mode

static getClassSlot() → int
static getClassType() → TypeHandle
Return type

TypeHandle

property mode

Returns the render mode.

Return type

Mode

property class_slot
Return type

int

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.