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
ICmpOverlayRenderer.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_ICMPOVERLAYRENDERER
19
#define INCLUDED_ICMPOVERLAYRENDERER
20
21
#include "
simulation2/system/Interface.h
"
22
23
#include "
simulation2/helpers/Position.h
"
24
25
#include "
lib/file/vfs/vfs_path.h
"
26
#include "
maths/FixedVector2D.h
"
27
#include "
maths/FixedVector3D.h
"
28
29
/**
30
* Interface for rendering 'overlay' objects (typically sprites), automatically
31
* positioned relative to the entity.
32
* Usually driven by the StatusBars component.
33
*
34
* (TODO: maybe we should add a "category" argument to Reset/AddSprite/etc,
35
* so different components can each maintain independent sets of overlays here?)
36
*/
37
class
ICmpOverlayRenderer
:
public
IComponent
38
{
39
public
:
40
/**
41
* Delete all sprites that have been previously added.
42
*/
43
virtual
void
Reset
() = 0;
44
45
/**
46
* Add a new textured billboard sprite to be rendered.
47
* @param textureName filename of texture to render.
48
* @param corner0,corner1 coordinates of sprite's corners, in world-space units oriented with the camera plane,
49
* relative to the sprite position.
50
* @param offset world-space offset of sprite position from the entity's base position.
51
*/
52
virtual
void
AddSprite
(
VfsPath
textureName,
CFixedVector2D
corner0,
CFixedVector2D
corner1,
CFixedVector3D
offset) = 0;
53
54
DECLARE_INTERFACE_TYPE
(
OverlayRenderer
)
55
};
56
57
#endif // INCLUDED_ICMPOVERLAYRENDERER
IComponent
Definition:
IComponent.h:33
FixedVector2D.h
CFixedVector2D
Definition:
FixedVector2D.h:24
OverlayRenderer
Class OverlayRenderer: Render various bits of data that overlay the game world (selection circles...
Definition:
OverlayRenderer.h:35
ICmpOverlayRenderer::AddSprite
virtual void AddSprite(VfsPath textureName, CFixedVector2D corner0, CFixedVector2D corner1, CFixedVector3D offset)=0
Add a new textured billboard sprite to be rendered.
ICmpOverlayRenderer::Reset
virtual void Reset()=0
Delete all sprites that have been previously added.
Path
Definition:
path.h:75
CFixedVector3D
Definition:
FixedVector3D.h:24
DECLARE_INTERFACE_TYPE
#define DECLARE_INTERFACE_TYPE(iname)
Definition:
Interface.h:23
FixedVector3D.h
vfs_path.h
Interface.h
Position.h
Entity coordinate types.
ICmpOverlayRenderer
Interface for rendering 'overlay' objects (typically sprites), automatically positioned relative to t...
Definition:
ICmpOverlayRenderer.h:37
Generated on Mon Oct 14 2013 00:58:09 for Pyrogenesis by
1.8.5