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