Liking cljdoc? Tell your friends :D

mathree.vector3


from-seqcljs

(from-seq v1)

convert a seq of 3 elements to vector3

convert a seq of 3 elements to vector3
sourceraw docstring

from-sphericalcljs

(from-spherical s1)

convert spherical point to vector3 point

convert spherical point to vector3 point
sourceraw docstring

from-spherical-coordscljs

(from-spherical-coords radius phi theta)

convert spherical point, radius phi theta as input, to vector3 point

convert spherical point, radius phi theta as input,  to vector3 point
sourceraw docstring

IVector3cljsprotocol

project-on-planecljs

(project-on-plane v plane-normal-v)

planeNormal - A vector representing a plane normal. Projects this vector onto a plane by subtracting this vector projected onto the plane's normal from this vector.

planeNormal - A vector representing a plane normal. Projects this vector onto a plane by subtracting this vector projected onto the plane's normal from this vector.

dotcljs

(dot v1 v2)

Calculate the dot product of this vector and v.

Calculate the dot product of this vector and v.

apply-axis-anglecljs

(apply-axis-angle v axis angle)

.applyAxisAngle ( axis : Vector3, angle : Float ) : this. axis - A normalized Vector3. angle - An angle in radians.

.applyAxisAngle ( axis : Vector3, angle : Float ) : this. axis - A normalized Vector3. angle - An angle in radians.

angle-tocljs

(angle-to v1 v2)

Returns the angle between this vector and vector v in radians.

Returns the angle between this vector and vector v in radians.

addcljs

(add v1 v2)

Adds v to this vector.

Adds v to this vector.

crosscljs

(cross v1 v2)

Sets this vector to cross product of a and b.

Sets this vector to cross product of a and b.

normalizecljs

(normalize v)

Convert this vector to a unit vector - that is, sets it equal to a vector with the same direction as this one, but length 1.

Convert this vector to a unit vector - that is, sets it equal to a vector with the same direction as this one, but length 1.

apply-normal-matrixcljs

(apply-normal-matrix v m)

Multiplies this vector by normal matrix m and normalizes the result.

Multiplies this vector by normal matrix m and normalizes the result.

subcljs

(sub v1 v2)

Subtracts v from this vector.

Subtracts v from this vector.

multiply-scalarcljs

(multiply-scalar v s)

Multiplies this vector by scalar s.

Multiplies this vector by scalar s.

almost-equalscljs

(almost-equals v1 v2)

Return true if v1 and v2 are almost equal. every element is less than 0.000001.

Return true if v1 and v2 are almost equal. every element is less than 0.000001.

apply-matrix4cljs

(apply-matrix4 v m)

Multiplies this vector (with an implicit 1 in the 4th dimension) and m, and divides by perspective.

Multiplies this vector (with an implicit 1 in the 4th dimension) and m, and divides by perspective.

->arraycljs

(->array v)

array - (optional) array to store this vector to. If this is not provided a new array will be created. offset - (optional) optional offset into the array.

array - (optional) array to store this vector to. If this is not provided a new array will be created. offset - (optional) optional offset into the array.

apply-matrix3cljs

(apply-matrix3 v m)

Multiplies this vector by m

Multiplies this vector by m

equalscljs

(equals v1 v2)

Returns true if the components of this vector and v are strictly equal; false otherwise.

Returns true if the components of this vector and v are strictly equal; false otherwise.

clone'cljs

(clone' v)

Returns a new vector3 with the same x, y and z values as this one.

Returns a new vector3 with the same x, y and z values as this one.

add-scalarcljs

(add-scalar v1 s)

Adds the scalar value s to this vector's x, y and z values.

Adds the scalar value s to this vector's x, y and z values.

lengthcljs

(length v)

Computes the Euclidean length (straight-line length) from (0, 0, 0) to (x, y, z).

Computes the Euclidean length (straight-line length) from (0, 0, 0) to (x, y, z).

apply-eulercljs

(apply-euler v e)

Applies euler transform to this vector by converting the Euler object to a Quaternion and applying.

Applies euler transform to this vector by converting the Euler object to a Quaternion and applying.

apply-quaternioncljs

(apply-quaternion v q)

Applies a Quaternion transform to this vecto

Applies a Quaternion transform to this vecto
source

randomcljs

(random)

Sets each component of this vector to a pseudo-random value between 0 and 1, excluding 1.

Sets each component of this vector to a pseudo-random value between 0 and 1, excluding 1.
sourceraw docstring

vector3cljs

(vector3)
(vector3 x y z)

Constructor function vector3( x : Float, y : Float, z : Float ) x - the x value of this vector. Default is 0. y - the y value of this vector. Default is 0. z - the z value of this vector. Default is 0.

Constructor function
vector3( x : Float, y : Float, z : Float )
x - the x value of this vector. Default is 0.
y - the y value of this vector. Default is 0.
z - the z value of this vector. Default is 0.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close