PixelLightAPI  .
Public Member Functions
PLEngine::PickingResult Class Reference

Class receiving the scene picking result and offering further functionality. More...

#include <PickingResult.h>

List of all members.

Public Member Functions

PL_API PickingResult ()
 Constructor.
PL_API ~PickingResult ()
 Destructor.
PL_API PLScene::SceneNodeGetSceneNode () const
 Returns the picked scene node.
PL_API PLCore::uint32 GetGeometry () const
 Returns the picked geometry.
PL_API PLCore::uint32 GetTriangle () const
 Returns the picked triangle.
PL_API const PLMath::Vector3GetPoint () const
 Returns the picked point in node space.
PL_API PLScene::SceneContainerGetSceneContainer () const
 Returns the scene container the picking line and distance is in.
PL_API const PLMath::Vector3GetLineStartPos () const
 Returns the picking line start position.
PL_API float GetNearestSquaredDistance () const
 Returns the nearest squared distance to the line start position.
PL_API bool GetTextureCoordinate (PLMath::Vector2 &vTexCoord, PLCore::uint32 nTexCoordChannel=0) const
 Returns the currently picked texture coordinate (can also be outside the 0..1 interval)
PL_API bool GetWrappedTextureCoordinate (PLMath::Vector2 &vTexCoord, PLCore::uint32 nTexCoordChannel=0) const
 Returns the currently picked wrapped texture coordinate (always between 0..1)

Detailed Description

Class receiving the scene picking result and offering further functionality.


Constructor & Destructor Documentation

Constructor.

Destructor.


Member Function Documentation

Returns the picked scene node.

Returns:
The picked scene node, a null pointer on error
PL_API PLCore::uint32 PLEngine::PickingResult::GetGeometry ( ) const

Returns the picked geometry.

Returns:
The picked geometry (if there's one)
PL_API PLCore::uint32 PLEngine::PickingResult::GetTriangle ( ) const

Returns the picked triangle.

Returns:
The picked triangle (if there's one)

Returns the picked point in node space.

Returns:
The picked point in node space (if there's one)

Returns the scene container the picking line and distance is in.

Returns:
The scene container the picking line and distance is in, a null pointer on error (in this case result is scene node space)

Returns the picking line start position.

Returns:
The picking line start position
See also:

Returns the nearest squared distance to the line start position.

Returns:
The nearest squared distance to the line start position
See also:
Note:
  • Use for example 'Math::Sqrt(cMyPicking.GetNearestSquaredDistance())' to get the actual nearest distance if you really need it
PL_API bool PLEngine::PickingResult::GetTextureCoordinate ( PLMath::Vector2 vTexCoord,
PLCore::uint32  nTexCoordChannel = 0 
) const

Returns the currently picked texture coordinate (can also be outside the 0..1 interval)

Parameters:
[out]vTexCoordReceives the picked texture coordinate if all went fine
[in]nTexCoordChannelTexture coordinate channel to use
Returns:
'true' if all went fine, else 'false'
PL_API bool PLEngine::PickingResult::GetWrappedTextureCoordinate ( PLMath::Vector2 vTexCoord,
PLCore::uint32  nTexCoordChannel = 0 
) const

Returns the currently picked wrapped texture coordinate (always between 0..1)

Parameters:
[out]vTexCoordReceives the picked wrapped texture coordinate if all went fine
[in]nTexCoordChannelTexture coordinate channel to use
Returns:
'true' if all went fine, else 'false'

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