Std geom vec3
std:std.geom.Vec3
Struct Vec3
The generic Vec3 type provides support for 3 component vectors.
Unless otherwise noted, methods and operators always return a new vec3 containing the result, without modifying any parameters or 'self'.
This allows you to chain operators together easily just like 'real' expressions.
Fields |
|
x |
The vector x coordinate. |
y |
The vector y coordinate. |
z |
The vector z coordinate. |
Properties |
|
Length |
Returns the length of the vec3. (read only) |
Pitch |
Returns the pitch of the vec3. (read only) |
X |
The X coordinate of the vec3. |
XY |
The XY components of the vec3 as a vec2. |
XZ |
The XZ components of the vec3 as a vec2. |
Y |
The Y coordinate of the vec3. |
YZ |
The YZ components of the vec3 as a vec2. |
Yaw |
Returns the yaw of the vec3. (read only) |
Z |
The X coordinate of the vec3. |
Methods |
|
Operator * |
Multiplies the vec3 by another vec3. |
Operator + |
Adds the vec3 to another vec3. |
Operator - |
Negates the vec3. |
Operator / |
Divides the vec3 by another vec3. |
Blend |
Blends the vec3 with another vec3. |
Cross |
Returns the cross product of the vec3 with another vec3. |
Distance |
Returns the distance of the vec to another vec3. |
Dot |
Returns the dot product of the vec3 with another vec3. |
Normalize |
Normalizes the vec3. |
To |
Converts the vec3 to a vec3 of a different type or a printable string. |