#include "TGLSelectRecord.h"
#include <TObject.h>
#include <string.h>
ClassImp(TGLSelectRecordBase)
TGLSelectRecordBase::TGLSelectRecordBase() :
fN (0),
fItems (0),
fMinZ (0),
fMaxZ (0),
fPos (0)
{
}
TGLSelectRecordBase::TGLSelectRecordBase(UInt_t* data) :
fN (data[0]),
fItems (0),
fMinZ ((Float_t)data[1] / 0x7fffffff),
fMaxZ ((Float_t)data[2] / 0x7fffffff),
fPos (0)
{
CopyItems(&data[3]);
}
TGLSelectRecordBase::TGLSelectRecordBase(const TGLSelectRecordBase& rec) :
fN (rec.fN),
fItems (0),
fMinZ (rec.fMinZ),
fMaxZ (rec.fMaxZ),
fPos (rec.fPos)
{
CopyItems(rec.fItems);
}
TGLSelectRecordBase::~TGLSelectRecordBase()
{
delete [] fItems;
}
TGLSelectRecordBase& TGLSelectRecordBase::operator=(const TGLSelectRecordBase& rec)
{
if (this != &rec)
{
fN = rec.fN;
fMinZ = rec.fMinZ;
fMaxZ = rec.fMaxZ;
fPos = rec.fPos;
CopyItems(rec.fItems);
}
return *this;
}
void TGLSelectRecordBase::CopyItems(UInt_t* items)
{
delete [] fItems;
if (fN > 0) {
fItems = new UInt_t[fN];
memcpy(fItems, items, fN*sizeof(UInt_t));
} else {
fItems = 0;
}
}
void TGLSelectRecordBase::SetRawOnly(UInt_t* data)
{
fN = data[0];
fMinZ = (Float_t)data[1] / 0x7fffffff;
fMaxZ = (Float_t)data[2] / 0x7fffffff;
CopyItems(&data[3]);
}
void TGLSelectRecordBase::Set(UInt_t* data)
{
fN = data[0];
fMinZ = (Float_t)data[1] / 0x7fffffff;
fMaxZ = (Float_t)data[2] / 0x7fffffff;
fPos = 0;
CopyItems(&data[3]);
}
void TGLSelectRecordBase::Reset()
{
delete [] fItems;
fN = 0;
fItems = 0;
fMinZ = 0;
fMaxZ = 0;
fPos = 0;
}
ClassImp(TGLSelectRecord)
TGLSelectRecord::TGLSelectRecord() :
TGLSelectRecordBase(),
fTransparent (kFALSE),
fSceneInfo (0),
fPhysShape (0),
fObject (0),
fSpecific (0)
{
}
TGLSelectRecord::TGLSelectRecord(UInt_t* data) :
TGLSelectRecordBase(data),
fTransparent (kFALSE),
fSceneInfo (0),
fPhysShape (0),
fObject (0),
fSpecific (0)
{
}
TGLSelectRecord::TGLSelectRecord(const TGLSelectRecord& rec) :
TGLSelectRecordBase(rec),
fTransparent (rec.fTransparent),
fSceneInfo (rec.fSceneInfo),
fPhysShape (rec.fPhysShape),
fObject (rec.fObject),
fSpecific (rec.fSpecific)
{
}
TGLSelectRecord::~TGLSelectRecord()
{
}
TGLSelectRecord& TGLSelectRecord::operator=(const TGLSelectRecord& rec)
{
if (this != &rec)
{
TGLSelectRecordBase::operator=(rec);
fTransparent = rec.fTransparent;
fSceneInfo = rec.fSceneInfo;
fPhysShape = rec.fPhysShape;
fObject = rec.fObject;
fSpecific = rec.fSpecific;
}
return *this;
}
void TGLSelectRecord::Set(UInt_t* data)
{
TGLSelectRecordBase::Set(data);
fTransparent = kFALSE;
fSceneInfo = 0;
fPhysShape = 0;
fObject = 0;
fSpecific = 0;
}
void TGLSelectRecord::Reset()
{
TGLSelectRecordBase::Reset();
fTransparent = kFALSE;
fSceneInfo = 0;
fPhysShape = 0;
fObject = 0;
fSpecific = 0;
}
void TGLSelectRecord::Print()
{
printf("SelectRecord N=%d, miZ=%.4f, maxZ=%.4f\n"
" sceneinfo=%p, pshp=%p, transp=%d,\n"
" tobj=%p (name='%s'), spec=%p\n",
fN, fMinZ, fMaxZ,
fSceneInfo, fPhysShape, fTransparent,
fObject, fObject ? fObject->GetName() : "",
fSpecific);
}
Bool_t TGLSelectRecord::AreSameSelectionWise(const TGLSelectRecord& r1,
const TGLSelectRecord& r2)
{
return r1.fSceneInfo == r2.fSceneInfo && r1.fPhysShape == r2.fPhysShape &&
r1.fObject == r2.fObject && r1.fSpecific == r2.fSpecific;
}
ClassImp(TGLOvlSelectRecord)
TGLOvlSelectRecord::TGLOvlSelectRecord() :
TGLSelectRecordBase(),
fOvlElement (0)
{
}
TGLOvlSelectRecord::TGLOvlSelectRecord(UInt_t* data) :
TGLSelectRecordBase(data),
fOvlElement (0)
{
}
TGLOvlSelectRecord::TGLOvlSelectRecord(const TGLOvlSelectRecord& rec) :
TGLSelectRecordBase(rec),
fOvlElement (rec.fOvlElement)
{
}
TGLOvlSelectRecord::~TGLOvlSelectRecord()
{
}
TGLOvlSelectRecord& TGLOvlSelectRecord::operator=(const TGLOvlSelectRecord& rec)
{
if (this != &rec)
{
TGLSelectRecordBase::operator=(rec);
fOvlElement = rec.fOvlElement;
}
return *this;
}
void TGLOvlSelectRecord::Set(UInt_t* data)
{
TGLSelectRecordBase::Set(data);
fOvlElement = 0;
}
void TGLOvlSelectRecord::Reset()
{
TGLSelectRecordBase::Reset();
fOvlElement = 0;
}
Last change: Wed Jun 25 08:41:22 2008
Last generated: 2008-06-25 08:41
This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.