Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

vecgl.h File Reference

#include <celmath/vecmath.h>
#include <celmath/quaternion.h>
#include <celutil/color.h>

Include dependency graph for vecgl.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void glAmbientLightColor (const Color &color)
void glColor (const Color &c, float a)
void glColor (const Color &c)
void glLightColor (GLenum light, GLenum which, const Color &color)
void glLightColor (GLenum light, GLenum which, const Vec4f &color)
void glLightColor (GLenum light, GLenum which, const Vec3f &color)
void glLightDirection (GLenum light, const Vec3f &dir)
void glLightPosition (GLenum light, const Point3f &pos)
void glMatrix (const Mat4d &m)
void glMatrix (const Mat4f &m)
void glNormal (const Vec3f &n)
void glRotate (const Quatd &q)
void glRotate (const Quatf &q)
void glScale (const Vec3f &v)
void glTexCoord (const Point2f &p)
void glTranslate (const Point3f &p)
void glTranslate (const Vec3f &v)
void glVertex (const Vec3f &v)
void glVertex (const Point3f &p)


Function Documentation

void glAmbientLightColor const Color color  )  [inline]
 

Definition at line 116 of file vecgl.h.

References Vector4< T >::x.

Referenced by Renderer::render(), renderRings(), and renderSphereDefault().

00117 {
00118     glLightModelfv(GL_LIGHT_MODEL_AMBIENT,
00119                    &(Vec4f(color.red(), color.green(), color.blue(),
00120                            color.alpha()).x));
00121 }

void glColor const Color c,
float  a
[inline]
 

Definition at line 45 of file vecgl.h.

00046 {
00047     glColor4f(c.red(), c.green(), c.blue(), c.alpha() * a);
00048 }

void glColor const Color c  )  [inline]
 

Definition at line 40 of file vecgl.h.

Referenced by GLSL_RenderContext::makeCurrent(), VertexList::render(), Renderer::renderBodyAsParticle(), renderCompass(), Renderer::renderLabels(), Renderer::renderMarkers(), renderModelDefault(), Renderer::renderParticles(), Renderer::renderSortedLabels(), renderSphere_Combiners(), renderSphere_GLSL(), and renderSphereDefault().

00041 {
00042     glColor4f(c.red(), c.green(), c.blue(), c.alpha());
00043 }

void glLightColor GLenum  light,
GLenum  which,
const Color color
[inline]
 

Definition at line 110 of file vecgl.h.

References Vector4< T >::x.

00111 {
00112     glLightfv(light, which,
00113               &(Vec4f(color.red(), color.green(), color.blue(), color.alpha()).x));
00114 }

void glLightColor GLenum  light,
GLenum  which,
const Vec4f color
[inline]
 

Definition at line 105 of file vecgl.h.

00106 {
00107     glLightfv(light, which, &color.x);
00108 }

void glLightColor GLenum  light,
GLenum  which,
const Vec3f color
[inline]
 

Definition at line 100 of file vecgl.h.

References Vector4< T >::x.

Referenced by Renderer::renderObject().

00101 {
00102     glLightfv(light, which, &(Vec4f(color.x, color.y, color.z, 1.0f).x));
00103 }

void glLightDirection GLenum  light,
const Vec3f dir
[inline]
 

Definition at line 90 of file vecgl.h.

References Vector4< T >::x.

Referenced by Renderer::renderObject().

00091 {
00092     glLightfv(light, GL_POSITION, &(Vec4f(dir.x, dir.y, dir.z, 0.0f).x));
00093 }

void glLightPosition GLenum  light,
const Point3f pos
[inline]
 

Definition at line 95 of file vecgl.h.

References Vector4< T >::x.

00096 {
00097     glLightfv(light, GL_POSITION, &(Vec4f(pos.x, pos.y, pos.z, 1.0f).x));
00098 }

void glMatrix const Mat4d m  )  [inline]
 

Definition at line 58 of file vecgl.h.

00059 {
00060     Mat4d trans = m.transpose();
00061     glMultMatrixd(&trans[0].x);
00062 }

void glMatrix const Mat4f m  )  [inline]
 

Definition at line 51 of file vecgl.h.

Referenced by glRotate().

00052 {
00053     Mat4f trans = m.transpose();
00054     glMultMatrixf(&trans[0].x);
00055 }

void glNormal const Vec3f n  )  [inline]
 

Definition at line 30 of file vecgl.h.

00031 {
00032     glNormal3fv(&n.x);
00033 }

void glRotate const Quatd q  )  [inline]
 

Definition at line 70 of file vecgl.h.

References glMatrix().

00071 {
00072     glMatrix(q.toMatrix4());
00073 }

void glRotate const Quatf q  )  [inline]
 

Definition at line 65 of file vecgl.h.

References glMatrix().

Referenced by Renderer::render(), Nebula::render(), renderBumpMappedMesh(), Galaxy::renderGalaxyEllipsoid(), Renderer::renderObject(), Renderer::renderOrbits(), Renderer::renderPlanet(), renderSmoothMesh(), and transformOrbits().

00066 {
00067     glMatrix(q.toMatrix4());
00068 }

void glScale const Vec3f v  )  [inline]
 

Definition at line 85 of file vecgl.h.

Referenced by Renderer::renderObject().

00086 {
00087     glScalef(v.x, v.y, v.z);
00088 }

void glTexCoord const Point2f p  )  [inline]
 

Definition at line 35 of file vecgl.h.

00036 {
00037     glTexCoord2fv(&p.x);
00038 }

void glTranslate const Point3f p  )  [inline]
 

Definition at line 80 of file vecgl.h.

00081 {
00082     glTranslatef(p.x, p.y, p.z);
00083 }

void glTranslate const Vec3f v  )  [inline]
 

Definition at line 75 of file vecgl.h.

Referenced by DSORenderer::process(), Renderer::renderCometTail(), and Renderer::renderObject().

00076 {
00077     glTranslatef(v.x, v.y, v.z);
00078 }

void glVertex const Vec3f v  )  [inline]
 

Definition at line 25 of file vecgl.h.

00026 {
00027     glVertex3fv(&v.x);
00028 }

void glVertex const Point3f p  )  [inline]
 

Definition at line 20 of file vecgl.h.

Referenced by ProcessCometTailVertex(), Renderer::render(), LODSphereMesh::render(), ConstellationBoundaries::render(), renderAtmosphere(), Renderer::renderBodyAsParticle(), Renderer::renderCelestialSphere(), Renderer::renderCometTail(), renderCompass(), renderEclipseShadows(), Galaxy::renderGalaxyPointSprites(), and Renderer::renderParticles().

00021 {
00022     glVertex3fv(&p.x);
00023 }


Generated on Sat Jan 14 22:31:29 2006 for Celestia by  doxygen 1.4.1