24 #include "VectorTypes.h"
63 static void generateVertices(
float torusRadius,
float circleRadius,
unsigned int circlesCount,
unsigned int pointsPerCircleCount,
float*
vertices);
77 static void calculateControlPointsIndices(
unsigned int patchDimension,
unsigned int patchInstancesCount,
unsigned int controlPointsIndicesCount,
unsigned int* controlPointsIndices);
86 static void calculatePatchData(
unsigned int patchDensity,
float* patchVertices,
unsigned int* patchTriangleIndices);
95 static void calculateWireframeIndices(
unsigned int circlesCount,
unsigned int pointsPerCircleCount,
unsigned int* indices);
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...
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...
static void generateNormals(unsigned int circlesCount, unsigned int pointsPerCircleCount, float *normals)
Generates torus's normal vectors.
static void generateBezierVertices(float torusRadius, float circleRadius, float *vertices)
Generate torus vertices applying distortions to some of them.
Functions for generating torus shapes.
static void calculateWireframeIndices(unsigned int circlesCount, unsigned int pointsPerCircleCount, unsigned int *indices)
Determines indices for glDrawElements() call for wireframed torus.
static void generateVertices(float torusRadius, float circleRadius, unsigned int circlesCount, unsigned int pointsPerCircleCount, float *vertices)
Generate vertices of the torus model.
GLsizei GLenum const void * indices
static void calculatePatchData(unsigned int patchDensity, float *patchVertices, unsigned int *patchTriangleIndices)
Determines patch data for an instanced torus model.