PixelLightAPI
.
|
Class offering scene picking functionality by using the mouse. More...
#include <MousePicking.h>
Public Member Functions | |
PL_API | MousePicking (PLCore::Frontend &cFrontend, PLScene::SNCamera *pCamera=nullptr) |
Constructor. | |
virtual PL_API | ~MousePicking () |
Destructor. | |
PL_API PLCore::Frontend & | GetFrontend () const |
Returns the frontend instance used to determine the mouse position. | |
PL_API PLScene::SNCamera * | GetCamera () const |
Returns the camera to perform the picking with. | |
PL_API void | SetCamera (PLScene::SNCamera *pCamera) |
Sets the camera to perform the picking with. | |
PL_API bool | PerformMousePicking (PickingResult &cPickingResult, float fMaxDistance=-1.0f, PLRenderer::Cull::Enum nCull=PLRenderer::Cull::CCW) |
Performs picking by using the current camera and current mouse position within the widget. | |
PL_API bool | PerformMousePicking (PickingResult &cPickingResult, const PLMath::Vector2i &vMousePos, float fMaxDistance=-1.0f, PLRenderer::Cull::Enum nCull=PLRenderer::Cull::CCW) |
Performs picking by using the current camera and the given mouse position. |
Class offering scene picking functionality by using the mouse.
PL_API PLEngine::MousePicking::MousePicking | ( | PLCore::Frontend & | cFrontend, |
PLScene::SNCamera * | pCamera = nullptr |
||
) |
Constructor.
[in] | cFrontend | Frontend instance used to determine the mouse position |
[in] | pCamera | Camera to perform the picking with, if a null pointer no picking is possible |
virtual PL_API PLEngine::MousePicking::~MousePicking | ( | ) | [virtual] |
Destructor.
PL_API PLCore::Frontend& PLEngine::MousePicking::GetFrontend | ( | ) | const |
Returns the frontend instance used to determine the mouse position.
PL_API PLScene::SNCamera* PLEngine::MousePicking::GetCamera | ( | ) | const |
Returns the camera to perform the picking with.
PL_API void PLEngine::MousePicking::SetCamera | ( | PLScene::SNCamera * | pCamera | ) |
Sets the camera to perform the picking with.
[in] | pCamera | The camera to perform the picking with, if a null pointer no picking is possible |
PL_API bool PLEngine::MousePicking::PerformMousePicking | ( | PickingResult & | cPickingResult, |
float | fMaxDistance = -1.0f , |
||
PLRenderer::Cull::Enum | nCull = PLRenderer::Cull::CCW |
||
) |
Performs picking by using the current camera and current mouse position within the widget.
[out] | cPickingResult | Receives the picking result if all went fine |
[in] | fMaxDistance | Maximum picking distance, if negative there's no maximum picking distance (in the same scene container the camera is in) |
[in] | nCull | Cull mode (see "PLRenderer::Cull") |
PL_API bool PLEngine::MousePicking::PerformMousePicking | ( | PickingResult & | cPickingResult, |
const PLMath::Vector2i & | vMousePos, | ||
float | fMaxDistance = -1.0f , |
||
PLRenderer::Cull::Enum | nCull = PLRenderer::Cull::CCW |
||
) |
Performs picking by using the current camera and the given mouse position.
[out] | cPickingResult | Receives the picking result if all went fine |
[in] | vMousePos | Position of the mouse inside the widget the picking takes place |
[in] | fMaxDistance | Maximum picking distance, if negative there's no maximum picking distance (in the same scene container the camera is in) |
[in] | nCull | Cull mode (see "PLRenderer::Cull") |
|