Open 3D Engine AzToolsFramework API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
AzToolsFramework::LineSegmentSelectionManipulator Class Reference

A manipulator to expose where on a line a user is moving their mouse. More...

#include <LineSegmentSelectionManipulator.h>

Inherits AzToolsFramework::BaseManipulator, and AzToolsFramework::ManipulatorSpace.

Classes

struct  Action
 Mouse action data used by MouseActionCallback. More...
 

Public Types

using MouseActionCallback = AZStd::function< void(const Action &)>
 
- Public Types inherited from AzToolsFramework::BaseManipulator
using UniqueEntityIds = AZStd::unordered_set< AZ::EntityId >
 
using UniqueEntityComponentIds = AZStd::unordered_set< AZ::EntityComponentIdPair >
 

Public Member Functions

 AZ_RTTI (LineSegmentSelectionManipulator, "{8BA5A9E4-72B4-4B48-BD54-D9DB58EDDA72}", BaseManipulator)
 
 AZ_CLASS_ALLOCATOR (LineSegmentSelectionManipulator, AZ::SystemAllocator)
 
 LineSegmentSelectionManipulator (const LineSegmentSelectionManipulator &)=delete
 
LineSegmentSelectionManipulatoroperator= (const LineSegmentSelectionManipulator &)=delete
 
void InstallLeftMouseDownCallback (const MouseActionCallback &onMouseDownCallback)
 
void InstallLeftMouseUpCallback (const MouseActionCallback &onMouseUpCallback)
 
void Draw (const ManipulatorManagerState &managerState, AzFramework::DebugDisplayRequests &debugDisplay, const AzFramework::CameraState &cameraState, const ViewportInteraction::MouseInteraction &mouseInteraction) override
 Rendering for the manipulator - it is recommended drawing be delegated to a ManipulatorView.
 
void SetStart (const AZ::Vector3 &startLocal)
 
void SetEnd (const AZ::Vector3 &endLocal)
 
const AZ::Vector3 & GetStart () const
 
const AZ::Vector3 & GetEnd () const
 
void SetView (AZStd::unique_ptr< ManipulatorView > &&view)
 
- Public Member Functions inherited from AzToolsFramework::BaseManipulator
AZ_CLASS_ALLOCATOR_DECL BaseManipulator (const BaseManipulator &)=delete
 
BaseManipulatoroperator= (const BaseManipulator &)=delete
 
bool OnLeftMouseDown (const ViewportInteraction::MouseInteraction &interaction, float rayIntersectionDistance)
 
void OnLeftMouseUp (const ViewportInteraction::MouseInteraction &interaction)
 
bool OnRightMouseDown (const ViewportInteraction::MouseInteraction &interaction, float rayIntersectionDistance)
 
void OnRightMouseUp (const ViewportInteraction::MouseInteraction &interaction)
 
void OnMouseMove (const ViewportInteraction::MouseInteraction &interaction)
 
void OnMouseWheel (const ViewportInteraction::MouseInteraction &interaction)
 
bool OnMouseOver (ManipulatorId manipulatorId, const ViewportInteraction::MouseInteraction &interaction)
 
void Register (ManipulatorManagerId managerId)
 
void Unregister ()
 Unregister itself from the manipulator manager it was registered with.
 
void SetBoundsDirty ()
 Bounds will need to be recalculated next time we render.
 
bool Registered () const
 Is this manipulator currently registered with a manipulator manager.
 
bool PerformingAction () const
 Is the manipulator in the middle of an action (between mouse down and mouse up).
 
bool MouseOver () const
 Is the mouse currently over the manipulator (intersecting manipulator bound).
 
ManipulatorId GetManipulatorId () const
 The unique id of this manipulator.
 
ManipulatorManagerId GetManipulatorManagerId () const
 The unique id of the manager this manipulator was registered with.
 
const UniqueEntityComponentIds & EntityComponentIdPairs () const
 Returns all EntityComponentIdPairs associated with this manipulator.
 
void AddEntityComponentIdPair (const AZ::EntityComponentIdPair &entityComponentIdPair)
 Add an entity and component the manipulator is responsible for.
 
