Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

sglPick Class Template Reference

#include <sglPick.hpp>

Inheritance diagram for sglPick::

sglProbeTemplate sglProbe sglTraverser List of all members.

Public Methods

 sglPick (vector< PickResult *> *result_pool=NULL)
virtual ~sglPick ()
void setPickFrustum (const sglMat4< T > &pick_matrix, const sglFrustum< T > &pick_frustum)
virtual void reset ()
vector<sglNode*>& getPath ()
sglFrustum<T>& getOrigPickFrustum ()
sglFrustum<T>& getPickFrustum ()
void addHit (const sglGeode *geode, const sglDrawable *geometry)
const vector<PickResult*>& getResults () const
template<class S> void pushScale (S scale, S inv_scale, sglFrustum< T > &old_pick_frustum, sglMat4< T > &old_matrix, sglFrustum< T > &old_view_frustum)
template<class S> void pushTranslate (S tx, S ty, S tz, sglFrustum< T > &old_pick_frustum, sglMat4< T > &old_matrix, sglFrustum< T > &old_view_frustum)
template<class S> void pushTransform (const sglMat4< S > &xform, const sglMat4< S > &inv_xform, sglFrustum< T > &old_pick_frustum, sglMat4< T > &old_matrix, sglFrustum< T > &old_view_frustum)
void pop (sglFrustum< T > &old_pick_frustum, sglMat4< T > &old_matrix, sglFrustum< T > &old_view_frustum)

Protected Attributes

sglFrustum<T> m_orig_pick_frustum
sglFrustum<T> m_current_pick_frustum
vector<PickResult*> m_results
vector<PickResult*>* m_result_pool
vector<sglNode*> m_path

Detailed Description

template<class T> class sglPick

used for collecting geometry during the probe traversal

Definition at line 41 of file sglPick.hpp.


Constructor & Destructor Documentation

template<class T>
sglPick<T>::sglPick<T> ( vector< PickResult *> * result_pool = NULL )
 

default constructor.

template<class T>
sglPick<T>::~sglPick<T> ( ) [virtual]
 

destructor.


Member Function Documentation

template<class T>
void sglPick<T>::setPickFrustum ( const sglMat4< T > & pick_matrix,
const sglFrustum< T > & pick_frustum )
 

Initialize the pick traversal by specifying the pick frustum (in local coordinates) and the transform from the 3D origin to the frustum's origin.

Parameters:
pick_matrix   The transformation from 3D origin to frustum's origin
pick_frustum   The pick frustum with axis along the -Z axis.

template<class T>
void sglPick<T>::reset ( ) [virtual]
 

Reset the previous results and internal variables (including the internal path list).

Reimplemented from sglProbeTemplate.

template<class T>
sglFrustum< T > & sglPick<T>::getOrigPickFrustum ( ) [inline]
 

Used internally by the sglBillboard::pick|intersect(..) functions to retrieve the untransformed frustum.

Definition at line 87 of file sglPick.hpp.

template<class T>
void sglPick<T>::addHit ( const sglGeode * geode,
const sglDrawable * geometry )
 

Add a picked geometry to the PickResult vector. This function will internally fill in the transform and path if those modes have been selected.

Parameters:
geode   Pointer to the sglGeode containing the picked geometry.
geometry   Pointer to the sglDrawable whose bounding box was picked.

template<class T>
const vector< PickResult *> & sglPick<T>::getResults ( ) const [inline]
 

Get a reference to the vector of results

Definition at line 102 of file sglPick.hpp.

template<class T>
template<class S>
void sglPick<T>::pushScale ( S scale,
S inv_scale,
sglFrustum< T > & old_pick_frustum,
sglMat4< T > & old_matrix,
sglFrustum< T > & old_view_frustum ) [inline]
 

scale.

Definition at line 107 of file sglPick.hpp.

template<class T>
template<class S>
void sglPick<T>::pushTranslate ( S tx,
S ty,
S tz,
sglFrustum< T > & old_pick_frustum,
sglMat4< T > & old_matrix,
sglFrustum< T > & old_view_frustum ) [inline]
 

translate.

Definition at line 140 of file sglPick.hpp.


The documentation for this class was generated from the following file:
Generated at Mon Jul 1 18:00:09 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001