Class: DefVector3

algeobra3d~DefVector3(paramsopt)

Definition of a vector in 3D space

Constructor

new DefVector3(paramsopt)

Default values
Parameters:
Name Type Attributes Description
params Object <optional>
Properties
Name Type Attributes Description
v THREE.Vector3 <optional>
The vector components
ref THREE.Vector3 <optional>
The point this vector is attached to
normalize Boolean <optional>
Whether the vector is normalized
Source:

Methods

compute(info) → {Object}

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

(static) fromLineRef(line, paramsopt) → {CreateInfo}

Computes the vector from a line. The vector is attached to the first point of the line and points to the second. If any value is EMPTY, the default values are used
Parameters:
Name Type Attributes Description
line Number | Object Either the index or value of a TYPE_LINE3. The line
params Object <optional>
Properties
Name Type Attributes Description
ref Number | Object <optional>
Either the index or value of a TYPE_POINT3. The point this vector is attached to
normalize Number | Object <optional>
Either the index or value of a TYPE_BOOLEAN. WWhether the vector is normalized
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromSpherical(params) → {CreateInfo}

Computes the vector from spherical coordinates If any value is EMPTY, the default values are used
Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
s Number | Object <optional>
Either the index or value of a TYPE_SPHERICAL. The spherical coordinates
ref Number | Object <optional>
Either the index or value of a TYPE_POINT3. The point this vector is attached to
normalize Number | Object <optional>
Either the index or value of a TYPE_BOOLEAN. WWhether the vector is normalized
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromValues(params) → {CreateInfo}

Computes the vector from values If any value is EMPTY, the default values are used
Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
x Number | Object <optional>
Either the index or value of a TYPE_NUMBER. The x coordinate
y Number | Object <optional>
Either the index or value of a TYPE_NUMBER. The y coordinate
z Number | Object <optional>
Either the index or value of a TYPE_NUMBER. The z coordinate
ref Number | Object <optional>
Either the index or value of a TYPE_POINT3. The point this vector is attached to
normalize Number | Object <optional>
Either the index or value of a TYPE_BOOLEAN. WWhether the vector is normalized
Source:
Returns:
The creation info
Type
CreateInfo

(static) fromVectorRef(params) → {CreateInfo}

Computes the vector from another vector If any value is EMPTY, the default values are used
Parameters:
Name Type Description
params Object
Properties
Name Type Attributes Description
v Number | Object <optional>
Either the index or value of a TYPE_VECTOR3. The other vector
ref Number | Object <optional>
Either the index or value of a TYPE_POINT3. The point this vector is attached to
normalize Number | Object <optional>
Either the index or value of a TYPE_BOOLEAN. WWhether the vector is normalized
Source:
Returns:
The creation info
Type
CreateInfo