default
tkmath
tkmath
tkmath.Vector4f
add(Vector4f v)
- Add another vector v to this instance
dot(Vector4f v) : float
- Calculate dot product from this instance and v
getAbs() : float
- Return length of vector
getAbsSqr() : float
- Return squared length of vector
getString() : String
- Get string representation of vector (x, y, z, w)
getW() : float
- Get value of w element
getX() : float
- Get value of x element
getY() : float
- Get value of y element
getZ() : float
- Get value of z element
init(float a, b, c, d)
- Initialise values to x=a, y=b, z=c and w=d
initScalef(Vector4f v, float s)
- Initialise vector to s*v
mul(Vector4f v)
- Multiply the x element of this instance with the x element of v and do the same with the y, z and w elements
mulf(float v)
- Multiply this instance with scalar value v
New(float a, b, c, d) : Vector4f
- Initialise and return new Vector4f instance with x=a, y=b, z=c and w=d
rotate(Matrix4f m)
- Multiply matrix by this vector and replace this vector by the result
setW(float a)
- Set w element to a
setX(float a)
- Set x element to a
setY(float a)
- Set y element to a
setZ(float a)
- Set z element to a
sub(Vector4f v)
- Substract another vector v from this instance
tensor(Vector4f v) : Matrix4f
- Create resulting matrix of tensor product from this instance and v
unit()
- Set length to 1
unitScale(float s)
- Set length to sMethod add | |||||
Add another vector v to this instance | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method dot | ||||||||||
Calculate dot product from this instance and v | ||||||||||
Signature | ||||||||||
| ||||||||||
Arguments | ||||||||||
| ||||||||||
Returns | ||||||||||
|
Method getAbs | |||||
Return length of vector | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getAbsSqr | |||||
Return squared length of vector | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getString | |||||
Get string representation of vector (x, y, z, w) | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getW | |||||
Get value of w element | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getX | |||||
Get value of x element | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getY | |||||
Get value of y element | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getZ | |||||
Get value of z element | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method init | |||||||||||||||||||||||||
Initialise values to x=a, y=b, z=c and w=d | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
|
Method initScalef | |||||||||||||||
Initialise vector to s*v | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
|
Method mul | |||||
Multiply the x element of this instance with the x element of v and do the same with the y, z and w elements | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method mulf | |||||
Multiply this instance with scalar value v | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method New | ||||||||||||||||||||||||||||||
Initialise and return new Vector4f instance with x=a, y=b, z=c and w=d | ||||||||||||||||||||||||||||||
Signature | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Arguments | ||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||
Returns | ||||||||||||||||||||||||||||||
Method rotate | |||||
Multiply matrix by this vector and replace this vector by the result | |||||
Signature | |||||
| |||||
Arguments | |||||
| |||||
Description | |||||
This is a convenience method to remove the need for temporary Vector4f variables in scripts (the temporary is created on the stack instead). |
Method setW | |||||
Set w element to a | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setX | |||||
Set x element to a | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setY | |||||
Set y element to a | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method setZ | |||||
Set z element to a | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method sub | |||||
Substract another vector v from this instance | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method tensor | ||||
Create resulting matrix of tensor product from this instance and v | ||||
Signature | ||||
Arguments | ||||
| ||||
Returns | ||||
|
Method unit | |||
Set length to 1 | |||
Signature | |||
|
Method unitScale | |||||
Set length to s | |||||
Signature | |||||
| |||||
Arguments | |||||
|
auto-generated by "DOG", the TkScript document generator. Mon, 28/Dec/2015 13:15:54