zenilib: zenilib/jni/external/zenilib/zeni_graphics/Zeni/Quadrilateral.h Source File

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Quadrilateral.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_QUADRILATERAL_H
19 #define ZENI_QUADRILATERAL_H
20
21 #include <Zeni/Renderable.h>
22 #include <Zeni/Triangle.h>
23
24 namespace Zeni {
25
36 template <typename VERTEX>
37 class Quadrilateral : public Renderable {
38 public:
39 Quadrilateral();
40 Quadrilateral(const VERTEX &vertex0,
41 const VERTEX &vertex1,
42 const VERTEX &vertex2,
43 const VERTEX &vertex3);
44
45 Quadrilateral(const Quadrilateral<VERTEX> &rhs);
46 Quadrilateral<VERTEX> & operator=(const Quadrilateral<VERTEX> &rhs);
47
49 virtual bool is_3d() const;
50
51 #ifndef DISABLE_GL_FIXED
52 virtual void render_to(Video_GL_Fixed &screen) const;
53 #endif
54
55 #ifndef DISABLE_GL_SHADER
56 virtual void render_to(Video_GL_Shader &screen) const;
57 #endif
58
59 #ifndef DISABLE_DX9
60 virtual void render_to(Video_DX9 &screen) const;
61 #endif
62
63 Quadrilateral<VERTEX> * get_duplicate() const;
64
65 Triangle<VERTEX> * get_duplicate_t0() const;
66 Triangle<VERTEX> * get_duplicate_t1() const;
67
68 // Indexing
69 const VERTEX & operator[](const int &index) const;
70 VERTEX & operator[](const int &index);
71
72 VERTEX a;
73 VERTEX b;
74 VERTEX c;
75 VERTEX d;
76
77 private:
78 void * m_alignment_rubbish;
79 };
80
81 }
82
83 #endif
Zeni::Quadrilateral::Quadrilateral
Quadrilateral()
Definition: Quadrilateral.hxx:39
Zeni::Video_DX9
The Direct3D9 Rendering System.
Definition: Video_DX9.h:62
Zeni::Quadrilateral::b
VERTEX b
Definition: Quadrilateral.h:73
Zeni::Quadrilateral::a
VERTEX a
Definition: Quadrilateral.h:72
Zeni::Quadrilateral
An Abstraction of a Quadrilateral.
Definition: Quadrilateral.h:37
Zeni::Renderable
A Renderable Interface.
Definition: Renderable.h:47
Renderable.h
Zeni::Quadrilateral::get_duplicate_t1
Triangle< VERTEX > * get_duplicate_t1() const
Get the second half of the Quadrilateral.
Definition: Quadrilateral.hxx:115
Zeni::Video_GL_Fixed
The OpenGL Rendering System.
Definition: Video_GL_Fixed.h:70
Triangle.h
Zeni::Quadrilateral::render_to
virtual void render_to(Video_GL_Fixed &screen) const
Overridden for OpenGL rendering.
Definition: Quadrilateral.hxx:85
Zeni::Quadrilateral::operator=
Quadrilateral< VERTEX > & operator=(const Quadrilateral< VERTEX > &rhs)
Definition: Quadrilateral.hxx:67
Zeni::Video_GL_Shader
The OpenGL Rendering System.
Definition: Video_GL_Shader.h:70
Zeni::Quadrilateral::get_duplicate
Quadrilateral< VERTEX > * get_duplicate() const
Get a duplicate of the Quadrilateral.
Definition: Quadrilateral.hxx:103
index
GLuint index
Definition: glew.h:1800
Zeni::Quadrilateral::d
VERTEX d
Definition: Quadrilateral.h:75
Zeni::Quadrilateral::is_3d
virtual bool is_3d() const
Tell the rendering system if we&#39;re using 3D coordinates.
Definition: Quadrilateral.hxx:79
Zeni::Quadrilateral::get_duplicate_t0
Triangle< VERTEX > * get_duplicate_t0() const
Get the first half of the Quadrilateral.
Definition: Quadrilateral.hxx:108
Zeni::Triangle
An Abstraction of a Triangle.
Definition: Triangle.h:36
Zeni::Quadrilateral::operator[]
const VERTEX & operator[](const int &index) const
Get &#39;index&#39;.
Definition: Quadrilateral.hxx:122
Zeni::Quadrilateral::c
VERTEX c
Definition: Quadrilateral.h:74