Pyrogenesis
13997
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
source
simulation2
components
ICmpProjectileManager.h
Go to the documentation of this file.
1
/* Copyright (C) 2010 Wildfire Games.
2
* This file is part of 0 A.D.
3
*
4
* 0 A.D. 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 2 of the License, or
7
* (at your option) any later version.
8
*
9
* 0 A.D. 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 0 A.D. If not, see <http://www.gnu.org/licenses/>.
16
*/
17
18
#ifndef INCLUDED_ICMPPROJECTILEMANAGER
19
#define INCLUDED_ICMPPROJECTILEMANAGER
20
21
#include "
simulation2/system/Interface.h
"
22
23
#include "
maths/Fixed.h
"
24
#include "
maths/FixedVector3D.h
"
25
26
/**
27
* Projectile manager. This deals with the rendering and the graphical motion of projectiles.
28
* (The gameplay effects of projectiles are not handled here - the simulation code does that
29
* with timers, this just does the visual aspects, because it's simpler to keep the parts separated.)
30
*/
31
class
ICmpProjectileManager
:
public
IComponent
32
{
33
public
:
34
35
/**
36
* Launch a projectile from entity @p source to point @p target.
37
* @param source source entity; the projectile will determined from the "projectile" prop in its actor
38
* @param target target point
39
* @param speed horizontal speed in m/s
40
* @param gravity gravitational acceleration in m/s^2 (determines the height of the ballistic curve)
41
* @return id of the created projectile
42
*/
43
virtual
uint32_t
LaunchProjectileAtPoint
(
entity_id_t
source,
CFixedVector3D
target,
fixed
speed,
fixed
gravity) = 0;
44
45
/**
46
* Removes a projectile, used when the projectile has hit a target
47
* @param id of the projectile to remove
48
*/
49
virtual
void
RemoveProjectile
(
uint32_t
id
) = 0;
50
51
DECLARE_INTERFACE_TYPE
(ProjectileManager)
52
};
53
54
#endif // INCLUDED_ICMPPROJECTILEMANAGER
IComponent
Definition:
IComponent.h:33
CFixed
A simple fixed-point number class.
Definition:
Fixed.h:115
ICmpProjectileManager
Projectile manager.
Definition:
ICmpProjectileManager.h:31
Fixed.h
ICmpProjectileManager::LaunchProjectileAtPoint
virtual uint32_t LaunchProjectileAtPoint(entity_id_t source, CFixedVector3D target, fixed speed, fixed gravity)=0
Launch a projectile from entity source to point target.
CFixedVector3D
Definition:
FixedVector3D.h:24
ICmpProjectileManager::RemoveProjectile
virtual void RemoveProjectile(uint32_t id)=0
Removes a projectile, used when the projectile has hit a target.
DECLARE_INTERFACE_TYPE
#define DECLARE_INTERFACE_TYPE(iname)
Definition:
Interface.h:23
FixedVector3D.h
uint32_t
unsigned int uint32_t
Definition:
wposix_types.h:53
Interface.h
entity_id_t
u32 entity_id_t
Entity ID type.
Definition:
Entity.h:24
Generated on Mon Oct 14 2013 00:58:09 for Pyrogenesis by
1.8.5