Main Page   Modules  

API Functions (OpenGL 1.0)

The SREL OpenGL 1.0 compatible API. More...

srelVelocity

Sets the current frame velocity.

All subsequent primitives will be rendered as if they are traveling at that velocity.

Note:
The values of the velocity components are in units of c. It is an error to specify a velocity with a speed greater than or equal to c. It is an error to execute this between an srelBegin/srelEnd pair.


void srelVelocityf (const GLfloat ux, const GLfloat uy, const GLfloat uz)
 Example:
 srelVelocityf(0.0,0.0,0.0);
 draw_rest_frame();
 srelVelocityf(0.0,0.2,0.5);
 draw_moving_frame1();
 srelVelocityf(0.8,0.0,-0.3);
 draw_moving_frame2();
.
More...


void srelVelocityfv (const GLfloat *u)

srelVertexTime

Returns the observed time at a vertex in the current frame specified by srelVelocity.

GLfloat srelVertexTime3f (GLfloat x, GLfloat y, GLfloat z)
GLfloat srelVertexTime3fv (const GLfloat *v)
GLfloat srelVertexTime3d (GLdouble x, GLdouble y, GLdouble z)
GLfloat srelVertexTime3dv (const GLdouble *v)

srelBegin/End

void srelBegin (GLenum mode)
 Begins a new group of vertices. More...

void srelEnd (void)
 Ends the current group of vertices.


srelVertex

Specifies a vertex which will undergo relativistic transformations.

void srelVertex2f (GLfloat x, GLfloat y)
void srelVertex2fv (const GLfloat *v)
void srelVertex2d (GLdouble x, GLdouble y)
void srelVertex2dv (const GLdouble *v)
void srelVertex3f (GLfloat x, GLfloat y, GLfloat z)
void srelVertex3fv (const GLfloat *v)
void srelVertex3d (GLdouble x, GLdouble y, GLdouble z)
void srelVertex3dv (const GLdouble *v)
void srelVertex4f (GLfloat x, GLfloat y, GLfloat z, GLfloat w)
void srelVertex4fv (const GLfloat *v)
void srelVertex4d (GLdouble x, GLdouble y, GLdouble z, GLdouble w)
void srelVertex4dv (const GLdouble *v)

srelNormal

Specifies a normal.

void srelNormal3f (GLfloat x, GLfloat y, GLfloat z)
void srelNormal3fv (const GLfloat *n)
void srelNormal3d (GLdouble x, GLdouble y, GLdouble z)
void srelNormal3dv (const GLdouble *n)

srelTexCoord

Specifies a texture coordinate.

void srelTexCoord1f (GLfloat s)
void srelTexCoord1fv (const GLfloat *v)
void srelTexCoord1d (GLdouble s)
void srelTexCoord1dv (const GLdouble *v)
void srelTexCoord2f (GLfloat s, GLfloat t)
void srelTexCoord2fv (const GLfloat *v)
void srelTexCoord2d (GLdouble s, GLdouble t)
void srelTexCoord2dv (const GLdouble *v)

srelColor

Specifies the material color.

void srelColor3f (GLfloat red, GLfloat green, GLfloat blue)
void srelColor3fv (const GLfloat *v)
void srelColor4f (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
void srelColor4fv (const GLfloat *v)

Functions

void srelDetail (const GLfloat detail)
 Sets the level of detail. More...

GLenum srelGetError (void)
 Returns error information. More...

void srelDoppler (const GLboolean flag)
 Sets whether the Doppler effect should be included in the lighting calculations. More...

void srelVelocityTransform (GLfloat *v)
 Transforms a velocity from the rest frame to the current frame specified by srelVelocity. More...

void srelLocalTime (const GLfloat t)
 Sets the time at the camera. More...

void srelMaterialfv (GLenum face, GLenum pname, const GLfloat *rgba)
 Specifies material parameters.


Detailed Description

The SREL OpenGL 1.0 compatible API.

Note:
The srel equivalent of any gl function should only be executed between an srelBegin/srelEnd pair.

Function Documentation

void srelBegin GLenum    mode
 

Begins a new group of vertices.

Parameters:
mode  Specifies the primitive mode (same values as glBegin).

void srelColor3f GLfloat    red,
GLfloat    green,
GLfloat    blue
 

Parameters:
red  The red component of a color.
green  The green component of a color.
blue  The blue component of a color.

void srelColor3fv const GLfloat *    v
 

Parameters:
v  A pointer to an array containing three color components.

void srelColor4f GLfloat    red,
GLfloat    green,
GLfloat    blue,
GLfloat    alpha
 

Parameters:
red  The red component of a color.
green  The green component of a color.
blue  The blue component of a color.
alpha  The alpha component of a color.

void srelColor4fv const GLfloat *    v
 

Parameters:
v  A pointer to an array containing four color components.

void srelDetail const GLfloat    detail
 

Sets the level of detail.

The value is the cosine of the maximum allowable angle that a line can deviate from its true position. It determines how many line segments should be used to represent a curve.

Parameters:
detail  A number greater than or equal to 0 and less than 1.
Exceptions:
GL_INVALID_OPERATION  If executed between an srelBegin/srelEnd pair.
GL_INVALID_VALUE  If detail is less than 0 or greater than or equal to 1.

void srelDoppler const GLboolean    flag
 

Sets whether the Doppler effect should be included in the lighting calculations.

Exceptions:
GL_INVALID_OPERATION  If executed between an srelBegin/srelEnd pair.

GLenum srelGetError void   
 

Returns error information.

Error flag is reset after return.

void srelLocalTime const GLfloat    t
 

Sets the time at the camera.

All subsequent primitives will be evolved forward to this time.

Example: (animation)

 for(float t=0.0;;t+=0.1) {
    srelLocalTime(t);
    redraw();
 }
Exceptions:
GL_INVALID_OPERATION  If executed between an srelBegin/srelEnd pair.

void srelNormal3d GLdouble    x,
GLdouble    y,
GLdouble    z
 

Parameters:
x  The x component of a normal.
y  The y component of a normal.
z  The z component of a normal.

void srelNormal3dv const GLdouble *    n
 

Parameters:
n  A pointer to an array containing three components.

void srelNormal3f GLfloat    x,
GLfloat    y,
GLfloat    z
 

Parameters:
x  The x component of a normal.
y  The y component of a normal.
z  The z component of a normal.

void srelNormal3fv const GLfloat *    n
 

Parameters:
n  A pointer to an array containing three components.

void srelTexCoord1d GLdouble    s
 

Parameters:
s  The s component of a texture.

void srelTexCoord1dv const GLdouble *    v
 

Parameters:
v  A pointer to an array containing one component.

void srelTexCoord1f GLfloat    s
 

Parameters:
s  The s component of a texture.

void srelTexCoord1fv const GLfloat *    v
 

Parameters:
v  A pointer to an array containing one component.

void srelTexCoord2d GLdouble    s,
GLdouble    t
 

Parameters:
s  The s component of a texture.
t  The t component of a texture.

void srelTexCoord2dv const GLdouble *    v
 

Parameters:
v  A pointer to an array containing two components.

void srelTexCoord2f GLfloat    s,
GLfloat    t
 

Parameters:
s  The s component of a texture.
t  The t component of a texture.

void srelTexCoord2fv const GLfloat *    v
 

Parameters:
v  A pointer to an array containing two components.

void srelVelocityTransform GLfloat *    v
 

Transforms a velocity from the rest frame to the current frame specified by srelVelocity.

Only really useful for moving between frames.

Parameters:
v  A pointer to an array containing the three velocity components (input/output).

void srelVelocityf const GLfloat    ux,
const GLfloat    uy,
const GLfloat    uz
 

Example:

 srelVelocityf(0.0,0.0,0.0);
 draw_rest_frame();
 srelVelocityf(0.0,0.2,0.5);
 draw_moving_frame1();
 srelVelocityf(0.8,0.0,-0.3);
 draw_moving_frame2();
.

Parameters:
ux  The x component of the velocity.
uy  The y component of the velocity.
uz  The z component of the velocity.
Exceptions:
GL_INVALID_OPERATION  If executed between an srelBegin/srelEnd pair.
GL_INVALID_VALUE  If the speed is greater than or equal to 1.

void srelVelocityfv const GLfloat *    u
 

Parameters:
u  A pointer to an array containing the three velocity components (input).
Exceptions:
GL_INVALID_OPERATION  If executed between an srelBegin/srelEnd pair.
GL_INVALID_VALUE  If the speed is greater than or equal to 1.

void srelVertex2d GLdouble    x,
GLdouble    y
 

Parameters:
x  The x component of a vertex.
y  The y component of a vertex.

void srelVertex2dv const GLdouble *    v
 

Parameters:
v  A pointer to an array containing two components.

void srelVertex2f GLfloat    x,
GLfloat    y
 

Parameters:
x  The x component of a vertex.
y  The y component of a vertex.

void srelVertex2fv const GLfloat *    v
 

Parameters:
v  A pointer to an array containing two components.

void srelVertex3d GLdouble    x,
GLdouble    y,
GLdouble    z
 

Parameters:
x  The x component of a vertex.
y  The y component of a vertex.
z  The z component of a vertex.

void srelVertex3dv const GLdouble *    v
 

Parameters:
v  A pointer to an array containing three components.

void srelVertex3f GLfloat    x,
GLfloat    y,
GLfloat    z
 

Parameters:
x  The x component of a vertex.
y  The y component of a vertex.
z  The z component of a vertex.

void srelVertex3fv const GLfloat *    v
 

Parameters:
v  A pointer to an array containing three components.

void srelVertex4d GLdouble    x,
GLdouble    y,
GLdouble    z,
GLdouble    w
 

Parameters:
x  The x component of a vertex.
y  The y component of a vertex.
z  The z component of a vertex.
w  The w component of a vertex.

void srelVertex4dv const GLdouble *    v
 

Parameters:
v  A pointer to an array containing four components.

void srelVertex4f GLfloat    x,
GLfloat    y,
GLfloat    z,
GLfloat    w
 

Parameters:
x  The x component of a vertex.
y  The y component of a vertex.
z  The z component of a vertex.
w  The w component of a vertex.

void srelVertex4fv const GLfloat *    v
 

Parameters:
v  A pointer to an array containing four components.

GLfloat srelVertexTime3d GLdouble    x,
GLdouble    y,
GLdouble    z
 

Parameters:
x  The x component of a vertex.
y  The y component of a vertex.
z  The z component of a vertex.

GLfloat srelVertexTime3dv const GLdouble *    v
 

Parameters:
v  A pointer to an array containing three components.

GLfloat srelVertexTime3f GLfloat    x,
GLfloat    y,
GLfloat    z
 

Parameters:
x  The x component of a vertex.
y  The y component of a vertex.
z  The z component of a vertex.

GLfloat srelVertexTime3fv const GLfloat *    v
 

Parameters:
v  A pointer to an array containing three components.


Generated on Wed Apr 17 18:05:03 2002 for SREL by doxygen1.2.11.1 written by Dimitri van Heesch, © 1997-2001