Go to the source code of this file.
|
bezierPatch * | bezierPatchMake (float umin, float vmin, float umax, float vmax, int urder, int vorder, int dimension) |
|
bezierPatch * | bezierPatchMake2 (float umin, float vmin, float umax, float vmax, int urder, int vorder, int dimension, int ustride, int vstride, float *ctlpoints) |
|
bezierPatch * | bezierPatchInsert (bezierPatch *list, bezierPatch *b) |
|
void | bezierPatchDelete (bezierPatch *b) |
|
void | bezierPatchDeleteList (bezierPatch *b) |
|
void | bezierPatchPrint (bezierPatch *b) |
|
void | bezierPatchPrintList (bezierPatch *list) |
|
void | bezierPatchEval (bezierPatch *b, float u, float v, float ret[]) |
|
void | bezierPatchEvalNormal (bezierPatch *b, float u, float v, float retNormal[]) |
|
void | bezierPatchDraw (bezierPatch *bpatch, int u_reso, int v_reso) |
|
void | bezierPatchListDraw (bezierPatch *list, int u_reso, int v_reso) |
|
◆ bezierPatch
◆ bezierPatchDelete()
◆ bezierPatchDeleteList()
Definition at line 109 of file bezierPatch.cc.
110{
116 }
117}
void bezierPatchDelete(bezierPatch *b)
◆ bezierPatchDraw()
Definition at line 175 of file bezierPatch.cc.
176{
179 else
181
183 v_reso, bpatch->
vmin, bpatch->
vmax);
185}
GLAPI void GLAPIENTRY glEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
GLAPI void GLAPIENTRY glMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
GLAPI void GLAPIENTRY glMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
Referenced by bezierPatchListDraw().
◆ bezierPatchEval()
Definition at line 142 of file bezierPatch.cc.
143{
144 if(
u >=
b->umin && u<= b->umax
146 {
147
148 bezierSurfEval(
b->umin,
b->umax,
b->uorder,
b->vmin,
b->vmax,
b->vorder,
b->dimension,
b->ctlpoints,
b->dimension *
b->vorder,
b->dimension,
u,
v,
ret);
149
150 }
151 else if(
b->next !=
NULL)
153 else
154 bezierSurfEval(
b->umin,
b->umax,
b->uorder,
b->vmin,
b->vmax,
b->vorder,
b->dimension,
b->ctlpoints,
b->dimension *
b->vorder,
b->dimension,
u,
v,
ret);
155}
void bezierSurfEval(float u0, float u1, int uorder, float v0, float v1, int vorder, int dimension, float *ctlpoints, int ustride, int vstride, float u, float v, float ret[])
void bezierPatchEval(bezierPatch *b, float u, float v, float ret[])
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Referenced by bezierPatchEval().
◆ bezierPatchEvalNormal()
Definition at line 159 of file bezierPatch.cc.
160{
161 bezierSurfEvalNormal(
b->umin,
b->umax,
b->uorder,
b->vmin,
b->vmax,
b->vorder,
b->dimension,
b->ctlpoints,
b->dimension *
b->vorder,
b->dimension,
u,
v,
ret);
162
163 if(
u >=
b->umin && u<= b->umax
165 {
166 bezierSurfEvalNormal(
b->umin,
b->umax,
b->uorder,
b->vmin,
b->vmax,
b->vorder,
b->dimension,
b->ctlpoints,
b->dimension *
b->vorder,
b->dimension,
u,
v,
ret);
167 }
168 else if(
b->next !=
NULL)
170 else
171 bezierSurfEvalNormal(
b->umin,
b->umax,
b->uorder,
b->vmin,
b->vmax,
b->vorder,
b->dimension,
b->ctlpoints,
b->dimension *
b->vorder,
b->dimension,
u,
v,
ret);
172
173}
void bezierSurfEvalNormal(float u0, float u1, int uorder, float v0, float v1, int vorder, int dimension, float *ctlpoints, int ustride, int vstride, float u, float v, float retNormal[])
void bezierPatchEvalNormal(bezierPatch *b, float u, float v, float ret[])
Referenced by bezierPatchEvalNormal().
◆ bezierPatchInsert()
◆ bezierPatchListDraw()
Definition at line 187 of file bezierPatch.cc.
188{
196#ifdef DEBUG
198#endif
199
200
203}
void bezierPatchDraw(bezierPatch *bpatch, int u_reso, int v_reso)
GLAPI void GLAPIENTRY glEnable(GLenum cap)
GLAPI void GLAPIENTRY glColor3f(GLfloat red, GLfloat green, GLfloat blue)
◆ bezierPatchMake()
Definition at line 52 of file bezierPatch.cc.
53{
62 ret->dimension = dimension;
65
67
69}
GLdouble GLdouble GLint GLint uorder
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint vorder
Referenced by bezierPatchMeshMake().
◆ bezierPatchMake2()
Definition at line 71 of file bezierPatch.cc.
72{
81 ret->dimension = dimension;
84
85
86 int the_ustride =
vorder * dimension;
87 int the_vstride = dimension;
90 for(
int k=0;
k<dimension;
k++)
92
94
96}
GLdouble GLdouble GLint ustride
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint vstride
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Referenced by bezierPatchMeshPutPatch().
◆ bezierPatchPrint()
Definition at line 126 of file bezierPatch.cc.
127{
129 printf(
"umin,umax=(%f,%f), (vmin, vmax)=(%f,%f)\n",
b->umin,
b->umax,
b->vmin,
b->vmax);
130 printf(
"uorder=%i, vorder=%i\n",
b->uorder,
b->vorder);
131 printf(
"idmension = %i\n",
b->dimension);
132}
Referenced by bezierPatchMeshPrint(), and bezierPatchPrintList().
◆ bezierPatchPrintList()
Definition at line 135 of file bezierPatch.cc.
136{
140}
void bezierPatchPrint(bezierPatch *b)