ROOT logo
// @(#)root/eve:$Id: TEveBoxGL.h 36867 2010-11-23 10:06:35Z matevz $
// Author: Matevz Tadel, 2010

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TEveBoxGL
#define ROOT_TEveBoxGL

#include "TGLObject.h"

class TGLViewer;
class TGLScene;

class TEveBox;
class TEveBoxProjected;

//------------------------------------------------------------------------------
// TEveBoxGL
//------------------------------------------------------------------------------

class TEveBoxGL : public TGLObject
{
private:
   TEveBoxGL(const TEveBoxGL&);            // Not implemented
   TEveBoxGL& operator=(const TEveBoxGL&); // Not implemented

protected:
   TEveBox             *fM;  // Model object.

   void RenderOutline    (const Float_t p[8][3]) const;
   void RenderBoxStdNorm (const Float_t p[8][3]) const;
   void RenderBoxAutoNorm(const Float_t p[8][3]) const;

public:
   TEveBoxGL();
   virtual ~TEveBoxGL() {}

   virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
   virtual void   SetBBox();

   virtual void Draw(TGLRnrCtx& rnrCtx) const;
   virtual void DirectDraw(TGLRnrCtx& rnrCtx) const;

   virtual Bool_t IgnoreSizeForOfInterest() const { return kTRUE; }

   // To support two-level selection
   // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
   // virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);

   ClassDef(TEveBoxGL, 0); // GL renderer class for TEveBox.
};


//------------------------------------------------------------------------------
// TEveBoxProjectedGL
//------------------------------------------------------------------------------

class TEveBoxProjectedGL : public TGLObject
{
private:
   TEveBoxProjectedGL(const TEveBoxProjectedGL&);            // Not implemented
   TEveBoxProjectedGL& operator=(const TEveBoxProjectedGL&); // Not implemented

protected:
   TEveBoxProjected             *fM;  // Model object.

   void RenderPoints(Int_t mode) const;

public:
   TEveBoxProjectedGL();
   virtual ~TEveBoxProjectedGL() {}

   virtual Bool_t SetModel(TObject* obj, const Option_t* opt=0);
   virtual void   SetBBox();

   virtual void Draw(TGLRnrCtx& rnrCtx) const;
   virtual void DirectDraw(TGLRnrCtx& rnrCtx) const;

   virtual Bool_t IgnoreSizeForOfInterest() const { return kTRUE; }

   // To support two-level selection
   // virtual Bool_t SupportsSecondarySelect() const { return kTRUE; }
   // virtual void ProcessSelection(TGLRnrCtx & rnrCtx, TGLSelectRecord & rec);

   ClassDef(TEveBoxProjectedGL, 0); // GL renderer class for TEveBoxProjected.
};

#endif
 TEveBoxGL.h:1
 TEveBoxGL.h:2
 TEveBoxGL.h:3
 TEveBoxGL.h:4
 TEveBoxGL.h:5
 TEveBoxGL.h:6
 TEveBoxGL.h:7
 TEveBoxGL.h:8
 TEveBoxGL.h:9
 TEveBoxGL.h:10
 TEveBoxGL.h:11
 TEveBoxGL.h:12
 TEveBoxGL.h:13
 TEveBoxGL.h:14
 TEveBoxGL.h:15
 TEveBoxGL.h:16
 TEveBoxGL.h:17
 TEveBoxGL.h:18
 TEveBoxGL.h:19
 TEveBoxGL.h:20
 TEveBoxGL.h:21
 TEveBoxGL.h:22
 TEveBoxGL.h:23
 TEveBoxGL.h:24
 TEveBoxGL.h:25
 TEveBoxGL.h:26
 TEveBoxGL.h:27
 TEveBoxGL.h:28
 TEveBoxGL.h:29
 TEveBoxGL.h:30
 TEveBoxGL.h:31
 TEveBoxGL.h:32
 TEveBoxGL.h:33
 TEveBoxGL.h:34
 TEveBoxGL.h:35
 TEveBoxGL.h:36
 TEveBoxGL.h:37
 TEveBoxGL.h:38
 TEveBoxGL.h:39
 TEveBoxGL.h:40
 TEveBoxGL.h:41
 TEveBoxGL.h:42
 TEveBoxGL.h:43
 TEveBoxGL.h:44
 TEveBoxGL.h:45
 TEveBoxGL.h:46
 TEveBoxGL.h:47
 TEveBoxGL.h:48
 TEveBoxGL.h:49
 TEveBoxGL.h:50
 TEveBoxGL.h:51
 TEveBoxGL.h:52
 TEveBoxGL.h:53
 TEveBoxGL.h:54
 TEveBoxGL.h:55
 TEveBoxGL.h:56
 TEveBoxGL.h:57
 TEveBoxGL.h:58
 TEveBoxGL.h:59
 TEveBoxGL.h:60
 TEveBoxGL.h:61
 TEveBoxGL.h:62
 TEveBoxGL.h:63
 TEveBoxGL.h:64
 TEveBoxGL.h:65
 TEveBoxGL.h:66
 TEveBoxGL.h:67
 TEveBoxGL.h:68
 TEveBoxGL.h:69
 TEveBoxGL.h:70
 TEveBoxGL.h:71
 TEveBoxGL.h:72
 TEveBoxGL.h:73
 TEveBoxGL.h:74
 TEveBoxGL.h:75
 TEveBoxGL.h:76
 TEveBoxGL.h:77
 TEveBoxGL.h:78
 TEveBoxGL.h:79
 TEveBoxGL.h:80
 TEveBoxGL.h:81
 TEveBoxGL.h:82
 TEveBoxGL.h:83
 TEveBoxGL.h:84
 TEveBoxGL.h:85
 TEveBoxGL.h:86
 TEveBoxGL.h:87
 TEveBoxGL.h:88
 TEveBoxGL.h:89
 TEveBoxGL.h:90
 TEveBoxGL.h:91
 TEveBoxGL.h:92
 TEveBoxGL.h:93
 TEveBoxGL.h:94