Class: Quaternion

olympe.df. Quaternion

The Quaternion class represents a 4-dimensional vector (x, y, z, w).


new Quaternion( [x] [, y] [, z] [, w])

Creates a Quaternion, or 4-dimensional vector.

Parameters:
Name Type Argument Description
x olympe.df.PONumber | number <optional>

the value for the 'x' coordinate

y olympe.df.PONumber | number <optional>

the value for the 'y' coordinate

z olympe.df.PONumber | number <optional>

the value for the 'z' coordinate

w olympe.df.PONumber | number <optional>

the value for the 'w' coordinate

Methods


getW()

Returns:
Type
olympe.df.PONumber

getX()

Returns:
Type
olympe.df.PONumber

getY()

Returns:
Type
olympe.df.PONumber

getZ()

Returns:
Type
olympe.df.PONumber

minus(otherVect)

Parameters:
Name Type Description
otherVect olympe.df.PQuaternion
Returns:
Type
olympe.df.PQuaternion

plus(otherVect)

Parameters:
Name Type Description
otherVect olympe.df.PQuaternion
Returns:
Type
olympe.df.PQuaternion

setW(w)

Sets the w coordinate of this quaternion.

Parameters:
Name Type Description
w olympe.df.PONumber | number

the value to set w to


setX(x)

Sets the x coordinate of this quaternion.

Parameters:
Name Type Description
x olympe.df.PONumber | number

the value to set x to


setY(y)

Sets the y coordinate of this quaternion.

Parameters:
Name Type Description
y olympe.df.PONumber | number

the value to set y to


setZ(z)

Sets the z of this quaternion.

Parameters:
Name Type Description
z olympe.df.PONumber | number

the value to set z to


toOString()

Returns:
Type
olympe.df.OString | olympe.df.Proxy

toString()

Gets a string representation of the vector

Returns:
Type
string