ROOT  6.06/09
Reference Guide
Public Member Functions | Protected Types | Protected Attributes | Static Protected Attributes | List of all members
TGLSelectBuffer Class Reference

Encapsulates OpenGL select buffer.

Provides sorting of the results based on z-coordinate of the selection hit and can fill the TGLSelectRecordBase records.

Definition at line 25 of file TGLSelectBuffer.h.

Public Member Functions

 TGLSelectBuffer ()
 Constructor. More...
 
virtual ~TGLSelectBuffer ()
 Destructor. More...
 
Int_t GetBufSize () const
 
UInt_tGetBuf () const
 
Int_t GetNRecords () const
 
Bool_t CanGrow ()
 static: return true if current buffer is smaller than the max buffer size More...
 
void Grow ()
 Increase size of the select buffer. More...
 
void ProcessResult (Int_t glResult)
 Process result of GL-selection: sort the hits by their minimum z-coordinate. More...
 
UInt_tRawRecord (Int_t i)
 
Int_t SelectRecord (TGLSelectRecordBase &rec, Int_t i)
 Fill select record rec with data on (sorted) position i. More...
 

Protected Types

typedef std::pair< UInt_t, UInt_t * > RawRecord_t
 
typedef std::vector< RawRecord_tvRawRecord_t
 

Protected Attributes

Int_t fBufSize
 
UInt_tfBuf
 
Int_t fNRecords
 
vRawRecord_t fSortedRecords
 

Static Protected Attributes

static Int_t fgMaxBufSize = 1 << 20
 

#include <TGLSelectBuffer.h>

+ Collaboration diagram for TGLSelectBuffer:

Member Typedef Documentation

typedef std::pair<UInt_t, UInt_t*> TGLSelectBuffer::RawRecord_t
protected

Definition at line 33 of file TGLSelectBuffer.h.

typedef std::vector<RawRecord_t> TGLSelectBuffer::vRawRecord_t
protected

Definition at line 34 of file TGLSelectBuffer.h.

Constructor & Destructor Documentation

TGLSelectBuffer::TGLSelectBuffer ( )

Constructor.

Definition at line 30 of file TGLSelectBuffer.cxx.

TGLSelectBuffer::~TGLSelectBuffer ( )
virtual

Destructor.

Definition at line 40 of file TGLSelectBuffer.cxx.

Member Function Documentation

Bool_t TGLSelectBuffer::CanGrow ( )

static: return true if current buffer is smaller than the max buffer size

Definition at line 48 of file TGLSelectBuffer.cxx.

Referenced by TGLRnrCtx::EndSelection().

UInt_t* TGLSelectBuffer::GetBuf ( ) const
inline

Definition at line 45 of file TGLSelectBuffer.h.

Referenced by TGLRnrCtx::BeginSelection().

Int_t TGLSelectBuffer::GetBufSize ( ) const
inline

Definition at line 44 of file TGLSelectBuffer.h.

Referenced by TGLRnrCtx::BeginSelection(), and TGLRnrCtx::EndSelection().

Int_t TGLSelectBuffer::GetNRecords ( ) const
inline

Definition at line 46 of file TGLSelectBuffer.h.

Referenced by TGLViewerBase::ResolveSelectRecord().

void TGLSelectBuffer::Grow ( )

Increase size of the select buffer.

Definition at line 56 of file TGLSelectBuffer.cxx.

Referenced by TGLRnrCtx::EndSelection().

void TGLSelectBuffer::ProcessResult ( Int_t  glResult)

Process result of GL-selection: sort the hits by their minimum z-coordinate.

Definition at line 67 of file TGLSelectBuffer.cxx.

Referenced by TGLRnrCtx::EndSelection().

UInt_t* TGLSelectBuffer::RawRecord ( Int_t  i)
inline

Definition at line 53 of file TGLSelectBuffer.h.

Referenced by TGLViewer::DoSecondarySelect().

Int_t TGLSelectBuffer::SelectRecord ( TGLSelectRecordBase rec,
Int_t  i 
)

Fill select record rec with data on (sorted) position i.

Returns depth of name-stack for this record.

Definition at line 96 of file TGLSelectBuffer.cxx.

Referenced by TGLViewerBase::FindClosestOverlayRecord(), and TGLViewerBase::ResolveSelectRecord().

Member Data Documentation

UInt_t* TGLSelectBuffer::fBuf
protected

Definition at line 29 of file TGLSelectBuffer.h.

Referenced by GetBuf(), Grow(), ProcessResult(), and ~TGLSelectBuffer().

Int_t TGLSelectBuffer::fBufSize
protected

Definition at line 28 of file TGLSelectBuffer.h.

Referenced by CanGrow(), GetBufSize(), and Grow().

Int_t TGLSelectBuffer::fgMaxBufSize = 1 << 20
staticprotected

Definition at line 38 of file TGLSelectBuffer.h.

Referenced by CanGrow(), and Grow().

Int_t TGLSelectBuffer::fNRecords
protected

Definition at line 31 of file TGLSelectBuffer.h.

Referenced by GetNRecords(), and ProcessResult().

vRawRecord_t TGLSelectBuffer::fSortedRecords
protected

Definition at line 36 of file TGLSelectBuffer.h.

Referenced by ProcessResult(), and SelectRecord().


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