F# 3D Math Library for realtime applications
An F# 3D math library that can be used to make 3D games and applications. FsMath3D uses OpenGL GLSL semantics and conventions, so it's easier to interface with OpenGL and OpenGL ES.
The Matrices are written in Column major order (GLSL default). This means that the matrix:
has the following layout in memory: [| m0 m1 m2 m3 m4 m5 m6 m7 m8 |]
The FsMath3D is composed of several modules:
-
vec2, vec3, vec4
: 2D, 3D and 4D single precision floating point vectors (32 bits per component)ivec2, ivec3, ivec4
: 2D, 3D and 4D signed integer vectors (32 bits per component)color4
: rgba color with single precision floating point components
-
Matrix: Contains
mat2, mat3, mat4
: 2x2, 3x3 and 4x4 single precision floating point matrices (32 bits per component) -
Quaternion: For the
quat
type: a quaternion with 4 single precision floating point components. -
Transform: GLU equivalent functions to transform vectors or create transformation matrices.
-
Geometry: Geometric primitives:
size2
: 2D size structure (single precision floating point components)isize2
: 2D size structure (signed int components)tri16, tri32
: vertices indices (16 bits unsigned short integer and 32 bit unsigned integer respectively)rect2
: 2D rectangle (single precision floating point components)irect2
: 2D rectangle (signed integer components)ray3
: 3D ray (single precision floating point components)plane
: 3D plane (single precision floating point components)tri3
: 3D triangle with 3vec3
to represent vertices.
-
Queries: Intersection and proximity geometric query functions.
New BSD license (compatible with commercial and opensource applications)