18 #ifndef INCLUDED_CCMPRALLYPOINTRENDERER 19 #define INCLUDED_CCMPRALLYPOINTRENDERER 50 : m_Visible(visible), m_StartIndex(startIndex), m_EndIndex(endIndex)
60 return !(*
this == other);
72 static std::string GetSchema();
76 void Deinit()
override;
81 void HandleMessage(
const CMessage& msg,
bool UNUSED(global))
override;
87 virtual void UpdateMessageSubscriptions();
95 void SetDisplayed(
bool displayed)
override;
97 void Reset()
override;
99 void UpdateColor()
override;
104 bool IsSet()
const override;
119 std::vector<std::vector<CVector2D> >
m_Path;
186 void UpdateLineColor();
195 void UpdateMarkers();
203 void RecomputeAllRallyPointPaths();
210 void RecomputeRallyPointPath_wrapper(
size_t index);
224 void UpdateOverlayLines();
231 void ConstructAllOverlayLines();
237 void ConstructOverlayLines(
size_t index);
248 void GetVisibilitySegments(std::vector<SVisibilitySegment>&
out,
size_t index)
const;
262 void ReduceSegmentsByVisibility(std::vector<CVector2D>& coords,
unsigned maxSegmentLinks = 0,
bool floating =
true)
const;
268 static void MergeVisibilitySegments(std::vector<SVisibilitySegment>& segments);
275 #endif // INCLUDED_CCMPRALLYPOINTRENDERER
An entity initialisation parameter node.
Definition: ParamNode.h:150
CColor m_LineDashColor
Definition: CCmpRallyPointRenderer.h:152
#define REGISTER_COMPONENT_TYPE(cname)
Definition: Component.h:32
float m_LineThickness
Marker connector line settings (loaded from XML)
Definition: CCmpRallyPointRenderer.h:150
Definition: FixedVector2D.h:24
#define UNUSED(param)
mark a function parameter as unused and avoid the corresponding compiler warning. ...
Definition: code_annotation.h:38
size_t m_EndIndex
Definition: CCmpRallyPointRenderer.h:47
SVisibilitySegment(bool visible, size_t startIndex, size_t endIndex)
Definition: CCmpRallyPointRenderer.h:49
Serialization interface; see serialization overview.
Definition: ISerializer.h:120
static void out(const wchar_t *fmt,...)
Definition: wdbg_sym.cpp:421
std::vector< CFixedVector2D > m_RallyPoints
Display position of the rally points.
Definition: CCmpRallyPointRenderer.h:115
std::wstring m_LineTextureMaskPath
Definition: CCmpRallyPointRenderer.h:156
std::wstring m_LineTexturePath
Definition: CCmpRallyPointRenderer.h:155
SOverlayTexturedLine::LineCapType m_LineEndCapType
Definition: CCmpRallyPointRenderer.h:154
std::wstring m_MarkerTemplate
Template name of the rally point markers.
Definition: CCmpRallyPointRenderer.h:145
SOverlayTexturedLine::LineCapType m_LineStartCapType
Definition: CCmpRallyPointRenderer.h:153
int32_t player_id_t
valid player IDs are non-negative (see ICmpOwnership)
Definition: Player.h:24
bool m_Displayed
Should we render the rally points and the path lines? (set from JS when e.g.
Definition: CCmpRallyPointRenderer.h:127
This interface accepts renderable objects.
Definition: Scene.h:89
std::vector< entity_id_t > m_MarkerEntityIds
Entity IDs of the rally point markers.
Definition: CCmpRallyPointRenderer.h:135
std::vector< std::vector< SOverlayTexturedLine > > m_TexturedOverlayLines
Textured overlay lines to be used for rendering the marker line.
Definition: CCmpRallyPointRenderer.h:169
std::vector< std::vector< CVector2D > > m_Path
Full path to the rally points as returned by the pathfinder, with some post-processing applied to red...
Definition: CCmpRallyPointRenderer.h:119
uint32_t u32
Definition: types.h:39
bool m_EnableDebugNodeOverlay
Draw little overlay circles to indicate where the exact path points are.
Definition: CCmpRallyPointRenderer.h:174
Definition: ComponentManager.h:39
Definition: CCmpRallyPointRenderer.h:43
std::string m_LinePassabilityClass
Pathfinder passability class to use for computing the (long-range) marker line path.
Definition: CCmpRallyPointRenderer.h:160
#define DEFAULT_COMPONENT_ALLOCATOR(cname)
Definition: Component.h:39
bool m_Visible
Definition: CCmpRallyPointRenderer.h:45
bool operator==(const SVisibilitySegment &other) const
Definition: CCmpRallyPointRenderer.h:53
bool IsSinglePoint() const
Definition: CCmpRallyPointRenderer.h:63
CTexturePtr m_TextureMask
Definition: CCmpRallyPointRenderer.h:163
A simplified syntax for accessing entity components.
Definition: CmpPtr.h:55
bool operator!=(const SVisibilitySegment &other) const
Definition: CCmpRallyPointRenderer.h:58
std::vector< std::vector< SOverlayLine > > m_DebugNodeOverlays
Definition: CCmpRallyPointRenderer.h:175
size_t m_StartIndex
Definition: CCmpRallyPointRenderer.h:46
Definition: CCmpRallyPointRenderer.h:69
player_id_t m_LastOwner
Last seen owner of this entity (used to keep track of ownership changes).
Definition: CCmpRallyPointRenderer.h:141
Rally Point.
Definition: ICmpRallyPointRenderer.h:29
Definition: SerializeTemplates.h:63
CTexturePtr m_Texture
Definition: CCmpRallyPointRenderer.h:162
bool m_SmoothPath
Smooth the path before rendering?
Definition: CCmpRallyPointRenderer.h:131
size_t m_LastMarkerCount
Definition: CCmpRallyPointRenderer.h:137
CColor m_LineColor
Definition: CCmpRallyPointRenderer.h:151
std::shared_ptr< CTexture > CTexturePtr
Definition: Texture.h:22
LineCapType
Definition: Overlay.h:67
std::vector< std::vector< SVisibilitySegment > > m_VisibilitySegments
Visibility segments of the rally point paths; splits the path into SoD/non-SoD segments.
Definition: CCmpRallyPointRenderer.h:123
Helper functions related to geometry algorithms.
bool Init(const CmdLineArgs &args, int flags)
Returns true if successful, false if mods changed and restart_engine was called.
Definition: GameSetup.cpp:525
Deserialization interface; see serialization overview.
Definition: IDeserializer.h:34