Ocular Engine
Ocular::Editor::Editor Class Reference
Inheritance diagram for Ocular::Editor::Editor:
Ocular::Core::AEventListener

Public Member Functions

bool initialize (int argc, char **argv)
 
void shutdown ()
 
bool run ()
 
MainWindowgetMainWindow () const
 
Core::CameragetEditorCamera () const
 
void setSelectedObject (Core::SceneObject *object, bool ignoreNormalObject=false, bool ignoreGizmoObject=false)
 
Core::SceneObjectgetSelectedObject () const
 
Core::SceneObjectgetFocusedObject () const
 
virtual bool onEvent (std::shared_ptr< Core::AEvent > event) override
 
void setStatusNormal (std::string const &message)
 
void setStatusPermanent (std::string const &message)
 
void setStatusTemporary (std::string const &message, uint32_t lifetime)
 
void setStatusNormalProgress (std::string const &message, uint32_t progress)
 
PropertyWidgetcreatePropertyWidget (std::string const &displayName, std::string const &type)
 
Core::ComponentFactory< PropertyWidget > & getPropertyWidgetFactory ()
 
PropertiesDisplayBoxcreateCustomDisplay (std::string const &type)
 
Core::ComponentFactory< PropertiesDisplayBox > & getCustomDisplayFactory ()
 
RenderableDisplaycreateRenderableDisplay (std::string const &type)
 
Core::ComponentFactory< RenderableDisplay > & getRenderableDisplayFactory ()
 

Static Public Member Functions

static Editorget ()
 
static bool IsCommonName (std::string const &name)
 
static std::string FormatName (std::string const &name)
 

Additional Inherited Members

- Protected Member Functions inherited from Ocular::Core::AEventListener
virtual bool onEvent (std::shared_ptr< AEvent > event)=0
 

Member Function Documentation

PropertiesDisplayBox * Ocular::Editor::Editor::createCustomDisplay ( std::string const &  type)

Attempts to create a custom display for the specified type.

Parameters
[in]typeType name of the property to be represented. See Utils::TypeName (ie Utils::TypeName<Vector3f>::name)
Returns
Pointer to new display, if matching constructor was found for specified type. Otherwise, returns NULL. The caller must assume ownership of the object.
PropertyWidget * Ocular::Editor::Editor::createPropertyWidget ( std::string const &  displayName,
std::string const &  type 
)

Attempts to create a property widget for the specified type.

Parameters
[in]displayNameName of the property widget (display on left-hand side of widget)
[in]typeType name of the property to be represented. See Utils::TypeName (ie Utils::TypeName<Vector3f>::name)
Returns
Pointer to new widget, if matching constructor was found for specified type. Otherwise, returns NULL. The caller must assume ownership of the object.
Core::ComponentFactory< PropertiesDisplayBox > & Ocular::Editor::Editor::getCustomDisplayFactory ( )
Returns
Reference to the custom display factory used by the Editor
Core::Camera * Ocular::Editor::Editor::getEditorCamera ( ) const
Returns
Pointer to the editor-specific camera used to view scenes.
Core::SceneObject * Ocular::Editor::Editor::getFocusedObject ( ) const

Returns a pointer to the currently focused SceneObject. This object is set via the handling of SceneObjectFocusedEvent.

It should be noted that while it is common for getSelectedObject and getFocusedObject to return the SceneObject, there is no guarantee that this is always the case. They can be two completely separate SceneObjects.

Returns
Pointer to the currently focused SceneObject. Returns NULL if none currently focused.
MainWindow * Ocular::Editor::Editor::getMainWindow ( ) const
Returns
Pointer to the main Qt window for the editor application.
Core::ComponentFactory< PropertyWidget > & Ocular::Editor::Editor::getPropertyWidgetFactory ( )
Returns
Reference to the property widget factory used by the Editor
Core::SceneObject * Ocular::Editor::Editor::getSelectedObject ( ) const

Returns a pointer to the currently selected SceneObject. This object is set via the handling of SceneObjectSelectedEvent.

It should be noted that while it is common for getSelectedObject and getFocusedObject to return the SceneObject, there is no guarantee that this is always the case. They can be two completely separate SceneObjects.

Returns
Pointer to the currently selected SceneObject. Returns NULL if none currently selected.
bool Ocular::Editor::Editor::IsCommonName ( std::string const &  name)
static

Checks if the provided name is an object name belongs to either Object or SceneObject base members.

void Ocular::Editor::Editor::setSelectedObject ( Core::SceneObject object,
bool  ignoreNormalObject = false,
bool  ignoreGizmoObject = false 
)

Sets the currently selected SceneObject.

The selected object will be highlighted in the SceneTree widget, it's properties displayed in the Property widget, and visually selected in the RenderFrame.

The active mode transformation gizmo will also be attached to it.

Invoking this method will cause a SceneObjectSelectedEvent to be generated.

Parameters
[in]objectObject to be selected; If NULL is passed, the current object is deselected.
void Ocular::Editor::Editor::setStatusNormal ( std::string const &  message)

Sets the status text displayed in the main window status bar.

Note
If more control is required over the output status message/format/widget, the status bar may be retrieved via OcularEditor->getMainWindow()->getMainStatusBar()
Parameters
[in]messageText message to be displayed
void Ocular::Editor::Editor::setStatusNormalProgress ( std::string const &  message,
uint32_t  progress 
)

Sets the status text displayed in the main window status bar, accompanied by a progress bar widget.

Parameters
[in]messageText message to be displayed
[in]progressProgress bar progress on range [0, 100]
void Ocular::Editor::Editor::setStatusPermanent ( std::string const &  message)

Sets a permanent status message that is not obstructed by any other messages. It is typically placed on the far-right side of the status bar.

Note
If more control is required over the output status message/format/widget, the status bar may be retrieved via OcularEditor->getMainWindow()->getMainStatusBar()
Parameters
[in]messageText message to be displayed
void Ocular::Editor::Editor::setStatusTemporary ( std::string const &  message,
uint32_t  lifetime 
)

Sets a temporary status message to be displayed for the specified amount of milliseconds.

Typically used for tool-tip explanations, mouse-overs, etc.

Note
If more control is required over the output status message/format/widget, the status bar may be retrieved via OcularEditor->getMainWindow()->getMainStatusBar()
Parameters
[in]messageText message to be displayed
[in]lifetimeDuration of the message on range in milliseconds

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