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

Geom Class Reference

#include <geom.h>

Inheritance diagram for Geom:

dDrawable ReferenceCount WritableConfigurable BoundedObject TypedWritable TypedObject GeomLine GeomLinestrip GeomPoint GeomPolygon GeomQuad GeomSphere GeomSprite GeomTri GeomTrifan GeomTristrip List of all members.

Public Types

typedef const VertexfGetNextVertex (VertexIterator &)
typedef const NormalfGetNextNormal (NormalIterator &)
typedef const TexCoordfGetNextTexCoord (TexCoordIterator &)
typedef const ColorfGetNextColor (ColorIterator &)

Public Member Functions

 Geom ()
 Geom (const Geom &copy)
 ~Geom ()
void operator= (const Geom &copy)
virtual Geom * make_copy () const=0
virtual void output (ostream &out) const
void write_verbose (ostream &out, int indent_level) const
virtual void draw (GraphicsStateGuardianBase *gsg)
virtual void config ()
virtual void draw_immediate (GraphicsStateGuardianBase *gsg, GeomContext *gc)=0
virtual void print_draw_immediate () const=0
void calc_tight_bounds (LPoint3f &min_point, LPoint3f &max_point, bool &found_any) const
void transform_vertices (const LMatrix4f &mat)
void set_coords (const PTA_Vertexf &coords, const PTA_ushort &vindex=PTA_ushort())
void set_coords (const PTA_Vertexf &coords, GeomBindType bind, const PTA_ushort &vindex=PTA_ushort())
void set_normals (const PTA_Normalf &norms, GeomBindType bind, const PTA_ushort &nindex=PTA_ushort())
void set_colors (const PTA_Colorf &colors, GeomBindType bind, const PTA_ushort &cindex=PTA_ushort())
void set_texcoords (const PTA_TexCoordf &texcoords, GeomBindType bind, const PTA_ushort &tindex=PTA_ushort())
void get_coords (PTA_Vertexf &coords, GeomBindType &bind, PTA_ushort &vindex) const
void get_coords (PTA_Vertexf &coords, PTA_ushort &vindex) const
void get_normals (PTA_Normalf &norms, GeomBindType &bind, PTA_ushort &nindex) const
void get_colors (PTA_Colorf &colors, GeomBindType &bind, PTA_ushort &cindex) const
void get_texcoords (PTA_TexCoordf &texcoords, GeomBindType &bind, PTA_ushort &tindex) const
virtual bool is_dynamic () const
INLINE const PTA_Vertexfget_coords_array () const
INLINE const PTA_Normalfget_normals_array () const
INLINE const PTA_Colorfget_colors_array () const
INLINE const PTA_TexCoordfget_texcoords_array () const
INLINE const PTA_ushortget_coords_index () const
INLINE const PTA_ushortget_normals_index () const
INLINE const PTA_ushortget_colors_index () const
INLINE const PTA_ushortget_texcoords_index () const
INLINE void set_num_prims (int num)
INLINE int get_num_prims () const
INLINE void set_lengths (const PTA_int &lengths)
INLINE PTA_int get_lengths () const
virtual int get_num_vertices_per_prim () const=0
virtual int get_num_more_vertices_than_components () const=0
virtual bool uses_components () const=0
int get_num_vertices () const
virtual int get_length (int prim) const=0
virtual Geom * explode () const
virtual PTA_ushort get_tris () const
INLINE VertexIterator make_vertex_iterator () const
INLINE const Vertexfget_next_vertex (VertexIterator &viterator) const
INLINE NormalIterator make_normal_iterator () const
INLINE const Normalfget_next_normal (NormalIterator &niterator) const
INLINE TexCoordIterator make_texcoord_iterator () const
INLINE const TexCoordfget_next_texcoord (TexCoordIterator &tciterator) const
INLINE ColorIterator make_color_iterator () const
INLINE const Colorfget_next_color (ColorIterator &citerator) const
GeomContextprepare (GraphicsStateGuardianBase *gsg)
void unprepare ()
void unprepare (GraphicsStateGuardianBase *gsg)
void clear_gsg (GraphicsStateGuardianBase *gsg)
virtual void write_datagram (BamWriter *manager, Datagram &me)
virtual TypeHandle get_type () const
virtual TypeHandle force_init_type ()

Static Public Member Functions

TypeHandle get_class_type ()
void init_type ()

Public Attributes

PUBLISHED __pad0__: void write(ostream &out
PUBLISHED int indent_level = 0) const
PUBLISHED __pad1__: INLINE GeomBindType get_binding(int attr) const

Protected Member Functions

void init ()
virtual BoundingVolumerecompute_bound ()
void fillin (DatagramIterator &scan, BamReader *manager)

Protected Attributes

PTA_Vertexf _coords
PTA_Normalf _norms
PTA_Colorf _colors
PTA_TexCoordf _texcoords
PTA_ushort _vindex
PTA_ushort _nindex
PTA_ushort _cindex
PTA_ushort _tindex
int _numprims
int _num_vertices
PTA_int _primlengths
enum GeomBindType _bind [num_GeomAttrTypes]
GetNextVertex_get_vertex
GetNextNormal_get_normal
GetNextTexCoord_get_texcoord
GetNextColor_get_color
GraphicsStateGuardianBase_prepared_gsg
GeomContext_prepared_context

Static Private Attributes

TypeHandle _type_handle

Member Typedef Documentation

