Hymn to Beauty
C++ 3D Engine
GUI::IShapeEditor Class Referenceabstract

Interface to editors of physics shapes. More...

#include <IShapeEditor.hpp>

Inheritance diagram for GUI::IShapeEditor:
GUI::BoxShapeEditor GUI::CapsuleShapeEditor GUI::ConeShapeEditor GUI::CylinderShapeEditor GUI::PlaneShapeEditor GUI::SphereShapeEditor

Public Member Functions

virtual ~IShapeEditor ()
 Destructor. More...
 
virtual const char * Label () const =0
 
virtual void Show (Component::Shape *comp)=0
 Displays the editor. More...
 
virtual void Apply (Component::Shape *comp)=0
 Set the shape of a shape component. More...
 
virtual bool SetFromShape (const Physics::Shape &shape)=0
 

Detailed Description

Interface to editors of physics shapes.

Constructor & Destructor Documentation

◆ ~IShapeEditor()

virtual GUI::IShapeEditor::~IShapeEditor ( )
inlinevirtual

Destructor.

Member Function Documentation

◆ Apply()

virtual void GUI::IShapeEditor::Apply ( Component::Shape comp)
pure virtual

Set the shape of a shape component.

Parameters
compThe shape component on which to set shape.

Implemented in GUI::BoxShapeEditor, GUI::CapsuleShapeEditor, GUI::ConeShapeEditor, GUI::CylinderShapeEditor, GUI::PlaneShapeEditor, and GUI::SphereShapeEditor.

◆ Label()

virtual const char * GUI::IShapeEditor::Label ( ) const
pure virtual

Get a string with the kind of shape that's being edited. This is intended to be used as a label in the GUI.

Returns
The type of shape as a string.

Implemented in GUI::BoxShapeEditor, GUI::CapsuleShapeEditor, GUI::ConeShapeEditor, GUI::CylinderShapeEditor, GUI::PlaneShapeEditor, and GUI::SphereShapeEditor.

◆ SetFromShape()

virtual bool GUI::IShapeEditor::SetFromShape ( const Physics::Shape shape)
pure virtual

Set internal data according to an existing shape. If the shape does not correspond to the actual editor, nothing happens.

Parameters
shapeThe Shape from which to initialize data.
Returns
True if shape matched editor type, false otherwise.

Implemented in GUI::BoxShapeEditor, GUI::CapsuleShapeEditor, GUI::ConeShapeEditor, GUI::CylinderShapeEditor, GUI::PlaneShapeEditor, and GUI::SphereShapeEditor.

◆ Show()

virtual void GUI::IShapeEditor::Show ( Component::Shape comp)
pure virtual

Displays the editor.

Parameters
compThe shape component to edit.

Implemented in GUI::BoxShapeEditor, GUI::CapsuleShapeEditor, GUI::ConeShapeEditor, GUI::CylinderShapeEditor, GUI::PlaneShapeEditor, and GUI::SphereShapeEditor.


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