Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

SmoothShadeStripCB Class Reference

A callback class for rendering each faces of a Patch with a smooth (gouraud) shading style. More...

#include <smooth_shade.H>

Inheritance diagram for SmoothShadeStripCB:

Inheritance graph
[legend]
Collaboration diagram for SmoothShadeStripCB:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 SmoothShadeStripCB ()
virtual void begin_faces (TriStrip *)
virtual void end_faces (TriStrip *)
virtual void begin_edges (EdgeStrip *)
virtual void end_edges (EdgeStrip *)
virtual void begin_verts (VertStrip *)
virtual void end_verts (VertStrip *)
virtual void edgeCB (CBvert *v, CBedge *)
virtual void vertCB (CBvert *v)
Accessor Functions
void enable_texcoords ()
void disable_texcoords ()
bool texcoords_enabled ()
Callback Hooks
virtual void faceCB (CBvert *v, CBface *f)
 "face" callback.

Public Attributes

double alpha

Private Attributes

bool do_texcoords
 Should texture coordinates be sent to OpenGL with each vertex?

Detailed Description

A callback class for rendering each faces of a Patch with a smooth (gouraud) shading style.

Handles callbacks for drawing triangle strips for the SmoothShadeTexture GTexture.

See also:
SmoothShadeTexture

Definition at line 25 of file smooth_shade.H.


Constructor & Destructor Documentation

SmoothShadeStripCB::SmoothShadeStripCB  )  [inline]
 

Definition at line 29 of file smooth_shade.H.


Member Function Documentation

virtual void GLStripCB::begin_edges EdgeStrip  )  [inline, virtual, inherited]
 

Reimplemented from StripCB.

Reimplemented in StripColorCB.

Definition at line 37 of file util.H.

References GL_LINE_STRIP, and glBegin().

Referenced by StripColorCB::begin_edges().

virtual void GLStripCB::begin_faces TriStrip  )  [inline, virtual, inherited]
 

Reimplemented from StripCB.

Reimplemented in StripColorCB.

Definition at line 34 of file util.H.

References GL_TRIANGLE_STRIP, and glBegin().

Referenced by StripColorCB::begin_faces().

virtual void GLStripCB::begin_verts VertStrip  )  [inline, virtual, inherited]
 

Reimplemented from StripCB.

Reimplemented in StripColorCB.

Definition at line 40 of file util.H.

References GL_POINTS, and glBegin().

Referenced by StripColorCB::begin_verts().

void SmoothShadeStripCB::disable_texcoords  )  [inline]
 

Definition at line 35 of file smooth_shade.H.

References do_texcoords.

Referenced by SmoothShadeTexture::draw().

virtual void GLStripCB::edgeCB CBvert v,
CBedge
[inline, virtual, inherited]
 

Reimplemented from StripCB.

Reimplemented in ColorIDStripCB, and StripColorCB.

Definition at line 47 of file util.H.

References glVertex3dv(), and Bvert::loc().

Referenced by StripColorCB::edgeCB().

void SmoothShadeStripCB::enable_texcoords  )  [inline]
 

Definition at line 34 of file smooth_shade.H.

References do_texcoords.

Referenced by SmoothShadeTexture::draw().

virtual void GLStripCB::end_edges EdgeStrip  )  [inline, virtual, inherited]
 

Reimplemented from StripCB.

Definition at line 38 of file util.H.

References glEnd().

virtual void GLStripCB::end_faces TriStrip  )  [inline, virtual, inherited]
 

Reimplemented from StripCB.

Definition at line 35 of file util.H.

References glEnd().

virtual void GLStripCB::end_verts VertStrip  )  [inline, virtual, inherited]
 

Reimplemented from StripCB.

Definition at line 41 of file util.H.

References glEnd().

void SmoothShadeStripCB::faceCB CBvert v,
CBface f
[virtual]
 

"face" callback.

Issue vertex normals suitable for gouraud shading (plus colors, and texture and spatial coordinates) to OpenGL when drawing triangle strips.

Reimplemented from GLStripCB.

Definition at line 19 of file smooth_shade.C.

References Bvert::alpha(), StripCB::alpha, Bvert::color(), mlib::Point2< P, V >::data(), do_texcoords, UVdata::get_uv(), GL_COL(), glNormal3dv(), glTexCoord2dv(), glVertex3dv(), Bvert::has_color(), Bvert::loc(), UVdata::lookup(), Bface::patch(), Patch::tex_coord_gen(), TexCoordGen::uv_from_vert(), and Bface::vert_normal().

bool SmoothShadeStripCB::texcoords_enabled  )  [inline]
 

Definition at line 36 of file smooth_shade.H.

References do_texcoords.

virtual void GLStripCB::vertCB CBvert v  )  [inline, virtual, inherited]
 

Reimplemented from StripCB.

Reimplemented in ColorIDStripCB.

Definition at line 48 of file util.H.

References glVertex3dv(), and Bvert::loc().


Member Data Documentation

double StripCB::alpha [inherited]
 

Definition at line 39 of file stripcb.H.

Referenced by StripColorCB::begin_faces(), StripColorCB::begin_verts(), SmoothShadeTexture::draw(), LineDrawingTexture::draw(), FlatShadeTexture::draw(), CurvatureTexture::draw(), StripColorCB::edgeCB(), faceCB(), StripTexCoordsCB2::faceCB(), FlatShadeStripCB::faceCB(), and StripTexCoordsCB3::faceCB().

bool SmoothShadeStripCB::do_texcoords [private]
 

Should texture coordinates be sent to OpenGL with each vertex?

Definition at line 55 of file smooth_shade.H.

Referenced by disable_texcoords(), enable_texcoords(), faceCB(), and texcoords_enabled().


The documentation for this class was generated from the following files:
Generated on Mon Sep 18 11:47:17 2006 for jot by  doxygen 1.4.4