SolidKit Library Documentation

From Solid Graphics Wiki

(Difference between revisions)
Jump to: navigation, search
m
Current revision (00:55, 6 October 2009) (edit) (undo)
(Replacing page with 'For information about using the SolidKit Library with '''C++''', see SolidKit Library Documentation for C++. For information about using the SolidKit Library with ...')
 
(One intermediate revision not shown.)
Line 1: Line 1:
-
The [[SolidKit Library]] is a programming library for development of 3D/2D graphics applications in C++ for Microsoft Windows family of operating systems using [[OpenGL]] and [[MFC]] (although using the MFC is optional). The library is a commercial product distributed under terms of proprietary [[SolidKit Library License Agreements|license]].
+
For information about using the [[SolidKit Library]] with '''C++''', see [[SolidKit Library Documentation for C++]].
-
 
+
-
This article contains information about classes and types provided by the ''SolidKit Library'' and other information useful for software development with the library.
+
-
 
+
-
== Application Examples ==
+
-
 
+
-
Perhaps the most efficient way to learn the library capabilities and to learn how to use them - is to run [[SolidKit Library sample projects|sample library programs]] and to review their source code. The sample programs and their source code are included with all library packages including the [[SolidKit Library Demo]].
+
-
 
+
-
See '''[[SolidKit Library sample projects|this article]]''' for more information about the ''SolidKit Library'' sample projects.
+
-
 
+
-
== Namespaces ==
+
-
 
+
-
The ''SolidKit Library'' classes, structures and variables are defined in [[SKL namespace]] and [[SKL3D namespace]]. The ''SKL namespace'' contains generic purpose types, the ''SKL3D namespace'' contains 3D related types.
+
-
 
+
-
== Classes ==
+
-
 
+
-
This section contains refence of most important ''SolidKit Library'' classes and structure types. The classes which provide most of the library features are highlighted by bold type.
+
-
 
+
-
=== View Navigation and Objects Manipulation ===
+
-
 
+
-
{{class list begin}}
+
-
{{class list bold row | Window3D class | The class provides 3D view window functionality with view navigation and scene objects manipulation using mouse and keyboard. }}
+
-
{{class list bold row | ObjectPosInfo struct | Provides information about scene object position and orientation. }}
+
-
{{class list row | ObjectPosInfoList class | Provides information about position and orientation of a scene object which is part of a larger object hierarchy. }}
+
-
{{class list bold row | ObjectEditOptions struct | Allows to specify editing/manipulation options for a 3D object to the [[Window3D class]] instance, such as to restrict the object movement into plane, or the object rotation to rotation around specified axis only. }}
+
-
{{class list bold row | CommandTrigger class | This class allows keyboard/mouse shortcuts customization. It triggers commands start/end events based on keyboard or mouse input. }}
+
-
{{class list row | Camera struct | Retresent camera parameters, such us "camera eye" position, [[target position]], [[up direction]], [[view angle]]. }}
+
-
{{class list row | Window3DDefaults struct | Defines default settings for many of the [[Window3D class]] settings. }}
+
-
{{class list row | ViewControlInfo struct | Specifies group of parameters for [[Window3D class]], such as mouse sensitivity, selection options, floor navigation settings. }}
+
-
{{class list row | ViewMovementInfo struct | Specifies group of parameters, such as rotation speed or pan speed, for [[Window3D class]] which affect view navigation and scene object manipulation when using keyboard shortcuts. }}
+
-
{{class list end}}
+
-
 
+
-
=== Constructive Solid Geometry ===
+
-
 
+
-
{{class list begin}}
+
-
{{class list bold row | CSGOperation class | The class provides [[constructive solid geometry]] functionality for [[triangle mesh]]es using [[float]] precision. }}
+
-
{{class list bold row | CSGOperationd class | The class provides [[constructive solid geometry]] functionality for [[triangle mesh]]es using [[double]] precision. }}
+
-
{{class list end}}
+
-
 
+
-
=== Basic 3D Data Types ===
+
-
 
+
-
{{class list begin}}
+
-
{{class list bold row | Point class | Specifies a (x, y, z) location in 3D space using [[float]] precision }}
+
-
{{class list bold row | PointList class | [[List]] of [[point class]] objects. }}
+
-
{{class list row | Vector class | Specifies (x, y, z) direction in 3D space and size using [[float]] precision }}
+
-
{{class list row | VectorList class | [[List]] of [[vector class]] objects. }}
+
-
{{class list bold row | TriangleByRef class | Specifies a triangle using three reference indexes into a [[PointList class]] object. }}
+
-
{{class list bold row | TriangleByRefList class | [[List]] of [[TriangleByRef]] objects. }}
+
-
{{class list bold row | Shape class | This class holds a [[PointList class]] and [[TriangleByRefList class]] instance instance, specifying a [[triangle mesh]]. }}
+
-
{{class list row | BoundingBox class | Defines axis aligned box. This class can be used to effectively represent approximate boundary of a 3D object, such as a [[Shape]] object. }}
+
-
{{class list row | Matrix3x3f class | Represents a 3x3 matrix of [[float]] values. A 3x3 matrices can be used to provide rotation-only [[point]] or [[vector]] coordinates transformations. }}
+
-
{{class list row | Matrix4x4f class | Represents a 4x4 matrix of [[float]] values. A 4x4 matrices can be used to provide translation & rotation [[point]] or [[vector]] coordinates transformations between two coordinate systems. }}
+
-
{{class list row | SpatialIndex class | Provides spatial sorting of 3D objects in 3D space using [[octtree]]. It can be used for example for purposes of efficient collision detection between 3D objects, of for spatial queries, like "find me all 3D objects in my camera view" }}
+
-
{{class list row | Triangle class | Specifies a triangle using three [[Point class]] objects. }}
+
-
{{class list row | TriangleList class | [[List]] of [[Triangle class]] objects. }}
+
-
{{class list row | Plane class | Defines a plane. }}
+
-
{{class list row | LineSegment class | Instance of the class defines a line segment by providing [[point]] coordinates of it's two endpoints. }}
+
-
{{class list row | LineSegmentByRef class | Defines a line segment by providing indexes to a [[PointList]] of it's two endpoints. }}
+
-
<!--
+
-
{{class list row | PolyLine class | Instance of the class defines sequence of line segments, where each linesegment's endpoint (except for last segment) is startpoint of the next line segment. }}
+
-
{{class list row | PolyLineByRef class | The same as [[PolyLine class]] except that instead of holding point coordinates the class provides their indexes in a [[PointList]]. }}
+
-
{{class list row | PolyLineByRefList class | [[List]] of [[PolyLineByRef class]] objects. }}
+
-
{{class list row | Polygon class | Polygon is a [[PolyLine]] which startpoint of it's first line segment is identical to endpoint of the last line segment. }}
+
-
{{class list row | PolygonByRef class | The same as [[Polygon class]] except that instead of providing point coordinates the class provides their indexes in a [[PointList]]. }}
+
-
-->
+
-
{{class list end}}
+
-
 
+
-
=== OpenGL drawing and rendering support classes ===
+
-
 
+
-
{{class list begin}}
+
-
{{class list row | Color class | Red, green, blue alpha color values using [[float]] precision. }}
+
-
{{class list row | Material class | Ths class defines ambient, diffuse and specular material properties. }}
+
-
{{class list row | MaterialList class | [[List]] of [[Material class]] objects. }}
+
-
{{class list row | Texture class | Class provides functionality of loading texture image from JPEG, PNG, GIF or BMP files, and allows to use it in [[OpenGL]] renders. }}
+
-
{{class list row | Font class | Texture based font for using in [[OpenGL]] renders. }}
+
-
{{class list row | LightProperties struct | The LightProperties struct defines ambient, diffuse and specular and other light properties which can be used to define lights in [[OpenGL]]. }}
+
-
{{class list end}}
+
-
 
+
-
=== Generic helpers and utility classes ===
+
-
 
+
-
{{class list begin}}
+
-
{{class list bold row | Image class | The class allows to load/save image data from/to JPEG, PNG, GIF or BMP files. }}
+
-
{{class list row | MemoryBuffer class | The class allows to cache chunk of binary data. }}
+
-
{{class list row | String class | Dynamic-size text string class. }}
+
-
{{class list row | StringList class | List of [[String class]] objects. }}
+
-
{{class list row | File class | Helper class for working with files. }}
+
-
{{class list row | Guid class | Provides functions for generating and working with 128-bit globally unique identifiers. }}
+
-
{{class list row | XmlReader class | Provides function for parsing and reading XML files content. }}
+
-
{{class list end}}
+
-
 
+
-
== Templates ==
+
-
 
+
-
The ''SolidKit Library'' makes extensive use of list and dictionary [[templates]]. The reason why the library does not use similar templates available in STL, MFC, or ATL - is that the ''SolidKit'' templates are tailored for algorithms used in the library (for performance reasons - especially for [[CSG]] algorigms). Other advantage is that the library code is more portable. Also we think that our templates are easier to use than corresponding templates available for example is STL.
+
-
 
+
-
{{class list begin}}
+
-
{{class list bold row | List template | A [[C++ template|template]] for making dynamic-size one-dimensional arrays. }}
+
-
{{class list bold row | Dictionary template | A [[C++ template|template]] for making dynamic-size key to value dictionaries. }}
+
-
{{class list end}}
+
-
 
+
-
== Functions ==
+
-
 
+
-
=== Geometry math functions ===
+
-
 
+
-
{{function list begin}}
+
-
{{function list row | TrianglesIntersect | Determines whether two [[triangle]]s intersects. }}
+
-
{{function list row | ClosestLinePoints | Calculates positions and coordinates of closest points of two [[line]]s. }}
+
-
{{function list row | ClosestLinePointPosition | Calculates position of a point lying on a specified [[line]] closest to a specified point. }}
+
-
{{function list row | ClosestLineSegmentPoints | Calculats positions and coordinates of closest points of two [[line segment]]s. }}
+
-
{{function list row | LinePositionToPoint | Translates point's position on a [[line]] to the point coordinates. }}
+
-
{{function list row | PointOnLinePosition | Calculates position on a [[line]] from given [[point]] coordinates. }}
+
-
{{function list row | LineTriangleIntersection | Calculates [[line]]'s intersection with a [[triangle]]. }}
+
-
{{function list row | LinePlaneIntersection | Calculates [[line]]'s intersection with a plane. }}
+
-
{{function list row | SquareOfPointToLineDistance | Returns [[square]] of shortest distance from [[line]] to [[point]]. }}
+
-
{{function list row | SquareOfPointToLineSegmentDistance | Returns [[square]] of shortest distance from [[line segment]] to [[point]]. }}
+
-
{{function list row | SquareOfLineSegmentsDistance | Returns [[square]] of shortest distance of two [[line segment]]s. }}
+
-
{{function list end}}
+
-
 
+
-
=== 3D rendering functions ===
+
-
 
+
-
:''All functions in this section internally use [[OpenGL]] functions for rendering.''
+
-
 
+
-
{{function list begin}}
+
-
{{function list row | DrawFlatShadedShape | Draws [[shape]] using [[flat shading]]. }}
+
-
{{function list row | DrawSmoothShadedShape | Draws [[shape]] using [[smooth shading]]. }}
+
-
{{function list row | DrawSmoothCAShadedShape | Draws [[shape]] using [[smooth shading with crease angle]]. }}
+
-
{{function list row | DrawShapeWireframe | Draws [[shape]]'s wireframe. }}
+
-
{{function list row | DrawShapePoints | Draws [[shape]]'s mesh-points. }}
+
-
{{function list row | DrawShapeNormals | Draws [[shape]]'s normals. }}
+
-
{{function list row | DrawObjectAxis | Draws specified object's axis/vector. }}
+
-
{{function list end}}
+
-
 
+
-
=== Generic helper functions ===
+
-
 
+
-
{{function list begin}}
+
-
{{function list row | GetLastErrorInfo | Returns textual information about the last error encountered in a SolidKit library function. }}
+
-
{{function list row | CompressData | Compresses chunk of binary data in memory. }}
+
-
{{function list row | DecompressData | Uncompresses compressed memory buffer into it's original content. }}
+
-
{{function list row | GET_CPU_TICK_COUNT | A macro which reads current CPU tick count. }}
+
-
{{function list row | CpuTicksToSeconds | Converts CPU ticks to seconds. The seconds value is returned using [[double]] precision. }}
+
-
{{function list row | CpuTickToTimeT | Converts CPU tick number to the number of seconds elapsed since midnight (00:00:00), January 1, 1970 UTC. Decimal part is also returned using [[double]] precision. }}
+
-
{{function list row | ImportRegistryData | Imports registry keys and values from registry-export-file-formatted string. }}
+
-
{{function list row | GetRegistrySubKeyNames | Returns registry key subkey names. }}
+
-
{{function list row | GetRegistryValueNames | Returns registry key value names. }}
+
-
{{function list row | GetRegistryValue | Reads registry value into [[String]], bool, int, or [[float]] variable. }}
+
-
{{function list row | SetRegistryValue| Sets registry value. }}
+
-
{{function list row | RegistryKeyExist | Checks whether registry key exists. }}
+
-
{{function list row | RegistryValueExist | Checks whether registry value exists. }}
+
-
{{function list row | DeleteRegistryValue | Deletes registry value. }}
+
-
{{function list row | DeleteRegistryKey | Deletes registry key. }}
+
-
{{function list end}}
+
 +
For information about using the [[SolidKit Library]] with '''.NET''', see [[SolidKit Library Documentation for .NET]].
== See Also ==
== See Also ==
-
*[[Solid Assembler Documentation]]
+
*[[SolidKit Library]]
-
*[[SolidKit Library sample projects]]
+

Current revision

For information about using the SolidKit Library with C++, see SolidKit Library Documentation for C++.

For information about using the SolidKit Library with .NET, see SolidKit Library Documentation for .NET.

See Also

Personal tools