My Project: openb3dlib.mod/openb3d/src/tilt.h Source File

My Project

tilt.h
Go to the documentation of this file.
1 /*
2 * tilt.h
3 * iminib3d
4 *
5 * Created by Simon Harrison.
6 * Copyright Si Design. All rights reserved.
7 *
8 */
9
10 #ifndef TILT_H
11 #define TILT_H
12
13 #include "maths_helper.h"
14
15 #include <iostream>
16 using namespace std;
17
18 class Tilt{
19
20 public:
21
22 static float x,y,z;
23
24 Tilt(){
25
26 };
27
28 static void SetTilt(float tilt_x,float tilt_y,float tilt_z){
29
30 x=tilt_x;
31 y=tilt_y;
32 z=tilt_z;
33
34 return;
35
36 }
37
38 static float TiltX(){
39
40 return x;
41
42 }
43
44 static float TiltY(){
45
46 return y;
47
48 }
49
50 static float TiltZ(){
51
52 return z;
53
54 }
55
56 static float TiltPitch(){
57
58 return asindeg(x);
59
60 }
61
62 static float TiltYaw(){
63
64 return asindeg(y);
65
66 }
67
68 static float TiltRoll(){
69
70 if(z>1.0) z=1.0;
71 if(z<-1.0) z=-1.0;
72
73 return asindeg(z);
74
75 }
76
77 };
78
79 #endif
Tilt::z
static float z
Definition: tilt.h:22
asindeg
double asindeg(double val)
Definition: maths_helper.cpp:32
Tilt
Definition: tilt.h:18
Tilt::TiltY
static float TiltY()
Definition: tilt.h:44
std
Tilt::TiltYaw
static float TiltYaw()
Definition: tilt.h:62
Tilt::Tilt
Tilt()
Definition: tilt.h:24
Tilt::SetTilt
static void SetTilt(float tilt_x, float tilt_y, float tilt_z)
Definition: tilt.h:28
Tilt::TiltZ
static float TiltZ()
Definition: tilt.h:50
Tilt::TiltRoll
static float TiltRoll()
Definition: tilt.h:68
Tilt::TiltX
static float TiltX()
Definition: tilt.h:38
maths_helper.h
Tilt::TiltPitch
static float TiltPitch()
Definition: tilt.h:56