Implements core graphic rendering capabilities. More...
Files | |
file | CDraw3D.h |
Implements OpenGL drawing macros. | |
file | CPrimitives.h |
Implements functions to create basic mesh primitives. | |
Classes | |
struct | chai3d::cColorf |
This class defines a color using a GLfloat representation for each component. More... | |
struct | chai3d::cColorb |
This class defines a color using a GLubyte representation for each component. More... | |
class | chai3d::cDisplayList |
This class provides support for OpenGL display lists. More... | |
class | chai3d::cFog |
This class implements fog inside the world. More... | |
class | chai3d::cFont |
This class implements support for 2D fonts. More... | |
class | chai3d::cGenericArray |
This class implements an abstract class for describing geometrical elements composed of vertices. More... | |
class | chai3d::cImage |
This class implements a 2D image data structure. More... | |
class | chai3d::cMultiImage |
This class implements an array of 2D image structures. More... | |
class | chai3d::cPointArray |
This class implements an array of 3D points. More... | |
struct | chai3d::cRenderOptions |
This structures provide a containers for storing rendering options that are passed through the scenegraph when rendering the world. (For internal OpenGL use). More... | |
class | chai3d::cSegmentArray |
This class implements an array of 3D segments. More... | |
class | chai3d::cTriangleArray |
This class implements an array of 3D triangles. More... | |
struct | chai3d::cVertexArrayOptions |
This structure manages user options when creating vertex arrays. More... | |
class | chai3d::cVertexArray |
This class implements array of 3D vertices. More... | |
class | chai3d::cVideo |
This class implements support for video files of the OGG/Vorbis format. More... | |
Functions | |
GLubyte | chai3d::cColorFtoB (GLfloat a_value) |
This function converts a color component from GLfloat type to GLubyte type. More... | |
GLfloat | chai3d::cColorBtoF (GLubyte a_value) |
This function converts a color component from GLubyte type to GLfloat type. More... | |
void | chai3d::cLookAt (const cVector3d &a_eye, const cVector3d &a_at, const cVector3d &a_up) |
This function aligns the current z-axis with a reference frame (similar to function gluLookAt). More... | |
void | chai3d::cDrawFrame (const double &a_scale=1.0) |
This function draws an x-y-z frame. More... | |
void | chai3d::cDrawFrame (const double &a_axisLengthScale, const double &a_axisThicknessScale) |
This function draws an x-y-z frame. More... | |
void | chai3d::cDrawWireBox (const double &a_xMin, const double &a_xMax, const double &a_yMin, const double &a_yMax, const double &a_zMin, const double &a_zMax) |
This function draws a box using lines. More... | |
void | chai3d::cDrawSphere (const double &a_radius, const unsigned int a_numSlices=10, const unsigned int a_numStacks=10) |
This function draws a sphere. More... | |
void | chai3d::cDrawArrow (const cVector3d &a_arrowStart, const cVector3d &a_arrowTip, const double a_width=0.05) |
This function draws an arrow on the z-axis using a cone and a cylinder. More... | |
void | chai3d::cDrawSolidTorus (const double &a_innerRadius, const double &a_outerRadius, const int a_sides, const int a_rings) |
This function draws a torus. More... | |
void | chai3d::cCreatePlane (cMesh *a_mesh, const double &a_lengthX, const double &a_lengthY, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a plane. More... | |
void | chai3d::cCreatePlane2 (cMesh *a_mesh, const double &a_lengthX, const double &a_lengthY, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_colorTopLeft=cColorf(1.0, 1.0, 1.0, 1.0), const cColorf &a_colorTopRight=cColorf(1.0, 1.0, 1.0, 1.0), const cColorf &a_colorBottomLeft=cColorf(1.0, 1.0, 1.0, 1.0), const cColorf &a_colorBottomRight=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a plane. More... | |
void | chai3d::cCreateMap (cMesh *a_mesh, const double &a_lengthX, const double &a_lengthY, const unsigned int a_numSidesX=10, const unsigned int a_numSidesY=10, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a height map. Similar to a map, but with more triangles. More... | |
void | chai3d::cCreateDisk (cMesh *a_mesh, const double &a_radiusX, const double &a_radiusY, const unsigned int a_numSlices=36, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a disk. More... | |
void | chai3d::cCreatePanel (cMesh *a_mesh, const double &a_lengthX, const double &a_lengthY, const double &a_radiusCorners=0, const int &a_numSegmentsPerCorner=8, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a panel with optional rounded corners. More... | |
void | chai3d::cCreatePanel2 (cMesh *a_mesh, const double &a_lengthX, const double &a_lengthY, const double &a_cornerTopLeftRadius=0, const double &a_cornerTopRightRadius=0, const double &a_cornerBottomLeftRadius=0, const double &a_cornerBottomRightRadius=0, const int &a_numSegmentsPerCorner=8, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_colorTopLeft=cColorf(0.5f, 0.5f, 0.5f, 1.0f), const cColorf &a_colorTopRight=cColorf(0.5f, 0.5f, 0.5f, 1.0f), const cColorf &a_colorBottomLeft=cColorf(0.3f, 0.3f, 0.3f, 1.0f), const cColorf &a_colorBottomRight=cColorf(0.3f, 0.3f, 0.3f, 1.0f)) |
This function creates a panel with optional rounded corners. More... | |
void | chai3d::cCreateBox (cMesh *a_mesh, const double &a_lengthX, const double &a_lengthY, const double &a_lengthZ, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a box. More... | |
void | chai3d::cCreateTeaPot (cMesh *a_mesh, const double &a_size, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a tea pot. More... | |
void | chai3d::cCreateTeaPot (cMesh *a_mesh, const double &a_size, const int &a_quality=4, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a tea pot. More... | |
void | chai3d::cCreateCylinder (cMesh *a_mesh, const double &a_height, const double &a_radius, const unsigned int a_numSides=32, const unsigned int a_numHeightSegments=1, const unsigned int a_numRings=1, const bool a_includeTop=true, const bool a_includeBottom=true, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a cylinder. More... | |
void | chai3d::cCreatePipe (cMesh *a_mesh, const double &a_height, const double &a_innerRadius, const double &a_outerRadius, const unsigned int a_numSides=32, const unsigned int a_numHeightSegments=1, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a pipe. More... | |
void | chai3d::cCreateSphere (cMesh *a_mesh, const double &a_radius, const unsigned int a_numSlices=32, const unsigned int a_numStacks=32, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a sphere. More... | |
void | chai3d::cCreateEllipsoid (cMesh *a_mesh, const double &a_radiusX, const double &a_radiusY, const double &a_radiusZ, const unsigned int a_numSlices=32, const unsigned int a_numStacks=32, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates an ellipsoid. More... | |
void | chai3d::cCreateRing (cMesh *a_mesh, const double &a_innerRadius, const double &a_outerRadius, const unsigned int a_numSides=32, const unsigned int a_numRings=32, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a ring. More... | |
void | chai3d::cCreateRingSection (cMesh *a_mesh, const double &a_innerRadius0, const double &a_innerRadius1, const double &a_outerRadius, const double &a_coverageAngleDEG=360, const bool a_includeExtremityFaces=true, const unsigned int a_numSides=32, const unsigned int a_numRings=32, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a ring section. More... | |
void | chai3d::cCreateCone (cMesh *a_mesh, const double &a_height, const double &a_radiusBottom, const double &a_radiusTop=0.0, const unsigned int a_numSides=32, const unsigned int a_numHeightSegments=1, const unsigned int a_numRings=1, const bool a_includeBottom=true, const bool a_includeTop=true, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a cone. More... | |
void | chai3d::cCreateSquarePyramid (cMesh *a_mesh, const double &a_height, const double &a_baseSize, const bool a_includeBottom=true, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a pyramid. More... | |
void | chai3d::cCreateArrow (cMesh *a_mesh, const double &a_length=0.4, const double &a_radiusShaft=0.01, const double &a_lengthTip=0.1, const double &a_radiusTip=0.03, const bool a_includeTipsAtBothExtremities=false, const unsigned int a_numSides=32, const cVector3d &a_direction=cVector3d(0, 0, 1), const cVector3d &a_pos=cVector3d(0, 0, 0), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates an arrow. More... | |
void | chai3d::cCreateCircularArrow (cMesh *a_mesh, const double &a_innerRadius0=0.05, const double &a_innerRadius1=0.05, const double &a_outerRadius=0.3, const double &a_lengthTip=0.2, const double &a_radiusTip=0.1, const double &a_coverageAngleDEG=270, const bool a_includeTipsAtBothExtremities=false, const unsigned int a_numSides=32, const unsigned int a_numRings=32, const cVector3d &a_direction=cVector3d(0, 0, 1), const cVector3d &a_pos=cVector3d(0, 0, 0), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates an circular arrow. More... | |
void | chai3d::cCreateBezierPatch (cMesh *a_mesh, const cVector3d *a_controlPoints, const int a_numDivisions=8, const cVector3d &a_pos=cVector3d(0, 0, 0), const cMatrix3d &a_rot=cIdentity3d(), const cColorf &a_color=cColorf(1.0, 1.0, 1.0, 1.0)) |
This function creates a Bezier patch. More... | |
|
inline |
a_value | Component expressed in GLfloat type (0.0 - 1.0). |
|
inline |
a_value | Color expressed in GLubyte type (0x00 - 0xFF). |
This function aligns the current z-axis with a reference frame in the same way than the OpenGL gluLookAt() function does.
a_eye | Position of eye. |
a_at | Look at position. |
a_up | Up direction. |
void chai3d::cDrawFrame | ( | const double & | a_scale | ) |
This function draws an X-Y-Z Frame. The red arrow corresponds to the X-Axis, green to the Y-Axis, and blue to the Z-Axis.
The scale parameter determines the size of the arrows.
a_scale | Length of each arrow |
void chai3d::cDrawFrame | ( | const double & | a_axisLengthScale, |
const double & | a_axisThicknessScale | ||
) |
This function draws an X-Y-Z Frame. The red arrow corresponds to the X-Axis, green to the Y-Axis, and blue to the Z-Axis.
The scale parameter determines the size of the arrows.
a_axisLengthScale | Length of each arrow |
a_axisThicknessScale | Thickness factor of frame. |
void chai3d::cDrawWireBox | ( | const double & | a_xMin, |
const double & | a_xMax, | ||
const double & | a_yMin, | ||
const double & | a_yMax, | ||
const double & | a_zMin, | ||
const double & | a_zMax | ||
) |
This function draws a line-based box with sides parallel to the x-y-z axes.
a_xMin | Box side x min position. |
a_xMax | Box side x max position. |
a_yMin | Box side y min position. |
a_yMax | Box side y max position. |
a_zMin | Box side z min position. |
a_zMax | Box side z max position. |
void chai3d::cDrawSphere | ( | const double & | a_radius, |
const unsigned int | a_numSlices, | ||
const unsigned int | a_numStacks | ||
) |
This function draws a sphere.
a_radius | Radius of the sphere |
a_numSlices | Specifies the number of subdivisions around the z axis (similar to lines of longitude) |
a_numStacks | Specifies the number of subdivisions along the x/y axes (similar to lines of latitude) |
void chai3d::cDrawArrow | ( | const cVector3d & | a_arrowStart, |
const cVector3d & | a_arrowTip, | ||
const double | a_width | ||
) |
This function draws an arrow along the z-axis using a cone and a cylinder.
a_arrowStart | The location of the back of the arrow. |
a_arrowTip | The location of the tip of the arrow. |
a_width | The width of the arrow shaft. |
void chai3d::cDrawSolidTorus | ( | const double & | a_innerRadius, |
const double & | a_outerRadius, | ||
const int | a_sides, | ||
const int | a_rings | ||
) |
This function draws a torus.
a_innerRadius | Inner radius of the torus. |
a_outerRadius | Outer radius of the torus. |
a_sides | Number of sides for each radial section. |
a_rings | Number of radial divisions for the torus. |
void chai3d::cCreatePlane | ( | cMesh * | a_mesh, |
const double & | a_lengthX, | ||
const double & | a_lengthY, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a plane by defining its size along the X and Y axes. Texture coordinates are defined so that the bitmap image maps the entire plane.
a_mesh | Mesh object in which primitive is created. |
a_lengthX | Size along X axis. |
a_lengthY | Size along Y axis. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreatePlane2 | ( | cMesh * | a_mesh, |
const double & | a_lengthX, | ||
const double & | a_lengthY, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_colorTopLeft, | ||
const cColorf & | a_colorTopRight, | ||
const cColorf & | a_colorBottomLeft, | ||
const cColorf & | a_colorBottomRight | ||
) |
This function creates a plane by defining its size along the X and Y axes. Texture coordinates are defined so that the bitmap image maps the entire plane.
a_mesh | Mesh object in which primitive is created. |
a_lengthX | Size along X axis. |
a_lengthY | Size along Y axis. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_colorTopLeft | Color of top left vertex. |
a_colorTopRight | Color of top right vertex. |
a_colorBottomLeft | Color of bottom left vertex. |
a_colorBottomRight | Color of bottom right vertex. |
void chai3d::cCreateMap | ( | cMesh * | a_mesh, |
const double & | a_lengthX, | ||
const double & | a_lengthY, | ||
const unsigned int | a_numSidesX, | ||
const unsigned int | a_numSidesY, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a 2D map by defining the size along the X and Y axes, and the number of sides along each axis. For instance, a map containing 3 sides along the X axis and 4 sides along the Y axis will contains: 12 squares composed each of two triangles. The total number of vertices will be equal to 20, respectively (3+1)x(4+1). By modifying the Z component of each vertex you can easily create height maps for instance.Texture coordinates are defined so that the bitmap image covers the entire map.
a_mesh | Mesh object in which primitive is created. |
a_lengthX | Size along X axis. |
a_lengthY | Size along Y axis. |
a_numSidesX | Number of elements along X axis. |
a_numSidesY | Number of elements along Y axis. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreateDisk | ( | cMesh * | a_mesh, |
const double & | a_radiusX, | ||
const double & | a_radiusY, | ||
const unsigned int | a_numSlices, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a disk by defining its radius properties along axis X and axis Y.
a_mesh | Mesh object in which primitive is created. |
a_radiusX | Radius of sphere along axis X. |
a_radiusY | Radius of sphere along axis Y. |
a_numSlices | Specifies the number of slices composing the disc. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreatePanel | ( | cMesh * | a_mesh, |
const double & | a_lengthX, | ||
const double & | a_lengthY, | ||
const double & | a_radiusCorners, | ||
const int & | a_numSegmentsPerCorner, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a panel with optional rounded corners.
a_mesh | Mesh object in which primitive is created. |
a_lengthX | Size along X axis. |
a_lengthY | Size along Y axis. |
a_radiusCorners | Radius of corners. |
a_numSegmentsPerCorner | Number of segments per rounded corner. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreatePanel2 | ( | cMesh * | a_mesh, |
const double & | a_lengthX, | ||
const double & | a_lengthY, | ||
const double & | a_cornerTopLeftRadius, | ||
const double & | a_cornerTopRightRadius, | ||
const double & | a_cornerBottomLeftRadius, | ||
const double & | a_cornerBottomRightRadius, | ||
const int & | a_numSegmentsPerCorner, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_colorTopLeft, | ||
const cColorf & | a_colorTopRight, | ||
const cColorf & | a_colorBottomLeft, | ||
const cColorf & | a_colorBottomRight | ||
) |
This function creates a panel with optional rounded corners.
a_mesh | Mesh object in which primitive is created. |
a_lengthX | Size along X axis. |
a_lengthY | Size along Y axis. |
a_cornerTopLeftRadius | Radius of top left corner. |
a_cornerTopRightRadius | Radius of top right corner. |
a_cornerBottomLeftRadius | Radius of bottom left corner. |
a_cornerTopLeftRadius | Radius of bottom right corner. |
a_cornerBottomRightRadius | Number of segments per rounded corner. |
a_numSegmentsPerCorner | Number of segments composing the circular corners. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_colorTopLeft | Color of top left vertex. |
a_colorTopRight | Color of top right vertex. |
a_colorBottomLeft | Color of bottom left vertex. |
a_colorBottomRight | Color of bottom right vertex. |
void chai3d::cCreateBox | ( | cMesh * | a_mesh, |
const double & | a_lengthX, | ||
const double & | a_lengthY, | ||
const double & | a_lengthZ, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a box by defining its size along the x, y and z axis. Texture coordinates are defined so that the bitmap image is displayed on each face of the box.
a_mesh | Mesh object in which primitive is created. |
a_lengthX | Size along X axis. |
a_lengthY | Size along Y axis. |
a_lengthZ | Size along Z axis. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreateTeaPot | ( | cMesh * | a_mesh, |
const double & | a_size, | ||
const cVector3d & | a_pos = cVector3d(0, 0, 0) , |
||
const cMatrix3d & | a_rot = cIdentity3d() , |
||
const cColorf & | a_color = cColorf(1.0, 1.0, 1.0, 1.0) |
||
) |
void chai3d::cCreateTeaPot | ( | cMesh * | a_mesh, |
const double & | a_size, | ||
const int & | a_resolution, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a copy of the famous OpenGL tea pot.
a_mesh | Mesh object in which primitive is created. |
a_size | Size of the tea pot. |
a_resolution | Number of divisions per patch. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreateCylinder | ( | cMesh * | a_mesh, |
const double & | a_height, | ||
const double & | a_radius, | ||
const unsigned int | a_numSides, | ||
const unsigned int | a_numHeightSegments, | ||
const unsigned int | a_numRings, | ||
const bool | a_includeTop, | ||
const bool | a_includeBottom, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a cylinder by defining its radius and height. The user may also decide if the top and bottom discs should be included. Texture coordinates are defined so that the bitmap image wraps around the cylinder. The texture coordinates for the top part of the cylinder are set to (0.0, 0.0, 0.0). The texture coordinates for the bottom part of the cylinder are set to (1.0, 1.0, 0.0). When texture is enabled, the colors defining the top and bottoms sections of the cylinder are defined by both texels.
a_mesh | Mesh object in which primitive is created. |
a_height | Height of the cylinder. |
a_radius | Radius of the cylinder. |
a_numSides | Number of sides composing the cylinder. |
a_numHeightSegments | Number of segments along the cylinder axis. |
a_numRings | Number of rings that compose the top and bottom disks. |
a_includeTop | If true, then the top disc is included. |
a_includeBottom | If true, then the bottom disc is included. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreatePipe | ( | cMesh * | a_mesh, |
const double & | a_height, | ||
const double & | a_innerRadius, | ||
const double & | a_outerRadius, | ||
const unsigned int | a_numSides, | ||
const unsigned int | a_numHeightSegments, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a pipe by defining a height, inner radius and outer radius.
a_mesh | Mesh object in which primitive is created. |
a_height | Height of the pipe. |
a_innerRadius | Inner radius of the pipe. |
a_outerRadius | Outer radius of the pipe. |
a_numSides | Number of sides composing the pipe. |
a_numHeightSegments | Number of segments along the cylinder axis. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreateSphere | ( | cMesh * | a_mesh, |
const double & | a_radius, | ||
const unsigned int | a_numSlices, | ||
const unsigned int | a_numStacks, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates sphere by defining its radius.
a_mesh | Mesh object in which primitive is created. |
a_radius | Radius of sphere. |
a_numSlices | Specifies the number of subdivisions around the z axis (similar to lines of longitude). |
a_numStacks | Specifies the number of subdivisions along the z axis (similar to lines of latitude). |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreateEllipsoid | ( | cMesh * | a_mesh, |
const double & | a_radiusX, | ||
const double & | a_radiusY, | ||
const double & | a_radiusZ, | ||
const unsigned int | a_numSlices, | ||
const unsigned int | a_numStacks, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates an ellipsoid by defining the radius properties along each axis X, Y and Z.
a_mesh | Mesh object in which primitive is created. |
a_radiusX | Radius along X axis. |
a_radiusY | Radius along Y axis. |
a_radiusZ | Radius along Z axis. |
a_numSlices | Specifies the number of subdivisions around the z axis (similar to lines of longitude). |
a_numStacks | Specifies the number of subdivisions along the z axis (similar to lines of latitude). |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreateRing | ( | cMesh * | a_mesh, |
const double & | a_innerRadius, | ||
const double & | a_outerRadius, | ||
const unsigned int | a_numSides, | ||
const unsigned int | a_numRings, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a torus by defining the inner and outer radius values.
a_mesh | Mesh object in which primitive is created. |
a_innerRadius | Inner radius of the torus. |
a_outerRadius | Outer radius of the torus. |
a_numSides | Number of sides for each radial section. |
a_numRings | Number of radial divisions for the torus. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreateRingSection | ( | cMesh * | a_mesh, |
const double & | a_innerRadius0, | ||
const double & | a_innerRadius1, | ||
const double & | a_outerRadius, | ||
const double & | a_coverageAngleDEG, | ||
const bool | a_includeExtremityFaces, | ||
const unsigned int | a_numSides, | ||
const unsigned int | a_numRings, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a torus by defining the inner and outer radius values.
a_mesh | Mesh object in which primitive is created. |
a_innerRadius0 | Inner radius of the ring at the beginning extremity. |
a_innerRadius1 | Inner radius of the ring at the end extremity. |
a_outerRadius | Outer radius of the torus. |
a_coverageAngleDEG | Coverage angle in degrees (from 0 to 360). |
a_includeExtremityFaces | Include flat surfaces at extremities of ring section. |
a_numSides | Number of sides for each radial section. |
a_numRings | Number of radial divisions for the torus. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreateCone | ( | cMesh * | a_mesh, |
const double & | a_height, | ||
const double & | a_radiusBottom, | ||
const double & | a_radiusTop, | ||
const unsigned int | a_numSides, | ||
const unsigned int | a_numHeightSegments, | ||
const unsigned int | a_numRings, | ||
const bool | a_includeBottom, | ||
const bool | a_includeTop, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a cone by defining its height and bottom radius. By defining a top radius larger than zero, it is possible to create a truncated cone. Top and bottom parts can also be included or not.
a_mesh | Mesh object in which primitive is created. |
a_height | Height of cone. |
a_radiusBottom | Bottom radius of cone. |
a_radiusTop | Top radius of cone. Apply 0 value for non truncated cone. |
a_numSides | Number of sides composing the cone. |
a_numHeightSegments | Number of segments along the cone axis. |
a_numRings | Number of rings that compose the top and bottom disks. |
a_includeTop | If true, then the top disc is included. (truncated cone) |
a_includeBottom | If true, then the bottom disc is included. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreateSquarePyramid | ( | cMesh * | a_mesh, |
const double & | a_height, | ||
const double & | a_baseSize, | ||
const bool | a_includeBottom, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a square pyramid.
a_mesh | Mesh object in which primitive is created. |
a_height | Height of square pyramid. |
a_baseSize | Size of a base of the pyramid. |
a_includeBottom | If true, then the bottom (square) of the pyramid is included. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreateArrow | ( | cMesh * | a_mesh, |
const double & | a_length, | ||
const double & | a_radiusShaft, | ||
const double & | a_lengthTip, | ||
const double & | a_radiusTip, | ||
const bool | a_includeTipsAtBothExtremities, | ||
const unsigned int | a_numSides, | ||
const cVector3d & | a_direction, | ||
const cVector3d & | a_pos, | ||
const cColorf & | a_color | ||
) |
This function creates a linear arrow.
a_mesh | Mesh object in which primitive is created. |
a_length | Length of arrow. |
a_radiusShaft | Radius of arrow shaft. |
a_lengthTip | Length or arrow tip. |
a_radiusTip | Radius of arrow tip. |
a_includeTipsAtBothExtremities | Include tip at both extremities of arrow. |
a_numSides | Number of sides for each radial section. |
a_direction | Direction of arrow. |
a_pos | Position where to build the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreateCircularArrow | ( | cMesh * | a_mesh, |
const double & | a_innerRadius0, | ||
const double & | a_innerRadius1, | ||
const double & | a_outerRadius, | ||
const double & | a_lengthTip, | ||
const double & | a_radiusTip, | ||
const double & | a_coverageAngleDeg, | ||
const bool | a_includeTipsAtBothExtremities, | ||
const unsigned int | a_numSides, | ||
const unsigned int | a_numRings, | ||
const cVector3d & | a_direction, | ||
const cVector3d & | a_pos, | ||
const cColorf & | a_color | ||
) |
This function creates a circular arrow.
a_mesh | Mesh object in which primitive is created. |
a_innerRadius0 | Length of arrow. |
a_innerRadius1 | Radius of arrow shaft. |
a_outerRadius | Radius of arrow shaft. |
a_lengthTip | Length or arrow tip. |
a_radiusTip | Radius of arrow tip. |
a_coverageAngleDeg | Coverage angle of the arrow (0-360 degrees) |
a_includeTipsAtBothExtremities | Include tip at both extremities of arrow. |
a_numSides | Number of sides for each radial section. |
a_numRings | Number of radial divisions for the circular shaft. |
a_direction | Direction of circular arrow plane. |
a_pos | Position where to build the new primitive. |
a_color | Color of vertices. |
void chai3d::cCreateBezierPatch | ( | cMesh * | a_mesh, |
const cVector3d * | a_controlPoints, | ||
const int | a_numDivisions, | ||
const cVector3d & | a_pos, | ||
const cMatrix3d & | a_rot, | ||
const cColorf & | a_color | ||
) |
This function creates a Bezier patch from a set of control points.
a_mesh | Mesh object in which primitive is created. |
a_controlPoints | Bezier control points (16). |
a_numDivisions | Number of division along each side of the patch. |
a_pos | Position where to build the new primitive. |
a_rot | Orientation of the new primitive. |
a_color | Color of vertices. |