Nebula
Loading...
Searching...
No Matches
Im3d::Im3dContext Class Reference

#include <im3dcontext.h>

Inherits Graphics::GraphicsContext.

Public Member Functions

 Im3dContext ()
 constructor
 
virtual ~Im3dContext ()
 destructor
 
- Public Member Functions inherited from Graphics::GraphicsContext
 GraphicsContext ()
 constructor
 
virtual ~GraphicsContext ()
 destructor
 

Static Public Member Functions

static void Create ()
 
static void Discard ()
 
static void DrawText (const Math::vec3 &position, Util::String const &text, const float size=10.0f, const Math::vec4 color={ 1.0f, 0.0f, 0.0f, 1.0f }, uint32_t renderFlags=CheckDepth)
 
static void DrawPoint (const Math::vec3 &position, const float size=10.0f, const Math::vec4 color={ 1.0f, 0.0f, 0.0f, 1.0f }, uint32_t renderFlags=CheckDepth)
 
static void DrawLine (const Math::line &line, const float size=1.0f, const Math::vec4 color={1.0f, 0.0f, 0.0f, 1.0f}, uint32_t renderFlags=CheckDepth)
 
static void DrawBox (const Math::bbox &box, const Math::vec4 &color, uint32_t renderFlags=CheckDepth|Wireframe)
 
static void DrawOrientedBox (const Math::mat4 &transform, const Math::bbox &box, const Math::vec4 &color, uint32_t renderFlags=CheckDepth|Wireframe)
 
static void DrawBox (const Math::mat4 &modelTransform, const Math::vec4 &color, uint32_t renderFlags=CheckDepth|Wireframe)
 
static void DrawSphere (const Math::mat4 &modelTransform, const Math::vec4 &color, uint32_t renderFlags=CheckDepth|Wireframe)
 draw a sphere
 
static void DrawSphere (const Math::point &pos, float radius, const Math::vec4 &color, uint32_t renderFlags=CheckDepth|Wireframe)
 draw a sphere
 
static void DrawCylinder (const Math::mat4 &modelTransform, const Math::vec4 &color, uint32_t renderFlags=CheckDepth|Wireframe)
 draw a cylinder
 
static void DrawCone (const Math::mat4 &modelTransform, const Math::vec4 &color, uint32_t renderFlags=CheckDepth|Wireframe)
 draw a cone
 
static void OnPrepareView (const Ptr< Graphics::View > &view, const Graphics::FrameContext &ctx)
 called before frame
 
static void Render (const CoreGraphics::CmdBufferId cmdBuf, const IndexT frameIndex)
 called when rendering a frame batch
 
static bool HandleInput (const Input::InputEvent &event)
 handle event
 
static void SetGridStatus (bool enable)
 
static void SetGridSize (float cellSize, int cellCount)
 
static void SetGridColor (Math::vec4 const &color)
 
static void SetGridOffset (Math::vec2 const &offset)
 
static void SetGizmoSize (int size, int width)
 configure size and thickness of gizmos
 

Private Member Functions

 __DeclarePluginContext ()
 

Additional Inherited Members

- Static Protected Member Functions inherited from Graphics::GraphicsContext
static void InternalRegisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state)
 
static void InternalDeregisterEntity (const Graphics::GraphicsEntityId id, Graphics::GraphicsContextState &&state)
 
template<class ID_ALLOCATOR >
static void InternalDefragment (ID_ALLOCATOR &allocator, Graphics::GraphicsContextState &&state)
 

Constructor & Destructor Documentation

◆ Im3dContext()

Im3d::Im3dContext::Im3dContext ( )

constructor

◆ ~Im3dContext()

Im3d::Im3dContext::~Im3dContext ( )
virtual

destructor

Member Function Documentation

◆ __DeclarePluginContext()

Im3d::Im3dContext::__DeclarePluginContext ( )
private

◆ Create()

void Im3d::Im3dContext::Create ( )
static

◆ Discard()

void Im3d::Im3dContext::Discard ( )
static

◆ DrawBox() [1/2]

void Im3d::Im3dContext::DrawBox ( const Math::bbox & box,
const Math::vec4 & color,
uint32_t renderFlags = CheckDepth|Wireframe )
static

◆ DrawBox() [2/2]

void Im3d::Im3dContext::DrawBox ( const Math::mat4 & modelTransform,
const Math::vec4 & color,
uint32_t renderFlags = CheckDepth | Wireframe )
static

◆ DrawCone()

static void Im3d::Im3dContext::DrawCone ( const Math::mat4 & modelTransform,
const Math::vec4 & color,
uint32_t renderFlags = CheckDepth|Wireframe )
static

draw a cone

◆ DrawCylinder()

static void Im3d::Im3dContext::DrawCylinder ( const Math::mat4 & modelTransform,
const Math::vec4 & color,
uint32_t renderFlags = CheckDepth|Wireframe )
static

draw a cylinder

◆ DrawLine()

void Im3d::Im3dContext::DrawLine ( const Math::line & line,
const float size = 1.0f,
const Math::vec4 color = {1.0f, 0.0f, 0.0f, 1.0f},
uint32_t renderFlags = CheckDepth )
static

◆ DrawOrientedBox()

void Im3d::Im3dContext::DrawOrientedBox ( const Math::mat4 & transform,
const Math::bbox & box,
const Math::vec4 & color,
uint32_t renderFlags = CheckDepth | Wireframe )
static

◆ DrawPoint()

void Im3d::Im3dContext::DrawPoint ( const Math::vec3 & position,
const float size = 10.0f,
const Math::vec4 color = { 1.0f, 0.0f, 0.0f, 1.0f },
uint32_t renderFlags = CheckDepth )
static

◆ DrawSphere() [1/2]

void Im3d::Im3dContext::DrawSphere ( const Math::mat4 & modelTransform,
const Math::vec4 & color,
uint32_t renderFlags = CheckDepth | Wireframe )
static

draw a sphere

◆ DrawSphere() [2/2]

void Im3d::Im3dContext::DrawSphere ( const Math::point & pos,
float radius,
const Math::vec4 & color,
uint32_t renderFlags = CheckDepth | Wireframe )
static

draw a sphere

◆ DrawText()

void Im3d::Im3dContext::DrawText ( const Math::vec3 & position,
Util::String const & text,
const float size = 10.0f,
const Math::vec4 color = { 1.0f, 0.0f, 0.0f, 1.0f },
uint32_t renderFlags = CheckDepth )
static

◆ HandleInput()

bool Im3d::Im3dContext::HandleInput ( const Input::InputEvent & event)
static

handle event

◆ OnPrepareView()

void Im3d::Im3dContext::OnPrepareView ( const Ptr< Graphics::View > & view,
const Graphics::FrameContext & ctx )
static

called before frame

◆ Render()

void Im3d::Im3dContext::Render ( const CoreGraphics::CmdBufferId cmdBuf,
const IndexT frameIndex )
static

called when rendering a frame batch

◆ SetGizmoSize()

void Im3d::Im3dContext::SetGizmoSize ( int size,
int width )
static

configure size and thickness of gizmos

◆ SetGridColor()

void Im3d::Im3dContext::SetGridColor ( Math::vec4 const & color)
static

◆ SetGridOffset()

void Im3d::Im3dContext::SetGridOffset ( Math::vec2 const & offset)
static

◆ SetGridSize()

void Im3d::Im3dContext::SetGridSize ( float cellSize,
int cellCount )
static

◆ SetGridStatus()

void Im3d::Im3dContext::SetGridStatus ( bool enable)
static

The documentation for this class was generated from the following files: