Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/ode/ode-0.9/OPCODE/Ice/IceAxes.h @ 216

Last change on this file since 216 was 216, checked in by mathiask, 16 years ago

[Physik] add ode-0.9

File size: 1.4 KB
Line 
1///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
2/**
3 *      Contains axes definition.
4 *      \file           IceAxes.h
5 *      \author         Pierre Terdiman
6 *      \date           January, 29, 2000
7 */
8///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
9
10///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
11// Include Guard
12#ifndef __ICEAXES_H__
13#define __ICEAXES_H__
14
15        enum PointComponent
16        {
17                X                                       = 0,
18                Y                                       = 1,
19                Z                                       = 2,
20                W                                       = 3,
21
22                FORCE_DWORD             = 0x7fffffff
23        };
24
25        enum AxisOrder
26        {
27                AXES_XYZ                        = (X)|(Y<<2)|(Z<<4),
28                AXES_XZY                        = (X)|(Z<<2)|(Y<<4),
29                AXES_YXZ                        = (Y)|(X<<2)|(Z<<4),
30                AXES_YZX                        = (Y)|(Z<<2)|(X<<4),
31                AXES_ZXY                        = (Z)|(X<<2)|(Y<<4),
32                AXES_ZYX                        = (Z)|(Y<<2)|(X<<4),
33
34                AXES_FORCE_DWORD        = 0x7fffffff
35        };
36
37        class ICEMATHS_API Axes
38        {
39                public:
40
41                inline_                 Axes(AxisOrder order)
42                                                {
43                                                        mAxis0 = (order   ) & 3;
44                                                        mAxis1 = (order>>2) & 3;
45                                                        mAxis2 = (order>>4) & 3;
46                                                }
47                inline_                 ~Axes()         {}
48
49                                udword  mAxis0;
50                                udword  mAxis1;
51                                udword  mAxis2;
52        };
53
54#endif // __ICEAXES_H__
Note: See TracBrowser for help on using the repository browser.