Changeset View
Changeset View
Standalone View
Standalone View
source/graphics/Overlay.h
Show All 19 Lines | |||||
#include "graphics/Color.h" | #include "graphics/Color.h" | ||||
#include "graphics/Texture.h" | #include "graphics/Texture.h" | ||||
#include "maths/Vector2D.h" | #include "maths/Vector2D.h" | ||||
#include "maths/Vector3D.h" | #include "maths/Vector3D.h" | ||||
#include "maths/FixedVector3D.h" | #include "maths/FixedVector3D.h" | ||||
#include "ps/CStrIntern.h" | #include "ps/CStrIntern.h" | ||||
class CFrustum; | |||||
class CTerrain; | class CTerrain; | ||||
class CSimContext; | class CSimContext; | ||||
class CTexturedLineRData; | class CTexturedLineRData; | ||||
struct SOverlayDescriptor; | struct SOverlayDescriptor; | ||||
/** | /** | ||||
* Line-based overlay, with world-space coordinates, rendered in the world | * Line-based overlay, with world-space coordinates, rendered in the world | ||||
* potentially behind other objects. Designed for selection circles and debug info. | * potentially behind other objects. Designed for selection circles and debug info. | ||||
▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | struct SOverlayTexturedLine | ||||
void PushCoords(const float x, const float z) { m_Coords.push_back(x); m_Coords.push_back(z); } | void PushCoords(const float x, const float z) { m_Coords.push_back(x); m_Coords.push_back(z); } | ||||
void PushCoords(const CVector2D& v) { PushCoords(v.X, v.Y); } | void PushCoords(const CVector2D& v) { PushCoords(v.X, v.Y); } | ||||
void PushCoords(const std::vector<CVector2D>& points) | void PushCoords(const std::vector<CVector2D>& points) | ||||
{ | { | ||||
for (size_t i = 0; i < points.size(); ++i) | for (size_t i = 0; i < points.size(); ++i) | ||||
PushCoords(points[i]); | PushCoords(points[i]); | ||||
} | } | ||||
bool IsVisibleInFrustum(const CFrustum& frustum) const; | |||||
}; | }; | ||||
/** | /** | ||||
* Billboard sprite overlay, with world-space coordinates, rendered on top | * Billboard sprite overlay, with world-space coordinates, rendered on top | ||||
* of all other objects. Designed for health bars and rank icons. | * of all other objects. Designed for health bars and rank icons. | ||||
*/ | */ | ||||
struct SOverlaySprite | struct SOverlaySprite | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 52 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator