![]() |
![]() |
|
![]() |
|||||||||||||
|
Here you can find code releases that contain C++ classes for computer graphics use. Instead of providing a complete library that includes all of these classes, I will have separate code releases 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 will 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. Version InfoAll code releases have major and minor version numbers. For example, version 1.2 indicates major version 1 and minor version 2. Minor additions and bug fixes only change the minor version number. Major version number is incremented when there is a significant change. All versions have backwards compatibility with the previous version that have the same major version number. When the major version changes, backwards compatibility is not guaranteed. Naming ConventionAll file, class and struct names begin with "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 are written in lower case. If the function or variable name is made up of more than one word, each word begins with an upper case letter and the rest of the names use lower case letters. A namespace is defined if you would like to use the classes without the "cy" prefix. Simply include the line using namespace cy; and then you can omit the prefixes. For example, you can use Point3f instead of cyPoint3f. | ||||||||||||||||
| cyPoint | 2D, 3D and 4D point (vector) classes | |||||||||||||||
| code release DOWNLOAD version 1.3 |
These classes are the basic classes of computer graphics. I originally implemented them as template classes, so that you could use both single precision and double precision floating point numbers. However, for most graphics purposes we don't need double precision, so the classes in this code release work with single precision floating point numbers only. They provide almost all the operations that you would need. Let me know if you need some additional general methods. files: cyPoint.hclasses: cyPoint2f, cyPoint3f, cyPoint4f dependencies: none | |||||||||||||||
| cyMatrix | 2x2, 3x3 and 4x4 matrix classes | |||||||||||||||
| code release DOWNLOAD version 1.2 |
This code release has three matrix classes that work with 2D, 3D and 4D points. They all use single precision floating point numbers. files: cyMatrix2.h, cyMatrix3.h, cyMatrix4.hclasses: cyMatrix2f, cyMatrix3f, cyMatrix4f dependencies: cyPoint | |||||||||||||||
| cyQuat | Quaternion class for 3D vectors | |||||||||||||||
| code release DOWNLOAD version 1.0 |
The quaternion class is designed for rotation operations of unit quaternions on 3D vectors. 3x3 and 4x4 matrix conversions are also supported. files: cyQuat.hclasses: cyQuat dependencies: cyPoint, cyMatrix | |||||||||||||||
| cySpatial | Spatial vector algebra classes | |||||||||||||||
| code release DOWNLOAD version 1.0 |
This code release has spatial vector algebra classes intended for the implementation of Featherstone's articulated rigid body dynamics method. Spatial vector algebra uses 6D vectors that keep 3D linear and 3D angular information together. This compact form simplifies certain mathematical operations for rigid-body dynamics. For more information about spatial vector algebra, please visit Roy Featherstone's Spatial Vector Algebra page. files: cySpatial.hclasses: cySpatialVector6f, cySpatialTrans6f, cySpatialMatrix6f dependencies: cyPoint, cyMatrix | |||||||||||||||
| cyCg | Classes to use Cg programs with OpenGL | |||||||||||||||
| code release DOWNLOAD version 1.3 |
Using Cg shaders with OpenGL requires some initializations and sometimes continuous update of parameters. These classes simplify the use of Cg programs with OpenGL. While they provide easy access to Cg functions, they do not introduce any limitation. Especially if you are using many different Cg shaders in your program, you may find these classes very useful. See Using cyCg tutorial in the solutions section for an example use of this code release. files: cyCg.hclasses: cyCgBaseProgram, cyCgProgramContainer dependencies: none external dependencies: nVidia Cg Toolkit | |||||||||||||||
| cyTimer | Timer classes for Windows | |||||||||||||||
| code release DOWNLOAD version 1.0 |
This code release has timer classes that you can use to measure the performance of your code. These classes provide high accuracy time measurements in Windows operating systems. See Easy Performance Analysis in the solutions section for an example use of this code release. files: cyTimer.hclasses: cyTimer, cyTimerStats dependencies: none external dependencies: windows.h | |||||||||||||||
| cyString | String class for char arrays | |||||||||||||||
| code release DOWNLOAD version 1.0 |
This is a general purpose string class, which supports many useful string operations. It has methods for numeric conversions, character and string search, formating, editing, and file operations. files: cyString.hclasses: cyString dependencies: none | |||||||||||||||
| cyHair | Load and save HAIR model files | |||||||||||||||
| code release DOWNLOAD version 1.0 |
A HAIR files is a binary file that keeps hair model data (see HAIR file description for more information). This code release includes a class to handle HAIR files for loading and saving hair model data. See Using HAIR Files in the solutions section for an example use of this code release. files: cyHairFile.hclasses: cyHairFile dependencies: none | |||||||||||||||
| |
||||||||||||||||
![]() |
![]() |
|||||||||||||||