PLUGIN SDK / Viewport / Viewport
Viewport
Viewport drawing and camera for viewport tools (valid inside a tool's Draw).
Kindclass
NamespaceKroys.Plugins
Members7
Source
World.csDECLARATION
Declaration
Namespace Kroys.Plugins, assembly KroysPlugins.Sdk.dll.
Declaration
public sealed unsafe class Viewport
REFERENCE
Members
Methods
#public void DrawLine(Vector3 from, Vector3 to, Vector4 color, float thickness = 1.5f)A line (RGBA 0..1).
#public void DrawCircle(Vector3 center, Vector3 normal, float radius, Vector4 color, float thickness = 1.5f)A circle around
normal.#public void DrawBox(Vector3 minimum, Vector3 maximum, Vector4 color, float thickness = 1.5f)An axis-aligned box.
#public void DrawPoint(Vector3 position, float size, Vector4 color)A point.
#public void DrawLabel(Vector3 position, string text, Vector4 color)A text label at a world position.
#public Vector2? WorldToScreen(Vector3 world)Screen position (pixels from the viewport's top-left) of a world point; null when behind the camera.
#public void ActivateTool(string? toolId)Activates a tool of this plugin by local id (null: none).
Signatures
public void DrawLine(Vector3 from, Vector3 to, Vector4 color, float thickness = 1.5f) public void DrawCircle(Vector3 center, Vector3 normal, float radius, Vector4 color, float thickness = 1.5f) public void DrawBox(Vector3 minimum, Vector3 maximum, Vector4 color, float thickness = 1.5f) public void DrawPoint(Vector3 position, float size, Vector4 color) public void DrawLabel(Vector3 position, string text, Vector4 color) public Vector2? WorldToScreen(Vector3 world) public void ActivateTool(string? toolId)
KroysEngine 0.1.0 documentation, built from the engine repository by Tools/BuildDocsSite.py.