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
task
task.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
// task.h
18
19
#pragma once
20
21
22
#include "
common/event.h
"
23
#include "
common/global.h
"
24
25
#include "
math/const.h
"
26
27
28
class
CBrain
;
29
class
CPhysics
;
30
class
CMotion
;
31
class
CObject
;
32
class
CRobotMain
;
33
class
CSoundInterface
;
34
35
36
namespace
Gfx {
37
class
CEngine;
38
class
CLightManager;
39
class
CParticle;
40
class
CTerrain;
41
class
CWater;
42
class
CCamera;
43
}
/* Gfx */
44
45
46
const
float
TAKE_DIST = 6.0f;
// distance to an object to pick it
47
const
float
TAKE_DIST_OTHER = 1.5f;
// additional distance if on friend
48
49
//?const float ARM_NEUTRAL_ANGLE1 = 155.0f*Math::PI/180.0f;
50
//?const float ARM_NEUTRAL_ANGLE2 = -125.0f*Math::PI/180.0f;
51
//?const float ARM_NEUTRAL_ANGLE3 = -45.0f*Math::PI/180.0f;
52
const
float
ARM_NEUTRAL_ANGLE1 = 110.0f*
Math::PI
/180.0f;
53
const
float
ARM_NEUTRAL_ANGLE2 = -130.0f*
Math::PI
/180.0f;
54
const
float
ARM_NEUTRAL_ANGLE3 = -50.0f*
Math::PI
/180.0f;
55
56
const
float
ARM_STOCK_ANGLE1 = 110.0f*
Math::PI
/180.0f;
57
const
float
ARM_STOCK_ANGLE2 = -100.0f*
Math::PI
/180.0f;
58
const
float
ARM_STOCK_ANGLE3 = -70.0f*
Math::PI
/180.0f;
59
60
61
class
CTask
62
{
63
public
:
64
CTask
(
CObject
*
object
);
65
virtual
~
CTask
();
66
67
virtual
bool
EventProcess(
const
Event
&event);
68
virtual
Error
IsEnded();
69
virtual
bool
IsBusy();
70
virtual
bool
Abort();
71
72
protected
:
73
Gfx::CEngine
* m_engine;
74
Gfx::CLightManager
* m_lightMan;
75
Gfx::CParticle
* m_particle;
76
Gfx::CTerrain
* m_terrain;
77
Gfx::CWater
* m_water;
78
Gfx::CCamera
* m_camera;
79
CMotion
* m_motion;
80
CBrain
* m_brain;
81
CPhysics
* m_physics;
82
CObject
* m_object;
83
CRobotMain
* m_main;
84
CSoundInterface
* m_sound;
85
};
86
global.h
Some common, global definitions.
CPhysics
Definition:
physics.h:95
Gfx::CLightManager
Manager for dynamic lights in 3D scene.
Definition:
lightman.h:142
Math::PI
const float PI
PI.
Definition:
const.h:44
CRobotMain
Definition:
robotmain.h:196
Gfx::CParticle
Particle engine.
Definition:
particle.h:266
Gfx::CCamera
Camera moving in 3D scene.
Definition:
camera.h:130
Gfx::CTerrain
Terrain loader/generator and manager.
Definition:
terrain.h:220
const.h
Constants used in math functions.
CMotion
Definition:
motion.h:44
CTask
Definition:
task.h:61
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
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:03 for Colobot by
1.8.7