Module rs_math3d Copy item path Source basis Coordinate basis and reference frame utilities. matrix Matrix mathematics module providing 2x2, 3x3, and 4x4 matrices. primitives Geometric primitives for 3D graphics and collision detection. quaternion queries scalar Scalar trait definitions for generic numeric operations. transforms 3D transformation functions for computer graphics. vector Vector mathematics module providing 2D, 3D, and 4D vector operations. Basis A 3D coordinate basis (reference frame). Box3 A 3D axis-aligned bounding box (AABB). Dimension A 2D dimension with width and height. Line An infinite line in 2D or 3D space. Matrix2 A 2x2 matrix stored in column-major order. Matrix3 A 3x3 matrix stored in column-major order. Matrix4 A 4x4 matrix stored in column-major order. ParametricPlane Parametric Plane Plane Plane Quat Ray A ray with an origin and direction. Rect A 2D axis-aligned rectangle. Segment A line segment with defined start and end points. Sphere3 Sphere3 Tri3 Triangle Vector2 Vector3 Vector4 BasisPlane Represents one of the three coordinate planes. CrossProduct Trait for computing the cross product of 3D vectors. Distance Query Traits FloatScalar Trait for floating-point scalars with transcendental functions. FloatVector Trait for vectors with floating-point components. Intersect Intersection Scalar Core scalar trait for numeric types used in the library. Swizzle2 Trait for 2D swizzle operations on vectors. Swizzle3 Trait for 3D swizzle operations on vectors. Vector Generic vector trait defining common vector operations. basis_from_unit Building an Orthonormal Basis from a Unit Vector
John. F. Hughes & Thomas Moller
Journal of Graphics Tools, 4:4, 33-35 (DOI: 10.1080/10867651.1999.10487513) color4b decompose Decomposes a transformation matrix into scale, rotation, and translation. frustum Creates a perspective projection matrix from frustum bounds. lookat Creates a view matrix looking from eye position to target. ortho4 Creates an orthographic projection matrix. perspective Creates a perspective projection matrix. project3 Projects a 3D point to screen coordinates. quad_normal Computes the normal vector of a quadrilateral. rotation_from_axis_angle Creates a 4x4 rotation matrix from an axis and angle. rotation_from_quat Creates a 4x4 rotation matrix from a quaternion. scale Creates a 4x4 scaling matrix. shortest_segment3d_between_lines3d Finds the shortest segment connecting two 3D lines. transform_vec3 Transforms a 3D vector by a 4x4 matrix with perspective division. translate Creates a 4x4 translation matrix. tri_normal Tri unproject3 Unprojects screen coordinates back to 3D world space. Basisd Basisf Box3d 3D double-precision axis-aligned bounding box. Box3f 3D single-precision axis-aligned bounding box. Color4b 4-component byte color (RGBA). Dimensionf Single-precision dimensions. Dimensioni Integer dimensions. Line2d 2D double-precision line. Line2f 2D single-precision line. Line3d 3D double-precision line. Line3f 3D single-precision line. Mat2d 2x2 double-precision matrix. Mat2f 2x2 single-precision matrix. Mat3d 3x3 double-precision matrix. Mat3f 3x3 single-precision matrix. Mat4d 4x4 double-precision matrix. Mat4f 4x4 single-precision matrix. ParametricPlaned ParametricPlanef Planed Double-precision plane. Planef Single-precision plane. Quatd Double-precision quaternion. Quatf Single-precision quaternion. Ray3d 3D double-precision ray. Ray3f 3D single-precision ray. Rectd Double-precision rectangle. Rectf Single-precision rectangle. Recti Integer rectangle. Segment2d 2D double-precision line segment. Segment2f 2D single-precision line segment. Segment3d 3D double-precision line segment. Segment3f 3D single-precision line segment. Vec2d 2D double-precision float vector. Vec2f 2D single-precision float vector. Vec2i 2D integer vector. Vec3d 3D double-precision float vector. Vec3f 3D single-precision float vector. Vec3i 3D integer vector. Vec4d 4D double-precision float vector. Vec4f 4D single-precision float vector. Vec4i 4D integer vector.