Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

GeomIssuer Class Reference

This is a utility class used by the various GraphicsStateGuardians to issue the vertex/normal/etc commands to the rendering engine. More...

#include <geomIssuer.h>

List of all members.

Public Types

typedef void IssueVertex (const Geom *, Geom::VertexIterator &, GraphicsStateGuardianBase *gsg)
typedef void IssueNormal (const Geom *, Geom::NormalIterator &, GraphicsStateGuardianBase *gsg)
typedef void IssueTexCoord (const Geom *, Geom::TexCoordIterator &, GraphicsStateGuardianBase *gsg)
typedef void IssueColor (const Geom *, Geom::ColorIterator &, GraphicsStateGuardianBase *gsg)

Public Member Functions

 GeomIssuer ()
 The default constructor makes a no-op GeomIssuer.

 GeomIssuer (const Geom *geom, GraphicsStateGuardianBase *gsg, IssueVertex *vertex, IssueNormal *normal, IssueTexCoord *texcoord, IssueColor *color)
 This is the real constructor.

void issue_vertex (GeomBindType bind, Geom::VertexIterator &i)
 Uses the function pointers set up by the constructor to actually issue the vertex to the rendering backend.

void issue_normal (GeomBindType bind, Geom::NormalIterator &i)
 Uses the function pointers set up by the constructor to actually issue the normal to the rendering backend.

void issue_texcoord (GeomBindType bind, Geom::TexCoordIterator &i)
 Uses the function pointers set up by the constructor to actually issue the texCoord to the rendering backend.

void issue_color (GeomBindType bind, Geom::ColorIterator &i)
 Uses the function pointers set up by the constructor to actually issue the color to the rendering backend.


Protected Attributes

const Geom_geom
GraphicsStateGuardianBase_gsg
IssueVertex_vertex_command [num_GeomBindTypes]
IssueNormal_normal_command [num_GeomBindTypes]
IssueTexCoord_texcoord_command [num_GeomBindTypes]
IssueColor_color_command [num_GeomBindTypes]


Detailed Description

This is a utility class used by the various GraphicsStateGuardians to issue the vertex/normal/etc commands to the rendering engine.

Given a geom and a gsg, as well as a set of functions that actually do the work of issuing vertices etc. to the rendering backend, it configures itself so that subsequent calls to issue_normal() (for instance) will either do nothing or issue a normal, depending on whether the requested binding type matches the geom's actual binding type for normals, and on whether vertices are required by the current state.

Definition at line 60 of file geomIssuer.h.


Member Typedef Documentation

typedef void GeomIssuer::IssueColor(const Geom *, Geom::ColorIterator &, GraphicsStateGuardianBase *gsg)
 

Definition at line 72 of file geomIssuer.h.

Referenced by GLGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_quad(), and CRGraphicsStateGuardian::prepare_lens().

typedef void GeomIssuer::IssueNormal(const Geom *, Geom::NormalIterator &, GraphicsStateGuardianBase *gsg)
 

Definition at line 70 of file geomIssuer.h.

typedef void GeomIssuer::IssueTexCoord(const Geom *, Geom::TexCoordIterator &, GraphicsStateGuardianBase *gsg)
 

Definition at line 71 of file geomIssuer.h.

typedef void GeomIssuer::IssueVertex(const Geom *, Geom::VertexIterator &, GraphicsStateGuardianBase *gsg)
 

Definition at line 69 of file geomIssuer.h.


Constructor & Destructor Documentation

GeomIssuer::GeomIssuer  ) 
 

The default constructor makes a no-op GeomIssuer.

It's primarily intended to create the static _noop_issuer once and only once; normally, the real constructor, below, will be used.

Definition at line 64 of file geomIssuer.cxx.

References _geom, _gsg, _normal_command, _vertex_command, G_COORD, G_NORMAL, noop_issuer, and NULL.

