Divide Framework 0.1
A free and open-source 3D Framework under heavy development
Loading...
Searching...
No Matches
Divide::Gizmo Class Reference

#include <Gizmo.h>

Classes

struct  SelectedNode
 

Public Member Functions

 Gizmo (Editor &parent, ImGuiContext *targetContext)
 
 ~Gizmo ()
 
ImGuiContext & getContext () noexcept
 
const ImGuiContext & getContext () const noexcept
 
bool needsMouse () const
 
bool hovered () const noexcept
 
void enable (bool state) noexcept
 
bool enabled () const noexcept
 
bool active () const noexcept
 
void onMouseButton (bool pressed) noexcept
 
bool onKey (bool pressed, const Input::KeyEvent &key)
 

Protected Member Functions

void update (U64 deltaTimeUS)
 
void render (const Camera *camera, const Rect< I32 > &targetViewport, GFX::CommandBuffer &bufferInOut, GFX::MemoryBarrierCommand &memCmdInOut)
 
void renderSingleSelection (const Camera *camera)
 
void renderMultipleSelections (const Camera *camera)
 
void updateSelections (const vector< SceneGraphNode * > &nodes)
 
void setTransformSettings (const TransformSettings &settings) noexcept
 
const TransformSettingsgetTransformSettings () const noexcept
 
void onSceneFocus (bool state) noexcept
 

Private Member Functions

void applyTransforms (const SelectedNode &node, const vec3< F32 > &position, const vec3< Angle::DEGREES< F32 > > &euler, const vec3< F32 > &scale)
 

Private Attributes

Editor_parent
 
bool _enabled = false
 
bool _wasUsed = false
 
bool _shouldRegisterUndo = false
 
vector< SelectedNode_selectedNodes
 
ImGuiContext * _imguiContext = nullptr
 
TransformSettings _transformSettings
 
mat4< F32_workMatrix
 
mat4< F32_localToWorldMatrix
 
mat4< F32_deltaMatrix
 

Friends

class Attorney::GizmoEditor
 

Detailed Description

Definition at line 87 of file Gizmo.h.

Constructor & Destructor Documentation

◆ Gizmo()

Divide::Gizmo::Gizmo ( Editor parent,
ImGuiContext *  targetContext 
)
explicit

Definition at line 64 of file Gizmo.cpp.

◆ ~Gizmo()

Divide::Gizmo::~Gizmo ( )

Definition at line 72 of file Gizmo.cpp.

Member Function Documentation

◆ active()

bool Divide::Gizmo::active ( ) const
noexcept

Definition at line 99 of file Gizmo.cpp.

◆ applyTransforms()

void Divide::Gizmo::applyTransforms ( const SelectedNode node,
const vec3< F32 > &  position,
const vec3< Angle::DEGREES< F32 > > &  euler,
const vec3< F32 > &  scale 
)
private

Definition at line 176 of file Gizmo.cpp.

◆ enable()

void Divide::Gizmo::enable ( bool  state)
noexcept

Definition at line 89 of file Gizmo.cpp.

◆ enabled()

bool Divide::Gizmo::enabled ( ) const
noexcept

Definition at line 94 of file Gizmo.cpp.

◆ getContext() [1/2]

const ImGuiContext & Divide::Gizmo::getContext ( ) const
noexcept

Definition at line 83 of file Gizmo.cpp.

◆ getContext() [2/2]

ImGuiContext & Divide::Gizmo::getContext ( )
noexcept

Definition at line 77 of file Gizmo.cpp.

◆ getTransformSettings()

const TransformSettings & Divide::Gizmo::getTransformSettings ( ) const
protectednoexcept

Definition at line 349 of file Gizmo.cpp.

◆ hovered()

bool Divide::Gizmo::hovered ( ) const
noexcept

Definition at line 454 of file Gizmo.cpp.

◆ needsMouse()

bool Divide::Gizmo::needsMouse ( ) const

Definition at line 440 of file Gizmo.cpp.

◆ onKey()

bool Divide::Gizmo::onKey ( bool  pressed,
const Input::KeyEvent key 
)

Definition at line 362 of file Gizmo.cpp.

◆ onMouseButton()

void Divide::Gizmo::onMouseButton ( bool  pressed)
noexcept

Definition at line 427 of file Gizmo.cpp.

◆ onSceneFocus()

void Divide::Gizmo::onSceneFocus ( bool  state)
protectednoexcept

Definition at line 354 of file Gizmo.cpp.

◆ render()

void Divide::Gizmo::render ( const Camera camera,
const Rect< I32 > &  targetViewport,
GFX::CommandBuffer bufferInOut,
GFX::MemoryBarrierCommand memCmdInOut 
)
protected

Definition at line 114 of file Gizmo.cpp.

◆ renderMultipleSelections()

void Divide::Gizmo::renderMultipleSelections ( const Camera camera)
protected

Definition at line 228 of file Gizmo.cpp.

◆ renderSingleSelection()

void Divide::Gizmo::renderSingleSelection ( const Camera camera)
protected

Definition at line 198 of file Gizmo.cpp.

◆ setTransformSettings()

void Divide::Gizmo::setTransformSettings ( const TransformSettings settings)
protectednoexcept

Definition at line 344 of file Gizmo.cpp.

◆ update()

void Divide::Gizmo::update ( U64  deltaTimeUS)
protected

Definition at line 104 of file Gizmo.cpp.

◆ updateSelections()

void Divide::Gizmo::updateSelections ( const vector< SceneGraphNode * > &  nodes)
protected

Definition at line 286 of file Gizmo.cpp.

Friends And Related Function Documentation

◆ Attorney::GizmoEditor

friend class Attorney::GizmoEditor
friend

Definition at line 88 of file Gizmo.h.

Member Data Documentation

◆ _deltaMatrix

mat4<F32> Divide::Gizmo::_deltaMatrix
private

Definition at line 134 of file Gizmo.h.

◆ _enabled

bool Divide::Gizmo::_enabled = false
private

Definition at line 125 of file Gizmo.h.

◆ _imguiContext

ImGuiContext* Divide::Gizmo::_imguiContext = nullptr
private

Definition at line 129 of file Gizmo.h.

◆ _localToWorldMatrix

mat4<F32> Divide::Gizmo::_localToWorldMatrix
private

Definition at line 133 of file Gizmo.h.

◆ _parent

Editor& Divide::Gizmo::_parent
private

Definition at line 124 of file Gizmo.h.

◆ _selectedNodes

vector<SelectedNode> Divide::Gizmo::_selectedNodes
private

Definition at line 128 of file Gizmo.h.

◆ _shouldRegisterUndo

bool Divide::Gizmo::_shouldRegisterUndo = false
private

Definition at line 127 of file Gizmo.h.

◆ _transformSettings

TransformSettings Divide::Gizmo::_transformSettings
private

Definition at line 130 of file Gizmo.h.

◆ _wasUsed

bool Divide::Gizmo::_wasUsed = false
private

Definition at line 126 of file Gizmo.h.

◆ _workMatrix

mat4<F32> Divide::Gizmo::_workMatrix
private

Definition at line 132 of file Gizmo.h.


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