Exports a coordinate frame, typically in response to user input.
More...
Inherits G3D::Widget.
Inherited by G3D::FirstPersonManipulator, G3D::ThirdPersonManipulator, and G3D::UprightSplineManipulator.
|
template<class T , class ... ArgTypes> |
static shared_ptr< T > | createShared (ArgTypes &&... args) |
| Like std::make_shared, but works for protected constructors. More...
|
|
Exports a coordinate frame, typically in response to user input.
Examples: G3D::ThirdPersonManipulator, G3D::FirstPersonManipulator
◆ bounds()
virtual Rect2D G3D::Widget::bounds |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
◆ createShared()
template<class T , class ... ArgTypes>
static shared_ptr<T> G3D::ReferenceCountedObject::createShared |
( |
ArgTypes &&... |
args | ) |
|
|
inlinestaticprotectedinherited |
Like std::make_shared, but works for protected constructors.
Call as createShared<myclass>.
◆ depth()
virtual float G3D::Widget::depth |
( |
| ) |
const |
|
inlineoverridevirtualinherited |
Inherited from Surface2D.
Controls the depth of objects when rendering. Subclasses may override this but it can interfere with the normal handling of rendering and event delivery. depth = 0 is usually the "top" widget and depth = 1 is usually the "bottom" widget.
Implements G3D::Surface2D.
Reimplemented in G3D::GuiWindow, G3D::GConsole, and G3D::FullScreenWidget.
◆ enabled()
virtual bool G3D::Manipulator::enabled |
( |
| ) |
const |
|
inlinevirtual |
◆ fireEvent()
virtual void G3D::Widget::fireEvent |
( |
const GEvent & |
event | ) |
|
|
virtualinherited |
◆ frame()
◆ getFrame()
◆ manager()
◆ onAfterEvents()
virtual void G3D::Widget::onAfterEvents |
( |
| ) |
|
|
inlinevirtualinherited |
◆ onAI()
virtual void G3D::Widget::onAI |
( |
| ) |
|
|
inlinevirtualinherited |
◆ onBeforeGraphics()
virtual void G3D::Widget::onBeforeGraphics |
( |
| ) |
|
|
inlinevirtualinherited |
◆ onEvent()
virtual bool G3D::Widget::onEvent |
( |
const GEvent & |
event | ) |
|
|
inlinevirtualinherited |
Returning true consumes the event and prevents other GModules from seeing it.
Motion events (GEventType::MOUSEMOTION, GEventType::JOYHATMOTION, JGEventType::OYBALLMOTION, and GEventType::JOYAXISMOTION) cannot be cancelled.
Reimplemented in G3D::GuiWindow, G3D::WidgetManager, G3D::ThirdPersonManipulator, G3D::GConsole, G3D::Discovery::Client, G3D::SceneEditorWindow, G3D::FirstPersonManipulator, G3D::VideoRecordDialog, G3D::UprightSplineManipulator, G3D::CameraControlWindow, G3D::GuiMenu, G3D::ControlPointEditor, G3D::DeveloperWindow, and G3D::ArticulatedModelSpecificationEditorDialog.
◆ onNetwork()
virtual void G3D::Widget::onNetwork |
( |
| ) |
|
|
inlinevirtualinherited |
◆ onPose()
virtual void G3D::Widget::onPose |
( |
Array< shared_ptr< Surface > > & |
surfaceArray, |
|
|
Array< shared_ptr< Surface2D > > & |
surface2DArray |
|
) |
| |
|
inlinevirtualinherited |
◆ onSimulation()
Reimplemented in G3D::GuiWindow, G3D::WidgetManager, G3D::ThirdPersonManipulator, G3D::GConsole, G3D::SceneEditorWindow, G3D::CallbackWidget, G3D::FirstPersonManipulator, G3D::XRWidget, G3D::UprightSplineManipulator, G3D::ControlPointEditor, and G3D::PhysicsFrameSplineEditor.
◆ onUserInput()
virtual void G3D::Widget::onUserInput |
( |
UserInput * |
ui | ) |
|
|
inlinevirtualinherited |
◆ positionalEventZ()
virtual float G3D::Widget::positionalEventZ |
( |
const Point2 & |
pixel | ) |
const |
|
inlinevirtualinherited |
The camera-space z position that this Widget considers this pixel to be at.
Used for positional event (e.g., mouse click) delivery. Higher means closer.
Large negative values are far away. 0 is the closest 3D object. Values greater than zero are used for 2D objects. Returning fnan() [the default] requests the WidgetManager to set hte positionalEventZ to the object's normal event zorder.
See the implementation of ControlPointEditor::positionalEventZ for an example of how to use this with a 3D object.
Reimplemented in G3D::ControlPointEditor.
◆ render()
|
inlineoverridevirtualinherited |
◆ setDepth()
virtual void G3D::Widget::setDepth |
( |
float |
d | ) |
|
|
inlinevirtualinherited |
Called by the WidgetManager.
This is the depth that the Widget is expected to use when posed as a Surface2D. Subclasses may override or ignore this but it can interfere with the normal handling of rendering.
◆ setEnabled()
virtual void G3D::Manipulator::setEnabled |
( |
bool |
b | ) |
|
|
inlinevirtual |
◆ setFrame()
virtual void G3D::Manipulator::setFrame |
( |
const CFrame & |
c | ) |
|
|
inlinevirtual |
By default, does nothing.
◆ setManager()
◆ sort()
static void G3D::Surface2D::sort |
( |
Array< shared_ptr< Surface2D >> & |
array | ) |
|
|
staticinherited |
Sorts from farthest to nearest.
◆ sortAndRender()
Calls sort, RenderDevice::push2D, and then render on all elements.
◆ window()
virtual OSWindow* G3D::Widget::window |
( |
| ) |
const |
|
virtualinherited |
◆ m_depth
float G3D::Widget::m_depth |
|
protectedinherited |
◆ m_manager