typedef const Colorf& Geom::GetNextColor(ColorIterator &)
 

Definition at line 110 of file geom.h.

typedef const Normalf& Geom::GetNextNormal(NormalIterator &)
 

Definition at line 108 of file geom.h.

typedef const TexCoordf& Geom::GetNextTexCoord(TexCoordIterator &)
 

Definition at line 109 of file geom.h.

typedef const Vertexf& Geom::GetNextVertex(VertexIterator &)
 

Definition at line 107 of file geom.h.


Constructor & Destructor Documentation

Geom::Geom  ) 
 

Definition at line 140 of file geom.cxx.

References _prepared_context, _prepared_gsg, init(), and NULL.

Geom::Geom const Geom &  copy  ) 
 

Definition at line 152 of file geom.cxx.

References _prepared_context, _prepared_gsg, and NULL.

Geom::~Geom  ) 
 

Definition at line 164 of file geom.cxx.

References unprepare().


Member Function Documentation

void Geom::calc_tight_bounds LPoint3f &  min_point,
LPoint3f &  max_point,
bool &  found_any
const
 

Definition at line 211 of file geom.cxx.

References get_length(), get_next_vertex(), get_num_prims(), length, make_vertex_iterator(), p, v, and Vertexf.

Referenced by TextNode::assemble_row().

void Geom::clear_gsg GraphicsStateGuardianBase gsg  ) 
 

Definition at line 617 of file geom.cxx.

References _prepared_context, _prepared_gsg, and NULL.

void Geom::config  )  [virtual]
 

Reimplemented from WritableConfigurable.

Definition at line 479 of file geom.cxx.

References _bind, _cindex, _colors, _coords, _get_color, _get_normal, _get_texcoord, _get_vertex, _nindex, _norms, _texcoords, _tindex, _vindex, Colorf, WritableConfigurable::config(), G_COLOR, G_COORD, G_NORMAL, G_OFF, G_TEXCOORD, get_color_indexed(), get_color_nonindexed(), get_color_noop(), get_normal_indexed(), get_normal_nonindexed(), get_normal_noop(), get_texcoord_indexed(), get_texcoord_nonindexed(), get_texcoord_noop(), get_vertex_indexed(), get_vertex_nonindexed(), Normalf, TexCoordf, unprepare(), ushort, and Vertexf.

Referenced by draw(), GeomLine::make_GeomLine(), GeomLinestrip::make_GeomLinestrip(), GeomPoint::make_GeomPoint(), GeomPolygon::make_GeomPolygon(), GeomQuad::make_GeomQuad(), GeomSphere::make_GeomSphere(), GeomSprite::make_GeomSprite(), GeomTri::make_GeomTri(), GeomTrifan::make_GeomTrifan(), and GeomTristrip::make_GeomTristrip().

void Geom::draw GraphicsStateGuardianBase gsg  )  [virtual]
 

Reimplemented from dDrawable.

Definition at line 462 of file geom.cxx.

References _prepared_context, _prepared_gsg, config(), draw_immediate(), WritableConfigurable::is_dirty(), and NULL.

Referenced by GraphicsStateGuardian::draw_geom_node(), GLGraphicsStateGuardian::draw_geom_node(), CRGraphicsStateGuardian::draw_geom_node(), and DXGraphicsStateGuardian7::prepare_texture().

virtual void Geom::draw_immediate GraphicsStateGuardianBase gsg,
GeomContext gc
[pure virtual]
 

Implemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, and GeomTristrip.

Referenced by draw().

Geom * Geom::explode  )  const [virtual]
 

Reimplemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomSphere, GeomSprite, GeomTrifan, and GeomTristrip.

Definition at line 432 of file geom.cxx.

References make_copy().

void Geom::fillin DatagramIterator scan,
BamReader manager
[protected]
 

Reimplemented from dDrawable.

Reimplemented in GeomLine, GeomLinestrip, GeomPoint, and GeomSprite.

Definition at line 732 of file geom.cxx.

References _bind, _cindex, _colors, _coords, _nindex, _norms, _num_vertices, _numprims, _primlengths, _texcoords, _tindex, _vindex, GeomBindType, get_num_vertices_per_prim(), DatagramIterator::get_uint16(), DatagramIterator::get_uint8(), READ_PTA, and uses_components().

Referenced by GeomSprite::fillin(), GeomPoint::fillin(), GeomLinestrip::fillin(), GeomLine::fillin(), GeomPolygon::make_GeomPolygon(), GeomQuad::make_GeomQuad(), GeomSphere::make_GeomSphere(), GeomTri::make_GeomTri(), GeomTrifan::make_GeomTrifan(), and GeomTristrip::make_GeomTristrip().

virtual TypeHandle Geom::force_init_type void   )  [inline, virtual]
 

Reimplemented from dDrawable.

Reimplemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, and GeomTristrip.

Definition at line 288 of file geom.h.

References ReferenceCount::get_class_type(), and dDrawable::init_type().

TypeHandle Geom::get_class_type void   )  [inline, static]
 

Reimplemented from ReferenceCount.

Definition at line 277 of file geom.h.

