PixelLightAPI  .
Public Member Functions | Protected Member Functions
PLEngine::Picking Class Reference

Class offering scene picking (some also call it 'trace line') functionality. More...

#include <Picking.h>

Inheritance diagram for PLEngine::Picking:
Inheritance graph
[legend]

List of all members.

Public Member Functions

PL_API Picking ()
 Constructor.
virtual PL_API ~Picking ()
 Destructor.
PL_API bool PerformPicking (PickingResult &cPickingResult, PLScene::SceneContainer &cContainer, const PLMath::Vector3 &vLineStartPos, const PLMath::Vector3 &vLineEndPos, PLRenderer::Cull::Enum nCull=PLRenderer::Cull::CCW)
 Performs picking by using the given line start and end positions.
PL_API bool PerformPicking (PickingResult &cPickingResult, PLScene::SceneNode &cSceneNode, const PLMath::Vector3 &vLineStartPos, const PLMath::Vector3 &vLineEndPos, PLCore::Array< PLCore::uint32 > *plstGeometries=nullptr, PLRenderer::Cull::Enum nCull=PLRenderer::Cull::CCW)
 Performs picking using the mesh of the given scene node by using the given line start and end positions.

Protected Member Functions

virtual PL_API bool OnPickingCandidate (PLScene::SceneNode &cSceneNode)
 Function that is called when a picking candidate has been found ("picking filter function")

Detailed Description

Class offering scene picking (some also call it 'trace line') functionality.


Constructor & Destructor Documentation

Constructor.

virtual PL_API PLEngine::Picking::~Picking ( ) [virtual]

Destructor.


Member Function Documentation

PL_API bool PLEngine::Picking::PerformPicking ( PickingResult cPickingResult,
PLScene::SceneContainer cContainer,
const PLMath::Vector3 vLineStartPos,
const PLMath::Vector3 vLineEndPos,
PLRenderer::Cull::Enum  nCull = PLRenderer::Cull::CCW 
)

Performs picking by using the given line start and end positions.

Parameters:
[out]cPickingResultReceives the picking result if all went fine
[in]cContainerScene container we're performing the picking in
[in]vLineStartPosPicking line start position within the given scene container
[in]vLineEndPosPicking line end position within the given scene container
[in]nCullCull mode (see "PLRenderer::Cull")
Returns:
'true' if anything has been picked, else 'false'
PL_API bool PLEngine::Picking::PerformPicking ( PickingResult cPickingResult,
PLScene::SceneNode cSceneNode,
const PLMath::Vector3 vLineStartPos,
const PLMath::Vector3 vLineEndPos,
PLCore::Array< PLCore::uint32 > *  plstGeometries = nullptr,
PLRenderer::Cull::Enum  nCull = PLRenderer::Cull::CCW 
)

Performs picking using the mesh of the given scene node by using the given line start and end positions.

Parameters:
[out]cPickingResultReceives the picking result if all went fine
[in]cSceneNodeScene node we're performing the mesh picking in
[in]vLineStartPosPicking line start position within the given scene node
[in]vLineEndPosPicking line end position within the given scene node
[in]plstGeometriesList of mesh geometry indices to use, if a null pointer all mesh geometries are used
[in]nCullCull mode (see "PLRenderer::Cull")
Returns:
'true' if anything has been picked, else 'false'
virtual PL_API bool PLEngine::Picking::OnPickingCandidate ( PLScene::SceneNode cSceneNode) [protected, virtual]

Function that is called when a picking candidate has been found ("picking filter function")

Parameters:
[in]cSceneNodeScene node candidate
Returns:
'true' to take this candidate into account, else 'false' to throw it away (no further processing of the scene node)
Note:
  • The default implementation is empty

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


PixelLight PixelLight 0.9.11-R1
Copyright (C) 2002-2012 by The PixelLight Team
Last modified Thu Feb 23 2012 14:09:30
The content of this PixelLight document is published under the
Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported