~ubuntu-branches/debian/sid/ember/sid

« back to all changes in this revision

Viewing changes to src/components/ogre/ogreopcode/include/Opcode/Ice/IceAxes.h

  • Committer: Bazaar Package Importer
  • Author(s): Michael Koch
  • Date: 2009-07-23 07:46:40 UTC
  • Revision ID: james.westby@ubuntu.com-20090723074640-wh0ukzis0kda36qv
Tags: upstream-0.5.6
ImportĀ upstreamĀ versionĀ 0.5.6

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 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__