Here you can find light-weight code releases that contain C++ classes for computer graphics use. The code releases only include header files, so no pre-compilation is needed. They only use standard C++ libraries, so there are no external dependancies, unless otherwise noted.
Instead of providing a complete library that includes all of these classes, I keep code releases separate for each component, so that you can just download the parts that you need. I believe this approach makes it easier for you to use them. I try to keep code releases as simple and as small as possible, therefore some of the code releases may need some previous code releases to compile. Please check the requirements list of the code release that you are interested in. If you have any problems with the code, documentation or usability, please let me know.
Code releases are provided in C++ header form. They only use standard C++ libraries and they do NOT have any external dependencies, unless otherwise specified. Some code releases depend on other code releases, as indicated.
All source code in cyCodeBase is released under the simple and permissive MIT license, which allows code modifications and commercial use.
All file names begin with "cy" prefix. All classes and structs are defined in namespace cy. Most classes and structs are also defined outside of the namespace cy with an additional "cy" prefix. All constants begin with "CY_", and all internal constants begin with "_CY_". All functions and class methods begin with an upper-case letter. All variable names begin with a lower-case letter. If the function or variable name is made up of more than one word, each secondary word begins with an upper case letter, and the rest of the function and variable names use lower-case letters.
All source files are on a GIT repository for easy access and updates. They can be accessed on github.
Core Functions and Macros
2D, 3D, 4D, and N-Dimensional point (vector) classes
templatesPoint, Point2, Point3, Point4
Using <float>: Point2f, Point3f, Point4f
Using <double>: Point2d, Point3d, Point4d
2D, 3D, and N-Dimensional integer point classescyPoint release, these classes overload bitwise operations. These classes can be converted to and from the classes in the cyPoint release.
templatesIPoint, IPoint2, IPoint3, IPoint4,
Using <int8_t>: IPoint2b, IPoint3b, IPoint4b,
Using <uint8_t>: IPoint2ub, IPoint3ub, IPoint4ub,
Using <int16_t>: IPoint2s, IPoint3s, IPoint4s,
Using <uint16_t>: IPoint2us, IPoint3us, IPoint4us,
Using <int32_t>: IPoint2i, IPoint3i, IPoint4i,
Using <uint32_t>: IPoint2ui, IPoint3ui, IPoint4ui,
Using <int64_t>: IPoint2l, IPoint3l, IPoint4l,
Using <uint64_t>: IPoint2ul, IPoint3ul, IPoint4ul,
2x2, 3x3, 3x4, and 4x4 matrix classes
templatesMatrix2, Matrix3, Matrix34, Matrix4
Using <float>: Matrix2f, Matrix3f, Matrix34f, Matrix4f
Using <double>: Matrix2d, Matrix3d, Matrix34d, Matrix4d
Color classes with 3/4 8-bit/32-bit components
classesColor, ColorA, Color24, Color32
Triangular mesh class
Bounding Volume Hierarchy
dependenciesnone, but can also be used with cyTriMesh
Quaternion class for 3D vectors
Using <float>: Quatf,
Using <double>: Quatd,
dependenciescyCore, cyPoint, cyMatrix
Points in k-d trees
Generic PointCloud2, PointCloud3, PointCloud4, PointCloudN,
Using <float>: PointCloud2f, PointCloud3f, PointCloud4f, PointCloudNf,
Using <double>: PointCloud2d, PointCloud3d, PointCloud4d, PointCloudNd,
dependenciesnone, but can also be used with cyPoint
Heap structure with random access
Weighted Sample Eliminationweighted sample elimination algorithm for generating Poisson Disk sample sets in any dimensions.
Lighting Grid HierarchyLighting Grid Hierarchy method for efficiently handling many lights.
dependenciescyPoint, cyIPoint, cyColor, cyPointCloud
Spatial vector algebra classesRoy Featherstone's Spatial Vector Algebra page.
templatesSpatialVector6, SpatialTrans6, SpatialMatrix6
Using <float>: SpatialVector6f, SpatialTrans6f, SpatialMatrix6f
Using <double>: SpatialVector6d, SpatialTrans6d, SpatialMatrix6d