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 26 of file TGLSelectBuffer.h.
Public Member Functions | |
TGLSelectBuffer () | |
Constructor. | |
virtual | ~TGLSelectBuffer () |
Destructor. | |
Bool_t | CanGrow () |
static: return true if current buffer is smaller than the max buffer size | |
UInt_t * | GetBuf () const |
Int_t | GetBufSize () const |
Int_t | GetNRecords () const |
void | Grow () |
Increase size of the select buffer. | |
void | ProcessResult (Int_t glResult) |
Process result of GL-selection: sort the hits by their minimum z-coordinate. | |
UInt_t * | RawRecord (Int_t i) |
Int_t | SelectRecord (TGLSelectRecordBase &rec, Int_t i) |
Fill select record rec with data on (sorted) position i. | |
Protected Types | |
typedef std::pair< UInt_t, UInt_t * > | RawRecord_t |
typedef std::vector< RawRecord_t > | vRawRecord_t |
Protected Attributes | |
UInt_t * | fBuf |
Int_t | fBufSize |
Int_t | fNRecords |
vRawRecord_t | fSortedRecords |
Static Protected Attributes | |
static Int_t | fgMaxBufSize = 1 << 20 |
#include <TGLSelectBuffer.h>
|
protected |
Definition at line 34 of file TGLSelectBuffer.h.
|
protected |
Definition at line 35 of file TGLSelectBuffer.h.
TGLSelectBuffer::TGLSelectBuffer | ( | ) |
Constructor.
Definition at line 30 of file TGLSelectBuffer.cxx.
|
virtual |
Destructor.
Definition at line 40 of file TGLSelectBuffer.cxx.
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.
|
inline |
Definition at line 46 of file TGLSelectBuffer.h.
|
inline |
Definition at line 45 of file TGLSelectBuffer.h.
|
inline |
Definition at line 47 of file TGLSelectBuffer.h.
void TGLSelectBuffer::Grow | ( | ) |
Increase size of the select buffer.
Definition at line 56 of file TGLSelectBuffer.cxx.
Process result of GL-selection: sort the hits by their minimum z-coordinate.
Definition at line 67 of file TGLSelectBuffer.cxx.
Definition at line 54 of file TGLSelectBuffer.h.
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.
|
protected |
Definition at line 30 of file TGLSelectBuffer.h.
|
protected |
Definition at line 29 of file TGLSelectBuffer.h.
|
staticprotected |
Definition at line 39 of file TGLSelectBuffer.h.
|
protected |
Definition at line 32 of file TGLSelectBuffer.h.
|
protected |
Definition at line 37 of file TGLSelectBuffer.h.