server/dep/include/g3dlite/G3D/Vector3int16.h

55 lines
1.1 KiB
C++

/**
@file Vector3int16.h
@maintainer Morgan McGuire, matrix@brown.edu
@created 2003-04-07
@edited 2003-06-24
Copyright 2000-2004, Morgan McGuire.
All rights reserved.
*/
#ifndef VECTOR3INT16_H
#define VECTOR3INT16_H
#include "G3D/platform.h"
#include "G3D/g3dmath.h"
namespace G3D {
/**
A Vector3 that packs its fields into uint16s.
*/
#ifdef G3D_WIN32
// Switch to tight alignment
#pragma pack(push, 2)
#endif
class Vector3int16 {
private:
// Hidden operators
bool operator<(const Vector3int16&) const;
bool operator>(const Vector3int16&) const;
bool operator<=(const Vector3int16&) const;
bool operator>=(const Vector3int16&) const;
public:
G3D::int16 x;
G3D::int16 y;
G3D::int16 z;
Vector3int16() : x(0), y(0), z(0) {}
Vector3int16(G3D::int16 _x, G3D::int16 _y, G3D::int16 _z) : x(_x), y(_y), z(_z) {}
Vector3int16(const class Vector3& v);
}
#if defined(G3D_LINUX) || defined(G3D_OSX)
__attribute((aligned(1)))
#endif
;
#ifdef G3D_WIN32
#pragma pack(pop)
#endif
}
#endif