UniqueEntityComponentIds::iterator RemoveEntityId (AZ::EntityId entityId)
 
UniqueEntityComponentIds::iterator RemoveEntityComponentIdPair (const AZ::EntityComponentIdPair &entityComponentIdPair)
 Remove a specific component (via a EntityComponentIdPair) being affected by this manipulator.
 
bool HasEntityId (AZ::EntityId entityId) const
 Is this entity currently being tracked by this manipulator.
 
bool HasEntityComponentIdPair (const AZ::EntityComponentIdPair &entityComponentIdPair) const
 Is this entity component pair currently being tracked by this manipulator.
 
void ForwardMouseOverEvent (const ViewportInteraction::MouseInteraction &interaction)
 
- Public Member Functions inherited from AzToolsFramework::ManipulatorSpace
const AZ::Transform & GetSpace () const
 
void SetSpace (const AZ::Transform &space)
 
const AZ::Vector3 & GetNonUniformScale () const
 
void SetNonUniformScale (const AZ::Vector3 &nonUniformScale)
 
AZ::Transform ApplySpace (const AZ::Transform &localTransform) const
 Calculates a transform combining the space and local transform, taking non-uniform scale into account.
 

Static Public Member Functions

static AZStd::shared_ptr< LineSegmentSelectionManipulatorMakeShared ()
 A Manipulator must only be created and managed through a shared_ptr.
 

Additional Inherited Members

- Static Public Attributes inherited from AzToolsFramework::BaseManipulator
static const AZ::Color s_defaultMouseOverColor
 
- Protected Member Functions inherited from AzToolsFramework::BaseManipulator
 BaseManipulator ()=default
 Protected constructor.
 
void Invalidate ()
 Called when unregistering - users of manipulators should not call it directly.
 
virtual void InvalidateImpl ()
 The implementation to override in a derived class for Invalidate.
 
virtual void OnLeftMouseDownImpl (const ViewportInteraction::MouseInteraction &, float)
 
void AttachLeftMouseDownImpl ()
 
virtual void OnRightMouseDownImpl (const ViewportInteraction::MouseInteraction &, float)
 
void AttachRightMouseDownImpl ()
 
virtual void OnLeftMouseUpImpl (const ViewportInteraction::MouseInteraction &)
 The implementation to override in a derived class for OnLeftMouseUp.
 
virtual void OnRightMouseUpImpl (const ViewportInteraction::MouseInteraction &)
 The implementation to override in a derived class for OnRightMouseUp.
 
virtual void OnMouseMoveImpl (const ViewportInteraction::MouseInteraction &)
 The implementation to override in a derived class for OnMouseMove.
 
virtual void OnMouseOverImpl (ManipulatorId, const ViewportInteraction::MouseInteraction &)
 The implementation to override in a derived class for OnMouseOver.
 
virtual void OnMouseWheelImpl (const ViewportInteraction::MouseInteraction &)
 The implementation to override in a derived class for OnMouseWheel.
 
virtual void SetBoundsDirtyImpl ()
 The implementation to override in a derived class for SetBoundsDirty.
 
virtual void Draw (const ManipulatorManagerState &managerState, AzFramework::DebugDisplayRequests &debugDisplay, const AzFramework::CameraState &cameraState, const ViewportInteraction::MouseInteraction &mouseInteraction)=0
 Rendering for the manipulator - it is recommended drawing be delegated to a ManipulatorView.
 

Detailed Description

A manipulator to expose where on a line a user is moving their mouse.

Member Function Documentation

◆ Draw()

void AzToolsFramework::LineSegmentSelectionManipulator::Draw ( const ManipulatorManagerState managerState,
AzFramework::DebugDisplayRequests &  debugDisplay,
const AzFramework::CameraState &  cameraState,
const ViewportInteraction::MouseInteraction mouseInteraction 
)
overridevirtual

Rendering for the manipulator - it is recommended drawing be delegated to a ManipulatorView.

Implements AzToolsFramework::BaseManipulator.


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