Go to the source code of this file.
|
void | bezierCurveEval (float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[]) |
|
void | bezierCurveEvalDer (float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retDer[]) |
|
void | bezierCurveEvalDerGen (int der, float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retDer[]) |
|
void | bezierSurfEvalDerGen (int uder, int vder, 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 | 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 | 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[]) |
|
◆ bezierCurveEval()
Definition at line 75 of file bezierEval.cc.
76{
77 float uprime = (
u-u0)/(
u1-u0);
78 float *ctlptr = ctlpoints;
79 float oneMinusX = 1.0f-uprime;
80 float XPower = 1.0f;
81
83 for(
k=0;
k<dimension;
k++)
84 retpoint[
k] = (*(ctlptr +
k));
85
88 XPower *= uprime;
89 for(
k=0;
k<dimension;
k++) {
91 }
92 }
93}
static float binomialCoefficients[8][8]
GLuint GLdouble GLdouble GLint GLint order
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 * u
Referenced by bezierCurveEvalDer(), and bezierCurveEvalDerGen().
◆ bezierCurveEvalDer()
Definition at line 125 of file bezierEval.cc.
126{
129 float *ctlptr = ctlpoints;
130
133 for(
k=0;
k<dimension;
k++)
135 }
137 for(
k=0;
k<dimension;
k++) {
139 }
141 }
142
144}
void bezierCurveEval(float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retpoint[])
GLint GLint GLsizei width
GLenum GLuint GLenum GLsizei const GLchar * buf
◆ bezierCurveEvalDerGen()
Definition at line 146 of file bezierEval.cc.
147{
149 float *ctlptr = ctlpoints;
152 if(der<0) der=0;
154 for(
k=0;
k<dimension;
k++){
156 }
158 }
159
160
161 for(
r=1;
r<=der;
r++){
163 for(
k=0;
k<dimension;
k++){
165 }
166 }
167 }
168
170}
GLdouble GLdouble GLdouble r
Referenced by bezierSurfEvalDerGen().
◆ bezierSurfEval()
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[] |
|
) |
| |
Definition at line 192 of file bezierEval.cc.
193{
194 bezierSurfEvalDerGen(0, 0, u0,
u1,
uorder,
v0,
v1,
vorder, dimension, ctlpoints,
ustride,
vstride,
u,
v,
ret);
195 if(dimension == 4) {
199 }
200}
void bezierSurfEvalDerGen(int uder, int vder, 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[])
GLdouble GLdouble GLint ustride
GLdouble GLdouble GLint GLint uorder
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint vorder
GLdouble GLdouble GLint GLint GLdouble GLdouble GLint vstride
Referenced by bezierPatchEval(), and bezierPatchMeshEval().
◆ bezierSurfEvalDerGen()
void bezierSurfEvalDerGen |
( |
int |
uder, |
|
|
int |
vder, |
|
|
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[] |
|
) |
| |
Definition at line 176 of file bezierEval.cc.
177{
180
182
184
185 }
186
188}
void bezierCurveEvalDerGen(int der, float u0, float u1, int order, float *ctlpoints, int stride, int dimension, float u, float retDer[])
Referenced by bezierSurfEval(), and bezierSurfEvalNormal().
◆ bezierSurfEvalNormal()
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[] |
|
) |
| |
Definition at line 202 of file bezierEval.cc.
203{
204 float partialU[4];
205 float partialV[4];
206 assert(dimension>=3 && dimension <=4);
207 bezierSurfEvalDerGen(1,0, u0,
u1,
uorder,
v0,
v1,
vorder, dimension, ctlpoints,
ustride,
vstride,
u,
v, partialU);
208 bezierSurfEvalDerGen(0,1, u0,
u1,
uorder,
v0,
v1,
vorder, dimension, ctlpoints,
ustride,
vstride,
u,
v, partialV);
209
210 if(dimension == 3){
212
214
215 return;
216 }
217 else {
222 bezierSurfEvalDerGen(0,0, u0,
u1,
uorder,
v0,
v1,
vorder, dimension, ctlpoints,
ustride,
vstride,
u,
v,
val);
223
225 newPartialU[
i] = partialU[
i] *
val[3] -
val[
i] * partialU[3];
226 newPartialV[
i] = partialV[
i] *
val[3] -
val[
i] * partialV[3];
227 }
230 }
231}
static void normalize(float vec[3])
static void crossProduct(float x[3], float y[3], float ret[3])
Referenced by bezierPatchEvalNormal(), and bezierPatchMeshEval().