~etc-pgh-launchpad/wildpockets/trunk

« back to all changes in this revision

Viewing changes to ode/OPCODE/Ice/IceAxes.h

  • Committer: etc-pgh-launchpad at cmu
  • Date: 2010-11-30 20:56:30 UTC
  • Revision ID: etc-pgh-launchpad@lists.andrew.cmu.edu-20101130205630-0blbkcz28ovjl8wj
Committing the Wild Pockets code base to Launchpad.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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__