Referenced by SceneGraphAnalyzer::collect_statistics(), StaticTextFont::find_character_gsets(), GeomTristrip::force_init_type(), GeomTrifan::force_init_type(), GeomTri::force_init_type(), GeomSprite::force_init_type(), GeomSphere::force_init_type(), GeomQuad::force_init_type(), GeomPolygon::force_init_type(), GeomPoint::force_init_type(), GeomLinestrip::force_init_type(), GeomLine::force_init_type(), GeomTristrip::get_type(), GeomTrifan::get_type(), GeomTri::get_type(), GeomSprite::get_type(), GeomSphere::get_type(), GeomQuad::get_type(), GeomPolygon::get_type(), GeomPoint::get_type(), GeomLinestrip::get_type(), GeomLine::get_type(), GeomTristrip::init_type(), GeomTrifan::init_type(), GeomTri::init_type(), GeomSprite::init_type(), GeomSphere::init_type(), GeomQuad::init_type(), GeomPolygon::init_type(), GeomPoint::init_type(), GeomLinestrip::init_type(), GeomLine::init_type(), DXGraphicsStateGuardian7::prepare_texture(), GeomTristrip::register_with_read_factory(), GeomTrifan::register_with_read_factory(), GeomTri::register_with_read_factory(), GeomSprite::register_with_read_factory(), GeomSphere::register_with_read_factory(), GeomQuad::register_with_read_factory(), GeomPolygon::register_with_read_factory(), GeomPoint::register_with_read_factory(), GeomLinestrip::register_with_read_factory(), and GeomLine::register_with_read_factory().

void Geom::get_colors PTA_Colorf colors,
GeomBindType bind,
PTA_ushort cindex
const
 

Definition at line 385 of file geom.cxx.

References _bind, _cindex, _colors, and G_COLOR.

Referenced by DXGraphicsStateGuardian8::draw_multitri(), DXGraphicsStateGuardian7::draw_multitri(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_point(), DXGraphicsStateGuardian8::draw_tri(), DXGraphicsStateGuardian7::draw_tri(), GeomTransformer::transform_colors(), and write_verbose().

INLINE const PTA_Colorf& Geom::get_colors_array  )  const
 

INLINE const PTA_ushort& Geom::get_colors_index  )  const
 

void Geom::get_coords PTA_Vertexf coords,
PTA_ushort vindex
const
 

Definition at line 345 of file geom.cxx.

References _coords, and _vindex.

void Geom::get_coords PTA_Vertexf coords,
GeomBindType bind,
PTA_ushort vindex
const
 

Definition at line 359 of file geom.cxx.

References _bind, _coords, _vindex, and G_COORD.

Referenced by CollisionTraverser::compare_collider_to_geom(), DXGraphicsStateGuardian8::draw_multitri(), DXGraphicsStateGuardian7::draw_multitri(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_point(), DXGraphicsStateGuardian8::draw_prim_setup(), DXGraphicsStateGuardian7::draw_prim_setup(), DXGraphicsStateGuardian8::draw_tri(), DXGraphicsStateGuardian7::draw_tri(), PT(), GeomTransformer::transform_vertices(), transform_vertices(), and write_verbose().

INLINE const PTA_Vertexf& Geom::get_coords_array  )  const
 

INLINE const PTA_ushort& Geom::get_coords_index  )  const
 

virtual int Geom::get_length int  prim  )  const [pure virtual]
 

Implemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, and GeomTristrip.

Referenced by calc_tight_bounds(), SceneGraphAnalyzer::collect_statistics(), CPT(), RIBGraphicsStateGuardian::draw_simple_poly(), and recompute_bound().

INLINE PTA_int Geom::get_lengths  )  const
 

Referenced by describe_attr(), GLGraphicsStateGuardian::draw_linestrip(), CRGraphicsStateGuardian::draw_linestrip(), DXGraphicsStateGuardian8::draw_linestrip_base(), DXGraphicsStateGuardian7::draw_linestrip_base(), DXGraphicsStateGuardian8::draw_multitri(), DXGraphicsStateGuardian7::draw_multitri(), GLGraphicsStateGuardian::draw_polygon(), CRGraphicsStateGuardian::draw_polygon(), GLGraphicsStateGuardian::draw_trifan(), CRGraphicsStateGuardian::draw_trifan(), GLGraphicsStateGuardian::draw_tristrip(), and CRGraphicsStateGuardian::draw_tristrip().

INLINE const Colorf& Geom::get_next_color ColorIterator citerator  )  const
 

Referenced by GLGraphicsStateGuardian::draw_sprite(), CRGraphicsStateGuardian::draw_sprite(), GeomTristrip::explode(), GeomTrifan::explode(), issue_color_gl(), issue_color_rib(), and issue_transformed_color_gl().

INLINE const Normalf& Geom::get_next_normal NormalIterator niterator  )  const
 

Referenced by DXGraphicsStateGuardian8::draw_line(), DXGraphicsStateGuardian7::draw_line(), DXGraphicsStateGuardian8::draw_linestrip_base(), DXGraphicsStateGuardian7::draw_linestrip_base(), DXGraphicsStateGuardian8::draw_multitri(), DXGraphicsStateGuardian7::draw_multitri(), DXGraphicsStateGuardian8::draw_prim_setup(), DXGraphicsStateGuardian7::draw_prim_setup(), DXGraphicsStateGuardian8::draw_tri(), DXGraphicsStateGuardian7::draw_tri(), GeomTristrip::explode(), GeomTrifan::explode(), issue_normal_gl(), and issue_normal_rib().

INLINE const TexCoordf& Geom::get_next_texcoord TexCoordIterator tciterator  )  const
 

Referenced by GeomTristrip::explode(), GeomTrifan::explode(), issue_texcoord_gl(), issue_texcoord_rib(), and SpriteParticleRenderer::set_from_node().

