Procs
func add(left, right: Matrix): Matrix {.inline, ...raises: [], tags: [], forbids: [].}
- Add two matrices Source Edit
func add(q1, q2: Quaternion): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Add two quaternions Source Edit
func add(v1, v2: Vector2): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Add two vectors (v1 + v2) Source Edit
func addValue(q: Quaternion; add: float32): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Add quaternion and float value Source Edit
func addValue(v: Vector2; add: float32): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Add vector and float value Source Edit
func barycenter(p, a, b, c: Vector3): Vector3 {.inline, ...raises: [], tags: [], forbids: [].}
- Compute barycenter coordinates (u, v, w) for point p with respect to triangle (a, b, c) NOTE: Assumes P is on the plane of the triangle Source Edit
func clampValue(v: Vector2; min, max: float32): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Clamp the magnitude of the vector between two min and max values Source Edit
func clampValue(v: Vector3; min, max: float32): Vector3 {.inline, ...raises: [], tags: [], forbids: [].}
- Clamp the magnitude of the vector between two values Source Edit
func crossProduct(v1, v2: Vector3): Vector3 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate two vectors cross product Source Edit
func determinant(mat: Matrix): float32 {.inline, ...raises: [], tags: [], forbids: [].}
- Compute matrix determinant Source Edit
func distance(v1, v2: Vector2): float32 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate distance between two vectors Source Edit
func distanceSqr(v1, v2: Vector2): float32 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate square distance between two vectors Source Edit
func distanceSqr(v1, v2: Vector3): float32 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate square distance between two vectors Source Edit
func distanceSqr(v1, v2: Vector4): float32 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate square distance between two vectors Source Edit
func divide(q1, q2: Quaternion): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Divide two quaternions Source Edit
func divide(v1, v2: Vector2): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Divide vector by vector Source Edit
func dotProduct(v1, v2: Vector2): float32 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate two vectors dot product Source Edit
func dotProduct(v1, v2: Vector3): float32 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate two vectors dot product Source Edit
func dotProduct(v1, v2: Vector4): float32 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate two vectors dot product Source Edit
func equals(p, q: Quaternion; tol = 0.000001'f32): bool {.inline, ...raises: [], tags: [], forbids: [].}
- Check whether two given quaternions are almost equal Source Edit
func equals(p, q: Vector2; tol = 0.000001'f32): bool {.inline, ...raises: [], tags: [], forbids: [].}
- Check whether two given vectors are almost equal Source Edit
func equals(p, q: Vector3; tol = 0.000001'f32): bool {.inline, ...raises: [], tags: [], forbids: [].}
- Check whether two given vectors are almost equal Source Edit
func fromAxisAngle(axis: Vector3; angle: float32): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Get rotation quaternion for an angle and axis NOTE: Angle must be provided in radians Source Edit
func fromEuler(pitch, yaw, roll: float32): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Get the quaternion equivalent to Euler angles NOTE: Rotation order is ZYX Source Edit
func fromMatrix(mat: Matrix): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Get a quaternion for a given rotation matrix Source Edit
func fromVector3ToVector3(from, to: Vector3): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate quaternion based on the rotation from one vector to another Source Edit
func identity(_: typedesc[Quaternion]): Quaternion {.inline.}
- Get identity quaternion Source Edit
func invert(mat: Matrix): Matrix {.inline, ...raises: [], tags: [], forbids: [].}
- Invert provided matrix Source Edit
func invert(q: Quaternion): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Invert provided quaternion Source Edit
func invert(v: Vector2): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Invert the given vector Source Edit
func length(q: Quaternion): float32 {.inline, ...raises: [], tags: [], forbids: [].}
- Computes the length of a quaternion Source Edit
func length(v: Vector2): float32 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate vector length Source Edit
func lengthSqr(v: Vector2): float32 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate vector square length Source Edit
func lerp(q1, q2: Quaternion; amount: float32): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate linear interpolation between two quaternions Source Edit
func lerp(start, end, amount: float32): float32 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate linear interpolation between two floats Source Edit
func lerp(v1, v2: Vector2; amount: float32): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate linear interpolation between two vectors Source Edit
func max(v1, v2: Vector2): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Get max value for each pair of components Source Edit
func min(v1, v2: Vector2): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Get min value for each pair of components Source Edit
func moveTowards(v, target: Vector2; maxDistance: float32): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Move Vector towards target Source Edit
func moveTowards(v, target: Vector3; maxDistance: float32): Vector3 {.inline, ...raises: [], tags: [], forbids: [].}
- Move Vector towards target Source Edit
func moveTowards(v, target: Vector4; maxDistance: float32): Vector4 {.inline, ...raises: [], tags: [], forbids: [].}
- Move Vector towards target Source Edit
func multiply(left, right: Matrix): Matrix {.inline, ...raises: [], tags: [], forbids: [].}
- Get two matrix multiplication NOTE: When multiplying matrices... the order matters! Source Edit
func multiply(q1, q2: Quaternion): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate two quaternion multiplication Source Edit
func multiply(v1, v2: Vector2): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Multiply vector by vector Source Edit
func negate(v: Vector2): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Negate vector Source Edit
func nlerp(q1, q2: Quaternion; amount: float32): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate slerp-optimized interpolation between two quaternions Source Edit
func normalize(q: Quaternion): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Normalize provided quaternion Source Edit
func normalize(v: Vector2): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Normalize provided vector Source Edit
func normalize(v: Vector3): Vector3 {.inline, ...raises: [], tags: [], forbids: [].}
- Normalize provided vector Source Edit
func orthoNormalize(v1: var Vector3; v2: var Vector3) {.inline, ...raises: [], tags: [], forbids: [].}
- Orthonormalize provided vectors Makes vectors normalized and orthogonal to each other Gram-Schmidt function implementation Source Edit
func perpendicular(v: Vector3): Vector3 {.inline, ...raises: [], tags: [], forbids: [].}
- Calculate one vector perpendicular vector Source Edit
func perspective(fovy, aspect, nearPlane, farPlane: float): Matrix {.inline, ...raises: [], tags: [], forbids: [].}
- Get perspective projection matrix NOTE: Fovy angle must be provided in radians Source Edit
func refract(v, n: Vector2; r: float32): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Compute the direction of a refracted ray v: normalized direction of the incoming ray n: normalized normal vector of the interface of two optical media r: ratio of the refractive index of the medium from where the ray comes to the refractive index of the medium on the other side of the surface Source Edit
func rotateByAxisAngle(v, axis: Vector3; angle: float32): Vector3 {.inline, ...raises: [], tags: [], forbids: [].}
- Rotates a vector around an axis Source Edit
func rotateByQuaternion(v: Vector3; q: Quaternion): Vector3 {.inline, ...raises: [], tags: [], forbids: [].}
- Transform a vector by quaternion rotation Source Edit
func scale(q: Quaternion; mul: float32): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Scale quaternion by float value Source Edit
func scale(v: Vector2; scale: float32): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Scale vector (multiply by value) Source Edit
func scale(v: Vector3; scalar: float32): Vector3 {.inline, ...raises: [], tags: [], forbids: [].}
- Multiply vector by scalar Source Edit
func slerp(q1, q2: Quaternion; amount: float32): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Calculates spherical linear interpolation between two quaternions Source Edit
func subtract(left, right: Matrix): Matrix {.inline, ...raises: [], tags: [], forbids: [].}
- Subtract two matrices (left - right) Source Edit
func subtract(q1, q2: Quaternion): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Subtract two quaternions Source Edit
func subtract(v1, v2: Vector2): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Subtract two vectors (v1 - v2) Source Edit
func subtractValue(q: Quaternion; sub: float32): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Subtract quaternion and float value Source Edit
func subtractValue(v: Vector2; sub: float32): Vector2 {.inline, ...raises: [], tags: [], forbids: [].}
- Subtract vector by float value Source Edit
func subtractValue(v: Vector3; sub: float32): Vector3 {.inline, ...raises: [], tags: [], forbids: [].}
- Subtract vector by float value Source Edit
func subtractValue(v: Vector4; sub: float32): Vector4 {.inline, ...raises: [], tags: [], forbids: [].}
- Subtract Vector4 and float value Source Edit
func toAxisAngle(q: Quaternion; outAxis: var Vector3; outAngle: var float32) {. inline, ...raises: [], tags: [], forbids: [].}
- Get the rotation angle and axis for a given quaternion Source Edit
func toEuler(q: Quaternion): Vector3 {.inline, ...raises: [], tags: [], forbids: [].}
- Get the Euler angles equivalent to quaternion (roll, pitch, yaw) NOTE: Angles are returned in a Vector3 struct in radians Source Edit
func toMatrix(q: Quaternion): Matrix {.inline, ...raises: [], tags: [], forbids: [].}
- Get a matrix for a given quaternion Source Edit
func transform(q: Quaternion; mat: Matrix): Quaternion {.inline, ...raises: [], tags: [], forbids: [].}
- Transform a quaternion given a transformation matrix Source Edit