|
static void | generateNormals (unsigned int circlesCount, unsigned int pointsPerCircleCount, float *normals) |
| Generates torus's normal vectors. More...
|
|
static void | calculateTriangleStripIndices (unsigned int circlesCount, unsigned int pointsPerCircleCount, unsigned int *indices) |
| Determines indices for DrawElements() call for shaded torus drawn in triangle strip mode. More...
|
|
static void | generateVertices (float torusRadius, float circleRadius, unsigned int circlesCount, unsigned int pointsPerCircleCount, float *vertices) |
| Generate vertices of the torus model. More...
|
|
static void | calculateControlPointsIndices (unsigned int patchDimension, unsigned int patchInstancesCount, unsigned int controlPointsIndicesCount, unsigned int *controlPointsIndices) |
| Determines an array of indices defining a mesh of control points for instanced torus patches. More...
|
|
static void | calculatePatchData (unsigned int patchDensity, float *patchVertices, unsigned int *patchTriangleIndices) |
| Determines patch data for an instanced torus model. More...
|
|
static void | calculateWireframeIndices (unsigned int circlesCount, unsigned int pointsPerCircleCount, unsigned int *indices) |
| Determines indices for glDrawElements() call for wireframed torus. More...
|
|
static void | generateBezierVertices (float torusRadius, float circleRadius, float *vertices) |
| Generate torus vertices applying distortions to some of them. More...
|
|
static void | generateNormals (unsigned int circlesCount, unsigned int pointsPerCircleCount, float *normals) |
| Generates torus's normal vectors. More...
|
|
static void | calculateTriangleStripIndices (unsigned int circlesCount, unsigned int pointsPerCircleCount, unsigned int *indices) |
| Determines indices for DrawElements() call for shaded torus drawn in triangle strip mode. More...
|
|
static void | generateVertices (float torusRadius, float circleRadius, unsigned int circlesCount, unsigned int pointsPerCircleCount, float *vertices) |
| Generate vertices of the torus model. More...
|
|
static void | calculateControlPointsIndices (unsigned int patchDimension, unsigned int patchInstancesCount, unsigned int controlPointsIndicesCount, unsigned int *controlPointsIndices) |
| Determines an array of indices defining a mesh of control points for instanced torus patches. More...
|
|
static void | calculatePatchData (unsigned int patchDensity, float *patchVertices, unsigned int *patchTriangleIndices) |
| Determines patch data for an instanced torus model. More...
|
|
static void | calculateWireframeIndices (unsigned int circlesCount, unsigned int pointsPerCircleCount, unsigned int *indices) |
| Determines indices for glDrawElements() call for wireframed torus. More...
|
|
static void | generateBezierVertices (float torusRadius, float circleRadius, float *vertices) |
| Generate torus vertices applying distortions to some of them. More...
|
|
Functions for generating torus shapes.
Definition at line 31 of file TorusModel.h.
void MaliSDK::TorusModel::calculateControlPointsIndices |
( |
unsigned int |
patchDimension, |
|
|
unsigned int |
patchInstancesCount, |
|
|
unsigned int |
controlPointsIndicesCount, |
|
|
unsigned int * |
controlPointsIndices |
|
) |
| |
|
static |
Determines an array of indices defining a mesh of control points for instanced torus patches.
To simplify mathemathics, it is assumed that torus model consists of 12 circles, each built of 12 points, so it is easy to divide each circle into 4 quadrants and define Bezier surfaces approximating perfectly round torus.
- Parameters
-
[in] | patchDimension | Number of control points in one dimension for a patch. |
[in] | patchInstancesCount | Number of instances needed to draw the whole torus. |
[in] | controlPointsIndicesCount | Number of indices needed to create a control mesh. |
[out] | controlPointsIndices | Deref will be used to store control points indices. Cannot be null. |
Definition at line 58 of file TorusModel.cpp.
static void MaliSDK::TorusModel::generateBezierVertices |
( |
float |
torusRadius, |
|
|
float |
circleRadius, |
|
|
float * |
vertices |
|
) |
| |
|
static |
Generate torus vertices applying distortions to some of them.
The distortions in control mesh are needed for proper construction of Bezier surface patches. It is assumed that each patch consists of 4 control rows and columns. Hence, in each column and each row, we can distinguish 2 middle control points and 2 edge control points, which are shared between patches. The middle control points have to be moved in such a way that C1 continuity between patches is satisfied. Implemented algorithm assumes that each construction circle contains 12 points and the torus model consists of 12 circles.
- Parameters
-
[in] | torusRadius | Distance between the center of torus and the center of its tube. |
[in] | circleRadius | Radius of circles that model the tube. |
[out] | vertices | Deref will be used to sotre generated vertices. Cannot be null. |
void MaliSDK::TorusModel::generateBezierVertices |
( |
float |
torusRadius, |
|
|
float |
circleRadius, |
|
|
float * |
vertices |
|
) |
| |
|
static |
Generate torus vertices applying distortions to some of them.
The distortions in control mesh are needed for proper construction of Bezier surface patches. It is assumed that each patch consists of 4 control rows and columns. Hence, in each column and each row, we can distinguish 2 middle control points and 2 edge control points, which are shared between patches. The middle control points have to be moved in such a way that C1 continuity between patches is satisfied. Implemented algorithm assumes that each construction circle contains 12 points and the torus model consists of 12 circles.
- Parameters
-
[in] | torusRadius | Distance between the center of torus and the center of its tube. |
[in] | circleRadius | Radius of circles that model the tube. |
[out] | vertices | Deref will be used to sotre generated vertices. Cannot be null. |
Definition at line 315 of file TorusModel.cpp.