INLINE const Vertexf& Geom::get_next_vertex VertexIterator viterator  )  const
 

Referenced by calc_tight_bounds(), CPT(), GLGraphicsStateGuardian::draw_sphere(), DXGraphicsStateGuardian8::draw_sphere(), DXGraphicsStateGuardian7::draw_sphere(), CRGraphicsStateGuardian::draw_sphere(), GLGraphicsStateGuardian::draw_sprite(), DXGraphicsStateGuardian8::draw_sprite(), DXGraphicsStateGuardian7::draw_sprite(), CRGraphicsStateGuardian::draw_sprite(), GeomTristrip::explode(), GeomTrifan::explode(), issue_vertex_gl(), issue_vertex_rib(), recompute_bound(), and ProjectionScreen::recompute_geom().

void Geom::get_normals PTA_Normalf norms,
GeomBindType bind,
PTA_ushort nindex
const
 

Definition at line 372 of file geom.cxx.

References _bind, _nindex, _norms, and G_NORMAL.

Referenced by SceneGraphAnalyzer::collect_statistics(), DXGraphicsStateGuardian8::draw_multitri(), DXGraphicsStateGuardian7::draw_multitri(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_point(), DXGraphicsStateGuardian8::draw_tri(), DXGraphicsStateGuardian7::draw_tri(), GeomTransformer::transform_vertices(), and write_verbose().

INLINE const PTA_Normalf& Geom::get_normals_array  )  const
 

INLINE const PTA_ushort& Geom::get_normals_index  )  const
 

virtual int Geom::get_num_more_vertices_than_components  )  const [pure virtual]
 

Implemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, and GeomTristrip.

Referenced by SceneGraphAnalyzer::collect_statistics(), describe_attr(), and DXGraphicsStateGuardian7::draw_multitri().

INLINE int Geom::get_num_prims  )  const
 

Referenced by calc_tight_bounds(), SceneGraphAnalyzer::collect_statistics(), CPT(), describe_attr(), GLGraphicsStateGuardian::draw_line(), DXGraphicsStateGuardian8::draw_line(), DXGraphicsStateGuardian7::draw_line(), CRGraphicsStateGuardian::draw_line(), GLGraphicsStateGuardian::draw_linestrip(), CRGraphicsStateGuardian::draw_linestrip(), DXGraphicsStateGuardian8::draw_linestrip_base(), DXGraphicsStateGuardian7::draw_linestrip_base(), DXGraphicsStateGuardian8::draw_multitri(), DXGraphicsStateGuardian7::draw_multitri(), GLGraphicsStateGuardian::draw_point(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_point(), CRGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_polygon(), CRGraphicsStateGuardian::draw_polygon(), GLGraphicsStateGuardian::draw_quad(), CRGraphicsStateGuardian::draw_quad(), RIBGraphicsStateGuardian::draw_simple_poly(), GLGraphicsStateGuardian::draw_sphere(), DXGraphicsStateGuardian8::draw_sphere(), DXGraphicsStateGuardian7::draw_sphere(), CRGraphicsStateGuardian::draw_sphere(), GLGraphicsStateGuardian::draw_sprite(), DXGraphicsStateGuardian8::draw_sprite(), DXGraphicsStateGuardian7::draw_sprite(), CRGraphicsStateGuardian::draw_sprite(), GLGraphicsStateGuardian::draw_tri(), DXGraphicsStateGuardian8::draw_tri(), DXGraphicsStateGuardian7::draw_tri(), CRGraphicsStateGuardian::draw_tri(), GLGraphicsStateGuardian::draw_trifan(), CRGraphicsStateGuardian::draw_trifan(), GLGraphicsStateGuardian::draw_tristrip(), CRGraphicsStateGuardian::draw_tristrip(), GeomTristrip::explode(), GeomTrifan::explode(), DXGraphicsStateGuardian7::prepare_texture(), recompute_bound(), and write_verbose().

int Geom::get_num_vertices  )  const
 

Referenced by GLGraphicsStateGuardian::draw_line(), DXGraphicsStateGuardian8::draw_line(), DXGraphicsStateGuardian7::draw_line(), CRGraphicsStateGuardian::draw_line(), GLGraphicsStateGuardian::draw_linestrip(), CRGraphicsStateGuardian::draw_linestrip(), DXGraphicsStateGuardian8::draw_linestrip_base(), DXGraphicsStateGuardian7::draw_linestrip_base(), GLGraphicsStateGuardian::draw_point(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_point(), CRGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_polygon(), DXGraphicsStateGuardian8::draw_polygon(), DXGraphicsStateGuardian7::draw_polygon(), CRGraphicsStateGuardian::draw_polygon(), GLGraphicsStateGuardian::draw_quad(), DXGraphicsStateGuardian8::draw_quad(), DXGraphicsStateGuardian7::draw_quad(), CRGraphicsStateGuardian::draw_quad(), GLGraphicsStateGuardian::draw_sphere(), DXGraphicsStateGuardian8::draw_sphere(), DXGraphicsStateGuardian7::draw_sphere(), CRGraphicsStateGuardian::draw_sphere(), GLGraphicsStateGuardian::draw_sprite(), CRGraphicsStateGuardian::draw_sprite(), GLGraphicsStateGuardian::draw_tri(), DXGraphicsStateGuardian8::draw_tri(), DXGraphicsStateGuardian7::draw_tri(), CRGraphicsStateGuardian::draw_tri(), GLGraphicsStateGuardian::draw_trifan(), DXGraphicsStateGuardian8::draw_trifan(), DXGraphicsStateGuardian7::draw_trifan(), CRGraphicsStateGuardian::draw_trifan(), GLGraphicsStateGuardian::draw_tristrip(), DXGraphicsStateGuardian8::draw_tristrip(), DXGraphicsStateGuardian7::draw_tristrip(), CRGraphicsStateGuardian::draw_tristrip(), DXGraphicsStateGuardian7::prepare_texture(), ProjectionScreen::recompute_geom(), and SpriteParticleRenderer::set_from_node().

virtual int Geom::get_num_vertices_per_prim  )  const [pure virtual]
 

Implemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, and GeomTristrip.

Referenced by SceneGraphAnalyzer::collect_statistics(), describe_attr(), and fillin().

void Geom::get_texcoords PTA_TexCoordf texcoords,
GeomBindType bind,
PTA_ushort tindex
const
 

Definition at line 398 of file geom.cxx.

References _bind, _texcoords, _tindex, and G_TEXCOORD.

Referenced by DXGraphicsStateGuardian8::draw_multitri(), DXGraphicsStateGuardian7::draw_multitri(), DXGraphicsStateGuardian8::draw_point(), DXGraphicsStateGuardian7::draw_point(), DXGraphicsStateGuardian8::draw_prim_setup(), DXGraphicsStateGuardian7::draw_prim_setup(), DXGraphicsStateGuardian8::draw_tri(), DXGraphicsStateGuardian7::draw_tri(), SpriteParticleRenderer::set_from_node(), GeomTransformer::transform_texcoords(), and write_verbose().

INLINE const PTA_TexCoordf& Geom::get_texcoords_array  )  const
 

INLINE const PTA_ushort& Geom::get_texcoords_index  )  const
 

PTA_ushort Geom::get_tris  )  const [virtual]
 

Reimplemented in GeomQuad, GeomTri, GeomTrifan, and GeomTristrip.

Definition at line 452 of file geom.cxx.

References PTA_ushort.

Referenced by CollisionTraverser::compare_collider_to_geom().

virtual TypeHandle Geom::get_type void   )  const [inline, virtual]
 

Reimplemented from dDrawable.

Reimplemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, and GeomTristrip.

Definition at line 285 of file geom.h.

References ReferenceCount::get_class_type().

Referenced by SceneGraphAnalyzer::collect_statistics(), output(), and write_verbose().

void Geom::init  )  [protected]
 

Definition at line 630 of file geom.cxx.

References _bind, _cindex, _colors, _coords, _get_color, _get_normal, _get_texcoord, _get_vertex, _nindex, _norms, _primlengths, _texcoords, _tindex, _vindex, PointerToArray< int >::clear(), PointerToArray< unsigned short >::clear(), PointerToArray< TexCoordf >::clear(), PointerToArray< Colorf >::clear(), PointerToArray< Normalf >::clear(), PointerToArray< Vertexf >::clear(), WritableConfigurable::config(), G_OFF, get_color_noop(), get_normal_noop(), get_texcoord_noop(), and get_vertex_noop().

Referenced by Geom().

void Geom::init_type void   )  [inline, static]
 

Reimplemented from dDrawable.

Reimplemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, and GeomTristrip.

Definition at line 280 of file geom.h.

References ReferenceCount::get_class_type(), dDrawable::init_type(), and register_type().

Referenced by ConfigureFn(), GeomTristrip::force_init_type(), GeomTrifan::force_init_type(), GeomTri::force_init_type(), GeomSprite::force_init_type(), GeomSphere::force_init_type(), GeomQuad::force_init_type(), GeomPolygon::force_init_type(), GeomPoint::force_init_type(), GeomLinestrip::force_init_type(), GeomLine::force_init_type(), GeomTristrip::init_type(), GeomTrifan::init_type(), GeomTri::init_type(), GeomSprite::init_type(), GeomSphere::init_type(), GeomQuad::init_type(), GeomPolygon::init_type(), GeomPoint::init_type(), GeomLinestrip::init_type(), and GeomLine::init_type().

bool Geom::is_dynamic  )  const [virtual]
 

Reimplemented from dDrawable.

Definition at line 415 of file geom.cxx.

References _vindex, and ushort.

Referenced by DXGraphicsStateGuardian7::prepare_texture().

INLINE ColorIterator Geom::make_color_iterator  )  const
 

Referenced by GLGraphicsStateGuardian::draw_line(), CRGraphicsStateGuardian::draw_line(), GLGraphicsStateGuardian::draw_linestrip(), CRGraphicsStateGuardian::draw_linestrip(), GLGraphicsStateGuardian::draw_point(), CRGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_polygon(), CRGraphicsStateGuardian::draw_polygon(), DXGraphicsStateGuardian8::draw_prim_setup(), DXGraphicsStateGuardian7::draw_prim_setup(), GLGraphicsStateGuardian::draw_quad(), CRGraphicsStateGuardian::draw_quad(), RIBGraphicsStateGuardian::draw_simple_poly(), GLGraphicsStateGuardian::draw_sphere(), DXGraphicsStateGuardian8::draw_sphere(), DXGraphicsStateGuardian7::draw_sphere(), CRGraphicsStateGuardian::draw_sphere(), GLGraphicsStateGuardian::draw_sprite(), DXGraphicsStateGuardian8::draw_sprite(), DXGraphicsStateGuardian7::draw_sprite(), CRGraphicsStateGuardian::draw_sprite(), GLGraphicsStateGuardian::draw_tri(), CRGraphicsStateGuardian::draw_tri(), GLGraphicsStateGuardian::draw_trifan(), CRGraphicsStateGuardian::draw_trifan(), GLGraphicsStateGuardian::draw_tristrip(), CRGraphicsStateGuardian::draw_tristrip(), GeomTristrip::explode(), and GeomTrifan::explode().

