zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Zeni::Line_Segment< VERTEX > Class Template Reference

An Abstraction of a Line. More...

#include <Line_Segment.h>

Inherits Zeni::Renderable.

Public Member Functions

 Line_Segment ()
 
 Line_Segment (const VERTEX &vertex0, const VERTEX &vertex1)
 
 Line_Segment (const Line_Segment< VERTEX > &rhs)
 
Line_Segment< VERTEX > * get_duplicate () const
 Get a duplicate of the Line. More...
 
virtual bool is_3d () const
 Tell the rendering system if we're using 3D coordinates. More...
 
Line_Segment< VERTEX > & operator= (const Line_Segment< VERTEX > &rhs)
 
const VERTEX & operator[] (const int &index) const
 Get 'index'. More...
 
VERTEX & operator[] (const int &index)
 Get 'index'. More...
 
virtual void render_to (Video_GL_Fixed &screen) const
 Overridden for OpenGL rendering. More...
 
virtual void render_to (Video_GL_Shader &screen) const
 Overridden for OpenGL rendering. More...
 
virtual void render_to (Video_DX9 &screen) const
 Overridden for Direct3D9 rendering. More...
 
template<>
void render_to (Video_GL_Shader &) const
 Overridden for OpenGL rendering. More...
 
template<>
void render_to (Video_GL_Shader &) const
 Overridden for OpenGL rendering. More...
 
template<>
void render_to (Video_GL_Shader &) const
 Overridden for OpenGL rendering. More...
 
template<>
void render_to (Video_GL_Shader &) const
 Overridden for OpenGL rendering. More...
 
- Public Member Functions inherited from Zeni::Renderable
 Renderable ()
 
 Renderable (const Renderable &rhs)
 
virtual ~Renderable ()
 
void fax_Material (const Material *const &material)
 Set the Material, giving the Renderable a copy. More...
 
const Materialget_Material () const
 Get the Material. More...
 
void give_Material (Material *const &material)
 Set the Material, giving the Renderable ownership. More...
 
void lend_Material (const Material *const &material)
 Set the Material, giving the Renderable no ownership. More...
 
Renderableoperator= (const Renderable &rhs)
 
virtual void post_render () const
 
virtual void pre_render () const
 

Public Attributes

VERTEX a
 
VERTEX b
 

Detailed Description

template<typename VERTEX>
class Zeni::Line_Segment< VERTEX >

An Abstraction of a Line.

Author
bazald

Contact: bazal.nosp@m.d@ze.nosp@m.nipex.nosp@m..com

Definition at line 36 of file Line_Segment.h.

Constructor & Destructor Documentation

template<typename VERTEX >
Zeni::Line_Segment< VERTEX >::Line_Segment ( )

Definition at line 38 of file Line_Segment.hxx.

template<typename VERTEX >
Zeni::Line_Segment< VERTEX >::Line_Segment ( const VERTEX &  vertex0,
const VERTEX &  vertex1 
)

Definition at line 45 of file Line_Segment.hxx.

template<typename VERTEX >
Zeni::Line_Segment< VERTEX >::Line_Segment ( const Line_Segment< VERTEX > &  rhs)

Definition at line 52 of file Line_Segment.hxx.

Member Function Documentation

template<typename VERTEX >
Line_Segment< VERTEX > * Zeni::Line_Segment< VERTEX >::get_duplicate ( ) const

Get a duplicate of the Line.

Definition at line 92 of file Line_Segment.hxx.

template<typename VERTEX >
bool Zeni::Line_Segment< VERTEX >::is_3d ( ) const
virtual

Tell the rendering system if we're using 3D coordinates.

Implements Zeni::Renderable.

Definition at line 70 of file Line_Segment.hxx.

template<typename VERTEX >
Line_Segment< VERTEX > & Zeni::Line_Segment< VERTEX >::operator= ( const Line_Segment< VERTEX > &  rhs)
template<typename VERTEX >
const VERTEX & Zeni::Line_Segment< VERTEX >::operator[] ( const int index) const

Get 'index'.

Definition at line 97 of file Line_Segment.hxx.

References assert.

template<typename VERTEX >
VERTEX & Zeni::Line_Segment< VERTEX >::operator[] ( const int index)

Get 'index'.

Definition at line 104 of file Line_Segment.hxx.

References assert.

template<typename VERTEX >
void Zeni::Line_Segment< VERTEX >::render_to ( Video_GL_Fixed screen) const
virtual

Overridden for OpenGL rendering.

Implements Zeni::Renderable.

Definition at line 76 of file Line_Segment.hxx.

References GL_LINES, glBegin, and glEnd.

template<typename VERTEX>
virtual void Zeni::Line_Segment< VERTEX >::render_to ( Video_GL_Shader screen) const
virtual

Overridden for OpenGL rendering.

Implements Zeni::Renderable.

template<typename VERTEX >
void Zeni::Line_Segment< VERTEX >::render_to ( Video_DX9 screen) const
virtual

Overridden for Direct3D9 rendering.

Implements Zeni::Renderable.

Definition at line 86 of file Line_Segment.hxx.

References D3DPT_LINELIST, and Zeni::Video_DX9::get_d3d_device().

template<>
void Zeni::Line_Segment< Vertex2f_Color >::render_to ( Video_GL_Shader screen) const
virtual
template<>
void Zeni::Line_Segment< Vertex3f_Color >::render_to ( Video_GL_Shader screen) const
virtual
template<>
void Zeni::Line_Segment< Vertex2f_Texture >::render_to ( Video_GL_Shader screen) const
virtual
template<>
void Zeni::Line_Segment< Vertex3f_Texture >::render_to ( Video_GL_Shader screen) const
virtual

Member Data Documentation

template<typename VERTEX>
VERTEX Zeni::Line_Segment< VERTEX >::a
template<typename VERTEX>
VERTEX Zeni::Line_Segment< VERTEX >::b

The documentation for this class was generated from the following files: