default
tkmath
tkmathtkmath.Vector3fadd(Vector3f v) - Add another vector v to this instance
add3f(float tx, ty, tz) - Translate x / y / z components
addf(float v) - Add scalar value to all components
bilinearQuadPos() - Calc interpolated quad position from normalized (0..1) coordinates (0;0=left/top)
clamp(float l) - Clamp to length
cross(Vector3f v) : Vector3f - Calculate cross product from this instance and v
distanceToPlane(Vector3f q, n) : float - Calc distance of vertex to plane defined by Vector3f q (on plane) and plane normal n
distanceToSphere(Vector3f p, float radius) : float - Calc distance of vertex to sphere defined by Vector3f p (sphere center) and sphere radius.
divz() - Divide by Z and return (2D) Vector2f
dot(Vector3f v) : float - Calculate scalar 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)
getX() : float - Get value of x element
getXy() : float - Get xy vector
getXz() : float - Get xz vector
getY() : float - Get value of y element
getYx() : float - Get yx vector
getZ() : float - Get value of z element
init(float x, y, z) - Initialize vector from scalars
initScalef(Vector3f v, float s) - Initialize vector to s*v
intersectPlane(Vector3f q, n, p1, p2) : boolean - Calc intersection between line (p1->p2) and plane (q,n).
isWithinSphere(Vector3f p, float radiusSquared) : boolean - Check if vertex is located within sphere defined by Vector3f p (sphere center) and squared sphere radius 'radiusSquared'.
lerp(Vector3f o) - Linear interpolate to another vector
mul(Vector3f v) - Multiply the x element of this instance by the x element of v and do the same with the y and z element
mul3f(float sx, sy, sz) - Scale x / y / z components
mulf(float v) - Multiply this instance by scalar value v
New(float x, y, z) : Vector3f - Initialize and return new Vector3f instance
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(Vector3f v) - Substract another vector v from this instance
tensor(Vector3f v) : Matrix3f - Create resulting matrix of tensor product from this instance and v
transform(Matrix m) - Multiply matrix by this vector.
triple(Vector3f b, c) : float - Calculate triple product this.dot(b.cross(c)) (a*(bxc))
unit() - Scale vector to length 1 if possible
unitScale(float s) - Set length to s
unitSphere() - Map to point on sphere Method add | |||||
Add another vector v to this instance | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method add3f | ||||||||||||||||||||
Translate x / y / z components | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
|
Method addf | |||||
Add scalar value to all components | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method bilinearQuadPos | |||
Calc interpolated quad position from normalized (0..1) coordinates (0;0=left/top) | |||
Signature | |||
|
Method clamp | |||||
Clamp to length | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method cross | ||||
Calculate cross product from this instance and v | ||||
Signature | ||||
Arguments | ||||
| ||||
Returns | ||||
|
Method distanceToPlane | |||
Calc distance of vertex to plane defined by Vector3f q (on plane) and plane normal n | |||
Signature | |||
Arguments | |||
Returns | |||
|
Method distanceToSphere | ||||||||||||||||||||
Calc distance of vertex to sphere defined by Vector3f p (sphere center) and sphere radius. | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Returns | ||||||||||||||||||||
| ||||||||||||||||||||
Method divz | |||
Divide by Z and return (2D) Vector2f | |||
Signature | |||
|
Method dot | ||||||||||
Calculate scalar 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) | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getX | |||||
Get value of x element | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getXy | |||||
Get xy vector | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getXz | |||||
Get xz vector | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getY | |||||
Get value of y element | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getYx | |||||
Get yx vector | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method getZ | |||||
Get value of z element | |||||
Signature | |||||
| |||||
Returns | |||||
|
Method init | ||||||||||||||||||||
Initialize vector from scalars | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
|
Method initScalef | |||||||||||||||
Initialize vector to s*v | |||||||||||||||
Signature | |||||||||||||||
| |||||||||||||||
Arguments | |||||||||||||||
|
Method intersectPlane | |||
Calc intersection between line (p1->p2) and plane (q,n). | |||
Signature | |||
Arguments | |||
Returns | |||
|
Method isWithinSphere | ||||||||||||||||||||
Check if vertex is located within sphere defined by Vector3f p (sphere center) and squared sphere radius 'radiusSquared'. | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
| ||||||||||||||||||||
Returns | ||||||||||||||||||||
| ||||||||||||||||||||
Method lerp | |||||
Linear interpolate to another vector | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method mul | |||||
Multiply the x element of this instance by the x element of v and do the same with the y and z element | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method mul3f | ||||||||||||||||||||
Scale x / y / z components | ||||||||||||||||||||
Signature | ||||||||||||||||||||
| ||||||||||||||||||||
Arguments | ||||||||||||||||||||
|
Method mulf | |||||
Multiply this instance by scalar value v | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method New | |||||||||||||||||||||||||
Initialize and return new Vector3f instance | |||||||||||||||||||||||||
Signature | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Arguments | |||||||||||||||||||||||||
| |||||||||||||||||||||||||
Returns | |||||||||||||||||||||||||
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 transform | |||||
Multiply matrix by this vector. | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method triple | |||
Calculate triple product this.dot(b.cross(c)) (a*(bxc)) | |||
Signature | |||
Arguments | |||
Returns | |||
| |||
Description | |||
ærg b second parameter of triple product arg c third parameter of triple product |
Method unit | |||
Scale vector to length 1 if possible | |||
Signature | |||
|
Method unitScale | |||||
Set length to s | |||||
Signature | |||||
| |||||
Arguments | |||||
|
Method unitSphere | |||
Map to point on sphere | |||
Signature | |||
| |||
Description | |||
http://mathproofs.blogspot.com/2005/07/mapping-cube-to-sphere.html via https://youtu.be/sLqXFF8mlEU |
auto-generated by "DOG", the TkScript document generator. Thu, 11/Dec/2025 13:42:00