zenilib: zenilib/jni/external/zenilib/zeni_graphics/Zeni/Vertex3f.hxx 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
Vertex3f.hxx
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_VERTEX3F_HXX
19 #define ZENI_VERTEX3F_HXX
20
21 #include <Zeni/Vertex3f.h>
22
23 namespace Zeni {
24
25 void * Vertex3f::get_address() const {
26 return const_cast< Point3f *>(&position);
27 }
28
29 #if defined(_WINDOWS) && defined(X64)
30 unsigned long long Vertex3f::get_offset() const {
31 return reinterpret_cast<unsigned long long>(&position) - reinterpret_cast<unsigned long long>(this);
32 }
33 #else
34 unsigned long Vertex3f::get_offset() const {
35 return reinterpret_cast<unsigned long>(&position) - reinterpret_cast<unsigned long>(this);
36 }
37 #endif
38
39 const Uint32 & Vertex3f_Color::get_Color() const {
40 return m_argb;
41 }
42
43 void Vertex3f_Color::set_Color(const Color &color) {
44 m_argb = color.get_argb();
45 }
46
47 void Vertex3f_Color::set_Color(const Uint32 &argb) {
48 m_argb = argb;
49 }
50
51 }
52
53 #endif
Vertex3f.h
color
GLuint color
Definition: glew.h:7185
Zeni::Vertex3f::position
Point3f position
Definition: Vertex3f.h:72
Zeni::Vertex3f::get_address
void * get_address() const
A bit of a hack, necessary to memcpy data into Vertex_Buffers.
Definition: Vertex3f.hxx:25
Zeni::Point3f
A 3D Point represented with floats.
Definition: Coordinate.h:133
Uint32
uint32_t Uint32
An unsigned 32-bit integer type.
Definition: SDL_stdinc.h:145
Zeni::Vertex3f::get_offset
unsigned long get_offset() const
A bit of a hack, necessary to memcpy data into Vertex_Buffers.
Definition: Vertex3f.hxx:34
Zeni::Vertex3f_Color::get_Color
const Uint32 & get_Color() const
Get the current Color.
Definition: Vertex3f.hxx:39
Zeni::Color::get_argb
Uint32 get_argb() const
Get a Uint32 representation of 0xAARRGGBB.
Definition: Color.hxx:47
Zeni::Vertex3f_Color::set_Color
void set_Color(const Color &color)
Set the current Color.
Definition: Vertex3f.hxx:43
Zeni::Color
Color.
Definition: Color.h:41