GeomIssuer::GeomIssuer const Geom geom,
GraphicsStateGuardianBase gsg,
IssueVertex vertex,
IssueNormal normal,
IssueTexCoord texcoord,
IssueColor color
 

This is the real constructor.

Given a Geom, the current gsg, and a series of functions that, when called, will actually issue the vertex/normal/whatnot to the rendering engine. It will construct a GeomIssuer with these pointers in the appropriate places to either issue the component or do nothing, according to the requirements of the geom and of the current state of the gsg.

Definition at line 98 of file geomIssuer.cxx.


Member Function Documentation

void GeomIssuer::issue_color GeomBindType  bind,
Geom::ColorIterator i
[inline]
 

Uses the function pointers set up by the constructor to actually issue the color to the rendering backend.

If the color does not have the indicated bind type, nothing is done.

Definition at line 95 of file geomIssuer.I.

Referenced by GLGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_quad(), CRGraphicsStateGuardian::draw_sphere(), GLGraphicsStateGuardian::draw_trifan(), GLGraphicsStateGuardian::draw_tristrip(), and CRGraphicsStateGuardian::draw_tristrip().

void GeomIssuer::issue_normal GeomBindType  bind,
Geom::NormalIterator i
[inline]
 

Uses the function pointers set up by the constructor to actually issue the normal to the rendering backend.

If the normal does not have the indicated bind type, nothing is done.

Definition at line 57 of file geomIssuer.I.

Referenced by GLGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_quad(), GLGraphicsStateGuardian::draw_trifan(), GLGraphicsStateGuardian::draw_tristrip(), and CRGraphicsStateGuardian::draw_tristrip().

void GeomIssuer::issue_texcoord GeomBindType  bind,
Geom::TexCoordIterator i
[inline]
 

Uses the function pointers set up by the constructor to actually issue the texCoord to the rendering backend.

If the texCoord does not have the indicated bind type, nothing is done.

Definition at line 76 of file geomIssuer.I.

Referenced by GLGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_quad(), GLGraphicsStateGuardian::draw_trifan(), GLGraphicsStateGuardian::draw_tristrip(), and CRGraphicsStateGuardian::draw_tristrip().

void GeomIssuer::issue_vertex GeomBindType  bind,
Geom::VertexIterator i
[inline]
 

Uses the function pointers set up by the constructor to actually issue the vertex to the rendering backend.

If the vertex does not have the indicated bind type, nothing is done.

Definition at line 38 of file geomIssuer.I.

References _geom, _gsg, _normal_command, and INLINE.

Referenced by GLGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_quad(), GLGraphicsStateGuardian::draw_trifan(), GLGraphicsStateGuardian::draw_tristrip(), and CRGraphicsStateGuardian::draw_tristrip().


Member Data Documentation

IssueColor* GeomIssuer::_color_command[num_GeomBindTypes] [protected]
 

Definition at line 97 of file geomIssuer.h.

const Geom* GeomIssuer::_geom [protected]
 

Definition at line 92 of file geomIssuer.h.

Referenced by GeomIssuer(), and issue_vertex().

GraphicsStateGuardianBase* GeomIssuer::_gsg [protected]
 

Definition at line 93 of file geomIssuer.h.

Referenced by GeomIssuer(), and issue_vertex().

IssueNormal* GeomIssuer::_normal_command[num_GeomBindTypes] [protected]
 

Definition at line 95 of file geomIssuer.h.

Referenced by GeomIssuer(), and issue_vertex().

IssueTexCoord* GeomIssuer::_texcoord_command[num_GeomBindTypes] [protected]
 

Definition at line 96 of file geomIssuer.h.

IssueVertex* GeomIssuer::_vertex_command[num_GeomBindTypes] [protected]
 

Definition at line 94 of file geomIssuer.h.

Referenced by GeomIssuer().


The documentation for this class was generated from the following files:
Generated on Fri May 2 00:50:49 2003 for Panda by doxygen1.3