class MAGES::Interaction::MAGESUIInputModule¶
Overview¶
The MAGES UI Input Module. More…
class MAGESUIInputModule: public BaseInputModule { public: // structs struct RaycastHitData; // classes class UIInteractorData; // methods override void Process(); void RegisterInteractor(IUIInteractor interactor); void DeregisterInteractor(IUIInteractor interactor); int GetPointerIdFromUIInteractor(IUIInteractor interactor); override bool IsPointerOverGameObject(int pointerId); bool TryGetLastRaycastHit(int pointerId, out RaycastHitData hit); };
Detailed Documentation¶
The MAGES UI Input Module.
Methods¶
void RegisterInteractor(IUIInteractor interactor)
Register a iUIInteractor with the input module.
Parameters:
interactor |
The interactor to register. |
void DeregisterInteractor(IUIInteractor interactor)
Removes an IUIInteractor from the input module.
Parameters:
interactor |
The interactor to deregister. |
int GetPointerIdFromUIInteractor(IUIInteractor interactor)
Gets the pointer Id of the given interactor.
Parameters:
interactor |
The interactor. |
Returns:
The pointer Id of the given interactor or -1 if is not registered.
override bool IsPointerOverGameObject(int pointerId)
Gets if a pointer is over a GameObject.
Parameters:
pointerId |
The pointer Id. |
Returns:
true
if the pointer is over a gameobject, else false
if the pointer id does not exist or the pointer is not over a gameobject.
bool TryGetLastRaycastHit(int pointerId, out RaycastHitData hit)
Gets the last raycast hit for the given pointer id.
Parameters:
pointerId |
The pointer id. |
hit |
The last hit. |
Returns:
true
on success.