Class: DefNormal3

algeobra3d~DefNormal3(normalizeopt)

Definition of a 3D normal Creates TYPE_VECTOR3

Constructor

new DefNormal3(normalizeopt)

Default values for the normal
Parameters:
Name Type Attributes Default Description
normalize Boolean <optional>
false Whether or not to normalize the normal
Source:

Methods

compute(info) → {Object}

Computes the normal
Parameters:
Name Type Description
info CreateInfo The creation info
Source:
Returns:
An object of type TYPE_VECTOR3
Type
Object

(static) fromPointPlane(point, plane, normalizeopt) → {CreateInfo}

Computes the normal at a point for the given plane Note: This normal will be defined for any point Resulting vector has its referenced point at the given point
Parameters:
Name Type Attributes Description
point Number | Object Either the index or value of a TYPE_POINT3. The point
plane Number | Object Either the index or value of a TYPE_PLANE. The plane
normalize Number | Object <optional>
Either the index or value of a TYPE_BOOLEAN. Whether the vector should be normalized
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromPointSphere(point, sphere, normalizeopt) → {CreateInfo}

Computes the normal at a point for the given sphere Note: This normal will be defined for any point != 0 Resulting vector has its referenced point at the given point
Parameters:
Name Type Attributes Description
point Number | Object Either the index or value of a TYPE_POINT3. The point
sphere Number | Object Either the index or value of a TYPE_SPHERE. The sphere
normalize Number | Object <optional>
Either the index or value of a TYPE_BOOLEAN. Whether the vector should be normalized
Source:
Returns:
The creation info
Type
CreateInfo