virtual Geom* Geom::make_copy  )  const [pure virtual]
 

Implemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, and GeomTristrip.

Referenced by explode().

INLINE NormalIterator Geom::make_normal_iterator  )  const
 

Referenced by GLGraphicsStateGuardian::draw_line(), GLGraphicsStateGuardian::draw_linestrip(), GLGraphicsStateGuardian::draw_point(), CRGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_polygon(), CRGraphicsStateGuardian::draw_polygon(), DXGraphicsStateGuardian8::draw_prim_setup(), DXGraphicsStateGuardian7::draw_prim_setup(), GLGraphicsStateGuardian::draw_quad(), CRGraphicsStateGuardian::draw_quad(), RIBGraphicsStateGuardian::draw_simple_poly(), GLGraphicsStateGuardian::draw_tri(), CRGraphicsStateGuardian::draw_tri(), GLGraphicsStateGuardian::draw_trifan(), CRGraphicsStateGuardian::draw_trifan(), GLGraphicsStateGuardian::draw_tristrip(), CRGraphicsStateGuardian::draw_tristrip(), GeomTristrip::explode(), and GeomTrifan::explode().

INLINE TexCoordIterator Geom::make_texcoord_iterator  )  const
 

Referenced by GLGraphicsStateGuardian::draw_line(), GLGraphicsStateGuardian::draw_linestrip(), GLGraphicsStateGuardian::draw_point(), CRGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_polygon(), CRGraphicsStateGuardian::draw_polygon(), DXGraphicsStateGuardian8::draw_prim_setup(), DXGraphicsStateGuardian7::draw_prim_setup(), GLGraphicsStateGuardian::draw_quad(), CRGraphicsStateGuardian::draw_quad(), RIBGraphicsStateGuardian::draw_simple_poly(), GLGraphicsStateGuardian::draw_tri(), CRGraphicsStateGuardian::draw_tri(), GLGraphicsStateGuardian::draw_trifan(), CRGraphicsStateGuardian::draw_trifan(), GLGraphicsStateGuardian::draw_tristrip(), CRGraphicsStateGuardian::draw_tristrip(), GeomTristrip::explode(), GeomTrifan::explode(), and SpriteParticleRenderer::set_from_node().

INLINE VertexIterator Geom::make_vertex_iterator  )  const
 

Referenced by calc_tight_bounds(), CPT(), GLGraphicsStateGuardian::draw_line(), CRGraphicsStateGuardian::draw_line(), GLGraphicsStateGuardian::draw_linestrip(), CRGraphicsStateGuardian::draw_linestrip(), GLGraphicsStateGuardian::draw_point(), CRGraphicsStateGuardian::draw_point(), GLGraphicsStateGuardian::draw_polygon(), CRGraphicsStateGuardian::draw_polygon(), DXGraphicsStateGuardian8::draw_prim_setup(), DXGraphicsStateGuardian7::draw_prim_setup(), GLGraphicsStateGuardian::draw_quad(), CRGraphicsStateGuardian::draw_quad(), RIBGraphicsStateGuardian::draw_simple_poly(), GLGraphicsStateGuardian::draw_sphere(), DXGraphicsStateGuardian8::draw_sphere(), DXGraphicsStateGuardian7::draw_sphere(), CRGraphicsStateGuardian::draw_sphere(), GLGraphicsStateGuardian::draw_sprite(), DXGraphicsStateGuardian8::draw_sprite(), DXGraphicsStateGuardian7::draw_sprite(), CRGraphicsStateGuardian::draw_sprite(), GLGraphicsStateGuardian::draw_tri(), CRGraphicsStateGuardian::draw_tri(), GLGraphicsStateGuardian::draw_trifan(), CRGraphicsStateGuardian::draw_trifan(), GLGraphicsStateGuardian::draw_tristrip(), CRGraphicsStateGuardian::draw_tristrip(), GeomTristrip::explode(), GeomTrifan::explode(), recompute_bound(), and ProjectionScreen::recompute_geom().

void Geom::operator= const Geom &  copy  ) 
 

Definition at line 174 of file geom.cxx.

References _bind, _cindex, _colors, _coords, _get_color, _get_normal, _get_texcoord, _get_vertex, _nindex, _norms, _num_vertices, _numprims, _primlengths, _texcoords, _tindex, _vindex, WritableConfigurable::make_dirty(), and BoundedObject::mark_bound_stale().

void Geom::output ostream &  out  )  const [virtual]
 

Definition at line 535 of file geom.cxx.

References _numprims, and get_type().

Referenced by operator<<().

GeomContext * Geom::prepare GraphicsStateGuardianBase gsg  ) 
 

Definition at line 563 of file geom.cxx.

References _prepared_context, _prepared_gsg, NULL, GraphicsStateGuardianBase::prepare_geom(), and unprepare().

virtual void Geom::print_draw_immediate  )  const [pure virtual]
 

Implemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, and GeomTristrip.

BoundingVolume * Geom::recompute_bound  )  [protected, virtual]
 

Reimplemented from BoundedObject.

Definition at line 661 of file geom.cxx.

References GeometricBoundingVolume::around(), DCAST, get_length(), get_next_vertex(), get_num_prims(), make_vertex_iterator(), p, BoundedObject::recompute_bound(), and v.

void Geom::set_colors const PTA_Colorf colors,
GeomBindType  bind,
const PTA_ushort cindex = PTA_ushort()
 

Definition at line 314 of file geom.cxx.

References _bind, _cindex, _colors, G_COLOR, and WritableConfigurable::make_dirty().

Referenced by LineSegs::create(), GeomTristrip::explode(), GeomTrifan::explode(), BuilderPrimI::fill_geom(), BuilderPrim::fill_geom(), CollisionSegment::fill_viz_geom(), CollisionRay::fill_viz_geom(), PT(), ProjectionScreen::recompute_geom(), GeomTransformer::set_color(), and GeomTransformer::transform_colors().

void Geom::set_coords const PTA_Vertexf coords,
GeomBindType  bind,
const PTA_ushort vindex = PTA_ushort()
 

Definition at line 287 of file geom.cxx.

References G_PER_VERTEX, and set_coords().

void Geom::set_coords const PTA_Vertexf coords,
const PTA_ushort vindex = PTA_ushort()
 

Definition at line 271 of file geom.cxx.

References _bind, _coords, _vindex, G_COORD, G_PER_VERTEX, WritableConfigurable::make_dirty(), and BoundedObject::mark_bound_stale().

Referenced by LineSegs::create(), GeomTristrip::explode(), GeomTrifan::explode(), BuilderPrimI::fill_geom(), BuilderPrim::fill_geom(), CollisionSphere::fill_viz_geom(), CollisionSegment::fill_viz_geom(), CollisionRay::fill_viz_geom(), CollisionPolygon::fill_viz_geom(), CollisionPlane::fill_viz_geom(), DXGraphicsStateGuardian7::prepare_texture(), PT(), set_coords(), GeomTransformer::transform_vertices(), and transform_vertices().

INLINE void Geom::set_lengths const PTA_int lengths  ) 
 

Referenced by LineSegs::create(), CollisionRay::fill_viz_geom(), CollisionPolygon::fill_viz_geom(), DXGraphicsStateGuardian7::prepare_texture(), and PT().

void Geom::set_normals const PTA_Normalf norms,
GeomBindType  bind,
const PTA_ushort nindex = PTA_ushort()
 

Definition at line 299 of file geom.cxx.

References _bind, _nindex, _norms, G_NORMAL, and WritableConfigurable::make_dirty().

Referenced by GeomTristrip::explode(), GeomTrifan::explode(), BuilderPrimI::fill_geom(), BuilderPrim::fill_geom(), and GeomTransformer::transform_vertices().

INLINE void Geom::set_num_prims int  num  ) 
 

Referenced by LineSegs::create(), GeomTristrip::explode(), GeomTrifan::explode(), CollisionSphere::fill_viz_geom(), CollisionSegment::fill_viz_geom(), CollisionRay::fill_viz_geom(), CollisionPolygon::fill_viz_geom(), CollisionPlane::fill_viz_geom(), DXGraphicsStateGuardian7::prepare_texture(), and PT().

void Geom::set_texcoords const PTA_TexCoordf texcoords,
GeomBindType  bind,
const PTA_ushort tindex = PTA_ushort()
 

Definition at line 329 of file geom.cxx.

References _bind, _texcoords, _tindex, G_OFF, G_PER_VERTEX, G_TEXCOORD, and WritableConfigurable::make_dirty().

Referenced by GeomTristrip::explode(), GeomTrifan::explode(), BuilderPrimI::fill_geom(), BuilderPrim::fill_geom(), PT(), ProjectionScreen::recompute_geom(), and GeomTransformer::transform_texcoords().

void Geom::transform_vertices const LMatrix4f &  mat  ) 
 

Definition at line 251 of file geom.cxx.

References PointerToArray< Vertexf >::begin(), PointerToArray< Vertexf >::end(), get_coords(), index, PointerToArray< Vertexf >::push_back(), PointerToArray< Vertexf >::reserve(), and set_coords().

Referenced by TextNode::assemble_row().

void Geom::unprepare GraphicsStateGuardianBase gsg  ) 
 

Definition at line 599 of file geom.cxx.

References _prepared_context, _prepared_gsg, NULL, and GraphicsStateGuardianBase::release_geom().

void Geom::unprepare  ) 
 

Definition at line 584 of file geom.cxx.

References _prepared_context, _prepared_gsg, NULL, and GraphicsStateGuardianBase::release_geom().

Referenced by config(), prepare(), and ~Geom().

virtual bool Geom::uses_components  )  const [pure virtual]
 

Implemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, and GeomTristrip.

Referenced by SceneGraphAnalyzer::collect_statistics(), describe_attr(), DXGraphicsStateGuardian7::draw_multitri(), and fillin().

void Geom::write_datagram BamWriter manager,
Datagram me
[virtual]
 

Reimplemented from dDrawable.

Reimplemented in GeomLine, GeomLinestrip, GeomPoint, and GeomSprite.

Definition at line 694 of file geom.cxx.

References _bind, _cindex, _colors, _coords, _nindex, _norms, _numprims, _primlengths, _texcoords, _tindex, _vindex, Datagram::add_uint16(), Datagram::add_uint8(), and WRITE_PTA.

Referenced by GeomSprite::write_datagram(), GeomPoint::write_datagram(), GeomLinestrip::write_datagram(), and GeomLine::write_datagram().

void Geom::write_verbose ostream &  out,
int  indent_level
const
 

Definition at line 881 of file geom.cxx.

References describe_attr(), G_OFF, G_PER_VERTEX, GeomBindType, get_colors(), get_coords(), get_normals(), get_num_prims(), get_texcoords(), get_type(), indent(), NULL, ushort, and Vertexf.


Member Data Documentation

PUBLISHED Geom::__pad0__
 

Reimplemented from dDrawable.

Reimplemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, and GeomTristrip.

Definition at line 121 of file geom.h.

PUBLISHED Geom::__pad1__
 

Definition at line 182 of file geom.h.

enum GeomBindType Geom::_bind[num_GeomAttrTypes] [protected]
 

Definition at line 250 of file geom.h.

Referenced by config(), fillin(), get_colors(), get_coords(), get_normals(), get_texcoords(), init(), operator=(), set_colors(), set_coords(), set_normals(), set_texcoords(), and write_datagram().

PTA_ushort Geom::_cindex [protected]
 

Definition at line 245 of file geom.h.

Referenced by config(), fillin(), get_colors(), init(), operator=(), set_colors(), and write_datagram().

PTA_Colorf Geom::_colors [protected]
 

Definition at line 240 of file geom.h.

Referenced by config(), fillin(), get_colors(), init(), operator=(), set_colors(), and write_datagram().

PTA_Vertexf Geom::_coords [protected]
 

Definition at line 238 of file geom.h.

Referenced by config(), fillin(), get_coords(), init(), operator=(), set_coords(), and write_datagram().

GetNextColor* Geom::_get_color [protected]
 

Definition at line 256 of file geom.h.

Referenced by config(), init(), and operator=().

GetNextNormal* Geom::_get_normal [protected]
 

Definition at line 254 of file geom.h.

Referenced by config(), init(), and operator=().

GetNextTexCoord* Geom::_get_texcoord [protected]
 

Definition at line 255 of file geom.h.

Referenced by config(), init(), and operator=().

GetNextVertex* Geom::_get_vertex [protected]
 

Definition at line 253 of file geom.h.

Referenced by config(), init(), and operator=().

PTA_ushort Geom::_nindex [protected]
 

Definition at line 244 of file geom.h.

Referenced by config(), fillin(), get_normals(), init(), operator=(), set_normals(), and write_datagram().

PTA_Normalf Geom::_norms [protected]
 

Definition at line 239 of file geom.h.

Referenced by config(), fillin(), get_normals(), init(), operator=(), set_normals(), and write_datagram().

int Geom::_num_vertices [protected]
 

Definition at line 248 of file geom.h.

Referenced by fillin(), and operator=().

int Geom::_numprims [protected]
 

Definition at line 248 of file geom.h.

Referenced by fillin(), GeomTristrip::get_num_tris(), GeomTrifan::get_num_tris(), GeomTristrip::get_tris(), GeomTrifan::get_tris(), GeomTri::get_tris(), GeomQuad::get_tris(), operator=(), output(), and write_datagram().

GeomContext* Geom::_prepared_context [protected]
 

Definition at line 265 of file geom.h.

Referenced by clear_gsg(), draw(), Geom(), prepare(), and unprepare().

GraphicsStateGuardianBase* Geom::_prepared_gsg [protected]
 

Definition at line 264 of file geom.h.

Referenced by clear_gsg(), draw(), Geom(), prepare(), and unprepare().

PTA_int Geom::_primlengths [protected]
 

Definition at line 249 of file geom.h.

Referenced by fillin(), GeomTristrip::get_num_tris(), GeomTrifan::get_num_tris(), GeomTristrip::get_tris(), GeomTrifan::get_tris(), init(), operator=(), and write_datagram().

PTA_TexCoordf Geom::_texcoords [protected]
 

Definition at line 241 of file geom.h.

Referenced by config(), fillin(), get_texcoords(), init(), operator=(), set_texcoords(), and write_datagram().

PTA_ushort Geom::_tindex [protected]
 

Definition at line 246 of file geom.h.

Referenced by config(), fillin(), get_texcoords(), init(), operator=(), set_texcoords(), and write_datagram().

TypeHandle Geom::_type_handle [static, private]
 

Reimplemented from dDrawable.

Reimplemented in GeomLine, GeomLinestrip, GeomPoint, GeomPolygon, GeomQuad, GeomSphere, GeomSprite, GeomTri, GeomTrifan, and GeomTristrip.

Definition at line 37 of file geom.cxx.

PTA_ushort Geom::_vindex [protected]
 

Definition at line 243 of file geom.h.

Referenced by config(), fillin(), get_coords(), GeomTristrip::get_tris(), GeomTrifan::get_tris(), GeomTri::get_tris(), GeomQuad::get_tris(), init(), is_dynamic(), operator=(), set_coords(), and write_datagram().

PUBLISHED int Geom::indent_level = 0) const
 

Definition at line 121 of file geom.h.


The documentation for this class was generated from the following files:
Generated on Fri Apr 18 00:12:19 2003 for Panda by doxygen1.3