zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Line_Segment.h
Go to the documentation of this file.
1 /* This file is part of the Zenipex Library (zenilib).
2  * Copyright (C) 2011 Mitchell Keith Bloch (bazald).
3  *
4  * zenilib is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  *
9  * zenilib is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public License
15  * along with zenilib. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #ifndef ZENI_LINE_SEGMENT_H
19 #define ZENI_LINE_SEGMENT_H
20 
21 #include <Zeni/Renderable.h>
22 
23 namespace Zeni {
24 
35  template <typename VERTEX>
36  class Line_Segment : public Renderable {
37  public:
38  Line_Segment();
39  Line_Segment(const VERTEX &vertex0,
40  const VERTEX &vertex1);
41 
44 
46  virtual bool is_3d() const;
47 
48 #ifndef DISABLE_GL_FIXED
49  virtual void render_to(Video_GL_Fixed &screen) const;
50 #endif
51 
52 #ifndef DISABLE_GL_SHADER
53  virtual void render_to(Video_GL_Shader &screen) const;
54 #endif
55 
56 #ifndef DISABLE_DX9
57  virtual void render_to(Video_DX9 &screen) const;
58 #endif
59 
61 
62  // Indexing
63  const VERTEX & operator[](const int &index) const;
64  VERTEX & operator[](const int &index);
65 
66  VERTEX a;
67  VERTEX b;
68 
69  private:
70  void * m_alignment_rubbish;
71  };
72 
73 }
74 
75 #endif
The Direct3D9 Rendering System.
Definition: Video_DX9.h:62
An Abstraction of a Line.
Definition: Line_Segment.h:36
const VERTEX & operator[](const int &index) const
Get &#39;index&#39;.
virtual void render_to(Video_GL_Fixed &screen) const
Overridden for OpenGL rendering.
A Renderable Interface.
Definition: Renderable.h:47
The OpenGL Rendering System.
The OpenGL Rendering System.
virtual bool is_3d() const
Tell the rendering system if we&#39;re using 3D coordinates.
GLuint index
Definition: glew.h:1800
Line_Segment< VERTEX > * get_duplicate() const
Get a duplicate of the Line.
Line_Segment< VERTEX > & operator=(const Line_Segment< VERTEX > &rhs)