Math and Algorithms
Math helpers:
- Base64 encoder and decoder
- Hashing functions
- Simple geometry math
- CL_Vec - Vector Class
- CL_Mat - Matrix Class
- CL_Point - Point Class
- CL_Size - Size Class
- CL_Rect - Rect Class
- CL_Quad - Quad Class
- CL_Triangle - Triangle Class
- CL_Line - Line Class
- CL_LineSegment - Line Segment Class
- CL_LineRay - Line Ray Class
- Triangulators
These vector classes are available in 4 different dimensions as follows.
CL_Vec1, CL_Vec2, CL_Vec3 and CL_Vec4
These templated classes, are defined and typedef'd as follows: (x denotes the dimension)
char (CL_Vecxc), unsigned char (CL_Vecxuc), short (CL_Vecxs), unsigned short (CL_Vecxus), int (CL_Vecxi), unsigned int (CL_Vecxui), float (CL_Vecxf), double (CL_Vecxd)
All matrices are stored in the Column-Major format (OpenGL native).
These matrix classes are available in 3 different dimensions as follows.
CL_Mat2, CL_Mat3 and CL_Mat4
These templated classes, are defined and typedef'd as follows: (x denotes the dimension)
int (CL_Matxi), float (CL_Matxf), double (CL_Matxd)
These 2d point classes are inherited from the templated class CL_Pointx as follows:
int (CL_Point), float (CL_Pointf), double (CL_Pointd)
These 2d size classes are inherited from the templated class CL_Pointx as follows:
int (CL_Size), float (CL_Sizef), double (CL_Sized)
These 2d rectangle classes are inherited from the templated class CL_Rectx as follows:
int (CL_Rect), float (CL_Rectf), double (CL_Rectd)
These 2d quadrilateral classes are inherited from the templated class CL_Quadx as follows:
int (CL_Quad), float (CL_Quadf), double (CL_Quadd)
These 2d triangle classes are inherited from the templated class CL_Trianglex as follows:
int (CL_Triangle), float (CL_Trianglef), double (CL_Triangled)
These 2d infinite line classes are available in 2 different dimensions as follows.
CL_Line2, CL_Line3
They are inherited from the templated class as follows: (x denotes the dimension)
int (CL_Linex), float (CL_Linexf), double (CL_Linexd)
These 2d line segment classes are available in 2 different dimensions as follows.
CL_LineSegment2, CL_LineSegment3
They are inherited from the templated class as follows: (x denotes the dimension)
int (CL_LineSegmentx), float (CL_LineSegmentxf), double (CL_LineSegmentxd)
These 2d line rays classes are available in 2 different dimensions as follows.
CL_LineRay2, CL_LineRay3
They are inherited from the templated class as follows: (x denotes the dimension)
int (CL_LineRayx), float (CL_LineRayxf), double (CL_LineRayxd)