Colobot
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
src
object
motion
motion.h
1
/*
2
* This file is part of the Colobot: Gold Edition source code
3
* Copyright (C) 2001-2015, Daniel Roux, EPSITEC SA & TerranovaTeam
4
* http://epsitec.ch; http://colobot.info; http://github.com/colobot
5
*
6
* This program is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
* See the GNU General Public License for more details.
15
*
16
* You should have received a copy of the GNU General Public License
17
* along with this program. If not, see http://gnu.org/licenses
18
*/
19
20
#pragma once
21
22
23
#include "
common/event.h
"
24
#include "common/error.h"
25
26
#include "
object/object_type.h
"
27
28
namespace
Gfx
29
{
30
class
CEngine;
31
class
CParticle;
32
class
CTerrain;
33
class
CWater;
34
class
CCamera;
35
class
COldModelManager;
36
}
37
38
class
CApplication
;
39
class
CPhysics
;
40
class
COldObject
;
41
class
CRobotMain
;
42
class
CSoundInterface
;
43
class
CLevelParserLine
;
44
45
46
class
CMotion
47
{
48
public
:
49
CMotion
(
COldObject
*
object
);
50
virtual
~
CMotion
();
51
52
void
SetPhysics(
CPhysics
* physics);
53
54
virtual
void
DeleteObject(
bool
bAll=
false
) = 0;
55
virtual
void
Create(
Math::Vector
pos,
float
angle,
ObjectType
type,
float
power,
Gfx::COldModelManager
* modelManager) = 0;
56
virtual
bool
EventProcess(
const
Event
&event);
57
virtual
Error SetAction(
int
action,
float
time=0.2f);
58
virtual
int
GetAction();
59
60
virtual
bool
SetParam(
int
rank,
float
value);
61
virtual
float
GetParam(
int
rank);
62
63
virtual
bool
Write(
CLevelParserLine
* line);
64
virtual
bool
Read(
CLevelParserLine
* line);
65
66
virtual
void
SetLinVibration(
Math::Vector
dir);
67
virtual
Math::Vector
GetLinVibration();
68
virtual
void
SetCirVibration(
Math::Vector
dir);
69
virtual
Math::Vector
GetCirVibration();
70
virtual
void
SetTilt(
Math::Vector
dir);
71
virtual
Math::Vector
GetTilt();
72
73
protected
:
74
CApplication
* m_app;
75
Gfx::CEngine
* m_engine;
76
Gfx::CParticle
* m_particle;
77
Gfx::CTerrain
* m_terrain;
78
Gfx::CWater
* m_water;
79
Gfx::CCamera
* m_camera;
80
COldObject
* m_object;
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
};
Gfx::COldModelManager
Manager for static models.
Definition:
oldmodelmanager.h:55
COldObject
Definition:
old_object.h:77
CPhysics
Definition:
physics.h:98
object_type.h
ObjectType enum.
CLevelParserLine
Definition:
parserline.h:37
CRobotMain
Definition:
robotmain.h:151
Gfx::CParticle
Particle engine.
Definition:
particle.h:223
CApplication
Main application.
Definition:
app.h:191
Gfx::CCamera
Camera moving in 3D scene.
Definition:
camera.h:134
Gfx::CTerrain
Terrain loader/generator and manager.
Definition:
terrain.h:145
Gfx
Namespace for (new) graphics code.
Definition:
app.h:49
CMotion
Definition:
motion.h:46
Gfx::CEngine
The graphics engine.
Definition:
engine.h:620
event.h
Event types, structs and event queue.
ObjectType
ObjectType
Type of game object.
Definition:
object_type.h:33
Gfx::CWater
Water manager/renderer.
Definition:
water.h:74
Math::Vector
3D (3x1) vector
Definition:
vector.h:53
Event
Event sent by system, interface or game.
Definition:
event.h:709
CSoundInterface
Sound plugin interface.
Definition:
sound.h:57
Generated by
1.8.9.1