root/trunk/dep/include/g3dlite/G3D/Vector3int16.h

Revision 2, 1.1 kB (checked in by yumileroy, 17 years ago)

[svn] * Proper SVN structure

Original author: Neo2003
Date: 2008-10-02 16:23:55-05:00

Line 
1/**
2  @file Vector3int16.h
3 
4  @maintainer Morgan McGuire, matrix@brown.edu
5
6  @created 2003-04-07
7  @edited  2003-06-24
8  Copyright 2000-2004, Morgan McGuire.
9  All rights reserved.
10 */
11
12#ifndef VECTOR3INT16_H
13#define VECTOR3INT16_H
14
15#include "G3D/platform.h"
16#include "G3D/g3dmath.h"
17
18namespace G3D {
19
20/**
21 A Vector3 that packs its fields into uint16s.
22 */
23#ifdef G3D_WIN32
24    // Switch to tight alignment
25    #pragma pack(push, 2)
26#endif
27
28class Vector3int16 {
29private:
30    // Hidden operators
31    bool operator<(const Vector3int16&) const;
32    bool operator>(const Vector3int16&) const;
33    bool operator<=(const Vector3int16&) const;
34    bool operator>=(const Vector3int16&) const;
35
36public:
37    G3D::int16              x;
38    G3D::int16              y;
39    G3D::int16              z;
40
41    Vector3int16() : x(0), y(0), z(0) {}
42    Vector3int16(G3D::int16 _x, G3D::int16 _y, G3D::int16 _z) : x(_x), y(_y), z(_z) {}
43    Vector3int16(const class Vector3& v);
44}
45#if defined(G3D_LINUX) || defined(G3D_OSX)
46    __attribute((aligned(1)))
47#endif
48;
49
50#ifdef G3D_WIN32
51    #pragma pack(pop)
52#endif
53
54}
55#endif
Note: See TracBrowser for help on using the browser.