SolidKit Library Documentation for .NET
From Solid Graphics Wiki
The SolidKit Library is a programming library for development of 3D/2D graphics applications in C++ and .NET for Microsoft Windows family of operating systems using OpenGL. The library is a commercial product distributed under terms of proprietary license.
The .NET version of the library uses Windows Forms.
This article contains information about classes and types provided by the SolidKit Library for .NET and other information useful for software development with the library.
For information about using the SolidKit Library with C++ see SolidKit Library Documentation for C++.
Visual components (such as the Control3D class) are using OpenGL. However, the SolidKit Library does not provide by itself .NET bindings for all OpenGL functions. The library directly provides only basic OpenGL functions through the SolidKit3D.OpenGL class. If access to more OpenGL functions is needed then an application can either use .NET's Platform Invocation Services to bind to the OpenGL functions which it needs to access (the SolidKit3D.OpenGL class is built this way), or the application can reference other third party library, such as Tao Framework, which provides more complete OpenGL bindings.
Perhaps the most efficient way to learn the library capabilities and to learn how to use them - is to run 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 this article for more information about the SolidKit Library sample projects.
The SolidKit Library .NET classes, structures and variables are defined in SolidKit namespace and SolidKit3D namespace. The SolidKit namespace contains generic purpose types, the SolidKit namespace contains 3D related types.
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
|SolidKit.Forms.Control3D class||The class provides 3D view window functionality with view navigation and scene objects manipulation using mouse and keyboard.|
|SolidKit.Forms.Control3D.Control3DDefaults class||Defines default settings for many of the Control3D class settings.|
|SolidKit.Forms.Control3D.ViewControlInfo class||Specifies group of parameters for Control3D class, such as mouse sensitivity, selection options, floor navigation settings.|
|SolidKit.Forms.Control3D.ViewMovementInfo class||Specifies group of parameters, such as rotation speed or pan speed, for Control3D class which affect view navigation and scene object manipulation when using keyboard shortcuts.|
|SolidKit3D.ObjectPosInfo class||Provides information about scene object position and orientation.|
|SolidKit3D.ObjectPosInfoList class||Provides information about position and orientation of a scene object which is part of a larger object hierarchy.|
|SolidKit3D.ObjectEditOptions class||Allows to specify editing/manipulation options for a 3D object to the Control3D class instance, such as to restrict the object movement into plane, or the object rotation to rotation around specified axis only.|
|SolidKit.CommandTrigger class||This class allows keyboard/mouse shortcuts customization. It triggers commands start/end events based on keyboard or mouse input.|
|SolidKit3D.Camera class||Represents camera parameters, such us "camera eye" position, target position, up direction, view angle.|
Constructive Solid Geometry
|SolidKit3D.CSGOperation class||The class provides constructive solid geometry functionality for triangle meshes using float precision.|
Basic 3D Data Types
|SolidKit3D.Point struct||Specifies a (x, y, z) location in 3D space using float precision|
|SolidKit3D.PointList class||List of point struct objects.|
|SolidKit3D.Vector struct||Specifies (x, y, z) direction in 3D space and size using float precision|
|SolidKit3D.VectorList class||List of vector struct objects.|
|SolidKit3D.TriangleByRef struct||Specifies a triangle using three reference indexes into a SolidKit3D.PointList class object.|
|SolidKit3D.TriangleByRefList class||List of TriangleByRef objects.|
|SolidKit3D.Shape class||This class holds a PointList class and TriangleByRefList class instance instance, specifying a triangle mesh.|
|SolidKit3D.BoundingBox struct||Defines axis aligned box. This class can be used to effectively represent approximate boundary of a 3D object, such as a SolidKit3D.Shape object.|
|SolidKit3D.Matrix3x3f struct||Represents a 3x3 matrix of float values. A 3x3 matrices can be used to provide rotation-only point or vector coordinates transformations.|
|SolidKit3D.Matrix4x4f struct||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.|
|SolidKit3D.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"|
|SolidKit3D.Triangle struct||Specifies a triangle using three SolidKit3D.Point struct objects.|
|SolidKit3D.TriangleList class||SolidKit.List of SolidKit3D.Triangle struct objects.|
|SolidKit3D.Plane struct||Defines a plane.|
|SolidKit3D.LineSegment struct||Defines a line segment as two points.|
|SolidKit3D.LineSegmentByRef class||Defines a line segment by providing indexes to a SolidKit3D.PointList of it's two endpoints.|
OpenGL drawing and rendering support classes
|SolidKit3D.Drawing.Color struct||Red, green, blue alpha color values using float precision.|
|SolidKit3D.Drawing.Material struct||The class defines ambient, diffuse and specular material properties.|
|SolidKit3D.Drawing.Texture class||Class provides functionality of loading texture image from JPEG, PNG, GIF or BMP files, and allows to use it in OpenGL renders.|
|SolidKit3D.Drawing.Font class||Texture based font for using in OpenGL renders.|
The SolidKit Library makes extensive use of it's own list and dictionary generics. The reason why the library does not use similar generics available in Framework Class Library - is that the SolidKit generics are tailored for algorithms used in the library (for performance reasons - especially for CSG algorithms).
|SolidKit.List generic||A generic for making dynamic-size one-dimensional arrays.|
|SolidKit.Dictionary generic||A generic for making dynamic-size key to value dictionaries.|
Geometry math functions
|SolidKit3D.Math3D.ClosestLinePoints||Calculates positions and coordinates of closest points of two lines.|
|SolidKit3D.Math3D.ClosestLinePointPosition||Calculates position of a point lying on a specified line closest to a specified point.|
|SolidKit3D.Math3D.ClosestLineSegmentPoints||Calculats positions and coordinates of closest points of two line segments.|
|SolidKit3D.Math3D.LinePositionToPoint||Translates point's position on a line to the point coordinates.|
|SolidKit3D.Math3D.PointOnLinePosition||Calculates position on a line from given point coordinates.|
|SolidKit3D.Math3D.LineTriangleIntersection||Calculates line's intersection with a triangle.|
|SolidKit3D.Math3D.LinePlaneIntersection||Calculates line's intersection with a plane.|
|SolidKit3D.Math3D.PointToLineDistanceSquared||Returns square of shortest distance from line to point.|
|SolidKit3D.Math3D.PointToLineSegmentDistanceSquared||Returns square of shortest distance from line segment to point.|
|SolidKit3D.Math3D.LineSegmentsDistanceSquared||Returns square of shortest distance of two line segments.|
3D rendering functions
- All functions in this section internally use OpenGL functions for rendering.
|SolidKit3D.Drawing.ShapeRenderer.DrawFlatShadedShape||Draws shape using flat shading.|
|SolidKit3D.Drawing.ShapeRenderer.DrawSmoothShadedShape||Draws shape using smooth shading.|
|SolidKit3D.Drawing.ShapeRenderer.DrawSmoothCAShadedShape||Draws shape using smooth shading with crease angle.|
|SolidKit3D.Drawing.ShapeRenderer.DrawShapeWireframe||Draws shape's wireframe.|
|SolidKit3D.Drawing.ShapeRenderer.DrawShapePoints||Draws shape's mesh-points.|
|SolidKit3D.Drawing.ShapeRenderer.DrawShapeNormals||Draws shape's normals.|
|SolidKit3D.Drawing.ShapeRenderer.DrawObjectAxis||Draws specified object's axis/vector.|