Colobot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Pages
src
object
motion
motion.h
1
// * This file is part of the COLOBOT source code
2
// * Copyright (C) 2001-2008, Daniel ROUX & EPSITEC SA, www.epsitec.ch
3
// *
4
// * This program is free software: you can redistribute it and/or modify
5
// * it under the terms of the GNU General Public License as published by
6
// * the Free Software Foundation, either version 3 of the License, or
7
// * (at your option) any later version.
8
// *
9
// * This program is distributed in the hope that it will be useful,
10
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
11
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
// * GNU General Public License for more details.
13
// *
14
// * You should have received a copy of the GNU General Public License
15
// * along with this program. If not, see http://www.gnu.org/licenses/.
16
17
// motion.h
18
19
#pragma once
20
21
22
#include "
common/event.h
"
23
#include "
common/global.h
"
24
25
#include "
object/object.h
"
26
27
28
namespace
Gfx {
29
class
CEngine;
30
class
CParticle;
31
class
CTerrain;
32
class
CWater;
33
class
CCamera;
34
}
35
36
class
CApplication
;
37
class
CBrain
;
38
class
CPhysics
;
39
class
CObject
;
40
class
CRobotMain
;
41
class
CSoundInterface
;
42
43
44
class
CMotion
45
{
46
public
:
47
CMotion
(
CObject
*
object
);
48
virtual
~
CMotion
();
49
50
void
SetPhysics(
CPhysics
* physics);
51
void
SetBrain(
CBrain
* brain);
52
53
virtual
void
DeleteObject(
bool
bAll=
false
);
54
virtual
bool
Create(
Math::Vector
pos,
float
angle,
ObjectType
type,
float
power);
55
virtual
bool
EventProcess(
const
Event
&event);
56
virtual
Error
SetAction(
int
action,
float
time=0.2f);
57
virtual
int
GetAction();
58
59
virtual
bool
SetParam(
int
rank,
float
value);
60
virtual
float
GetParam(
int
rank);
61
62
virtual
bool
Write(
char
*line);
63
virtual
bool
Read(
char
*line);
64
65
virtual
void
SetLinVibration(
Math::Vector
dir);
66
virtual
Math::Vector
GetLinVibration();
67
virtual
void
SetCirVibration(
Math::Vector
dir);
68
virtual
Math::Vector
GetCirVibration();
69
virtual
void
SetInclinaison(
Math::Vector
dir);
70
virtual
Math::Vector
GetInclinaison();
71
72
protected
:
73
CApplication
* m_app;
74
Gfx::CEngine
* m_engine;
75
Gfx::CParticle
* m_particle;
76
Gfx::CTerrain
* m_terrain;
77
Gfx::CWater
* m_water;
78
Gfx::CCamera
* m_camera;
79
CObject
* m_object;
80
CBrain
* m_brain;
81
CPhysics
* m_physics;
82
CRobotMain
* m_main;
83
CSoundInterface
* m_sound;
84
85
int
m_actionType;
86
float
m_actionTime;
87
float
m_progress;
88
89
Math::Vector
m_linVibration;
// linear vibration
90
Math::Vector
m_cirVibration;
// circular vibration
91
Math::Vector
m_inclinaison;
// tilt
92
};
93
global.h
Some common, global definitions.
CPhysics
Definition:
physics.h:95
CRobotMain
Definition:
robotmain.h:196
Gfx::CParticle
Particle engine.
Definition:
particle.h:266
ObjectType
ObjectType
Type of game object.
Definition:
object.h:46
CApplication
Main application.
Definition:
app.h:201
Gfx::CCamera
Camera moving in 3D scene.
Definition:
camera.h:130
Gfx::CTerrain
Terrain loader/generator and manager.
Definition:
terrain.h:220
CMotion
Definition:
motion.h:44
object.h
CObject - base class for all game objects.
Gfx::CEngine
The graphics engine.
Definition:
engine.h:682
event.h
Event types, structs and event queue.
Error
Error
Type of error or info message.
Definition:
global.h:29
Gfx::CWater
Water manager/renderer.
Definition:
water.h:116
Math::Vector
3D (3x1) vector
Definition:
vector.h:49
Event
Event sent by system, interface or game.
Definition:
event.h:686
CObject
Definition:
object.h:352
CSoundInterface
Sound plugin interface.
Definition:
sound.h:149
CBrain
Definition:
brain.h:78
Generated on Wed Jul 2 2014 11:06:02 for Colobot by
1.8.7