载入中...
搜索中...
未找到
EditorPresentation.h
浏览该文件的文档.
1#pragma once
2
3#include <string>
4
5namespace eve::editor {
6
9 float x = 0.f;
10 float y = 0.f;
11 float z = 0.f;
12};
13
16 unsigned int color = 0xffffffffU;
17 float thickness = 1.f;
18 bool filled = false;
19};
20
28public:
30 virtual ~IEditorOverlay() = default;
31
33 virtual void line(const OverlayPoint &from, const OverlayPoint &to, const OverlayStyle &style) = 0;
35 virtual void circle(const OverlayPoint &center, float radius, const OverlayStyle &style) = 0;
37 virtual void rectangle(const OverlayPoint &minimum, const OverlayPoint &maximum, const OverlayStyle &style) = 0;
39 virtual void text(const OverlayPoint &position, const std::string &value, const OverlayStyle &style) = 0;
40};
41
48public:
50 virtual ~IEditorInspector() = default;
51
53 virtual void beginGroup(const std::string &id, const std::string &label) = 0;
55 virtual void endGroup() = 0;
57 virtual bool boolean(const std::string &id, const std::string &label, bool &value) = 0;
59 virtual bool integer(const std::string &id, const std::string &label, int &value, int minimum, int maximum) = 0;
61 virtual bool scalar(const std::string &id, const std::string &label, float &value, float minimum, float maximum) = 0;
63 virtual bool string(const std::string &id, const std::string &label, std::string &value) = 0;
64};
65
66} // namespace eve::editor
double value
std::string from
std::string label
float maximum[3]
float minimum[3]
HexCoordinates to
Cell the unit walks towards on this segment.
Definition HexUnits.cpp:64
std::array< float, 3 > position
float radius
UI-independent property editor used by tools to expose settings.
virtual bool integer(const std::string &id, const std::string &label, int &value, int minimum, int maximum)=0
Present an editable integer property.
virtual void endGroup()=0
End the current logical group.
virtual ~IEditorInspector()=default
Releases IEditorInspector resources.
virtual void beginGroup(const std::string &id, const std::string &label)=0
Begin a logical group of properties.
virtual bool boolean(const std::string &id, const std::string &label, bool &value)=0
Present an editable boolean property.
virtual bool scalar(const std::string &id, const std::string &label, float &value, float minimum, float maximum)=0
Present an editable scalar property.
virtual bool string(const std::string &id, const std::string &label, std::string &value)=0
Present an editable text property.
Sink implemented by a 2D or 3D viewport to render tool feedback.
virtual void text(const OverlayPoint &position, const std::string &value, const OverlayStyle &style)=0
Draw a short text annotation.
virtual void circle(const OverlayPoint &center, float radius, const OverlayStyle &style)=0
Draw a circle whose orientation is supplied by the viewport.
virtual ~IEditorOverlay()=default
Releases IEditorOverlay resources.
virtual void line(const OverlayPoint &from, const OverlayPoint &to, const OverlayStyle &style)=0
Draw a line between two viewport-space points.
virtual void rectangle(const OverlayPoint &minimum, const OverlayPoint &maximum, const OverlayStyle &style)=0
Draw an axis-aligned rectangle in viewport coordinates.
A point in the coordinate space chosen by an editor viewport adapter.
Renderer-independent appearance for an editor overlay primitive.