ROOT logo
// $Id: TGeoShapeExtract.cxx 2088 2008-11-23 20:26:46Z matevz $

// Copyright (C) 1999-2008, Matevz Tadel. All rights reserved.
// This file is part of GLED, released under GNU General Public License version 2.
// For the licensing terms see $GLEDSYS/LICENSE or http://www.gnu.org/.

//__________________________________________________________________________
// TGeoShapeExtract
//
// Vessel to carry hand-picked geometry from gled to reve.
// This class exists in both frameworks.

#include "TGeoShapeExtract.h"

#include <TList.h>
#include <TGeoShape.h>

ClassImp(TGeoShapeExtract);

/**************************************************************************/

TGeoShapeExtract::TGeoShapeExtract(const Text_t* n, const Text_t* t) :
  TNamed(n,t),
  mRnrSelf     (true),
  mRnrElements (true),
  mShape       (0),
  mElements    (0)
{
  memset(mTrans, 0, sizeof(mTrans));
  mTrans[0] = mTrans[5] = mTrans[10] = mTrans[15] = 1;
  mRGBA [0] = mRGBA [1] = mRGBA [2]  = mRGBA [3]  = 1;
}

TGeoShapeExtract::~TGeoShapeExtract()
{
  delete mShape;
  delete mElements;
}

/**************************************************************************/

Bool_t TGeoShapeExtract::HasElements()
{
  return mElements != 0 && mElements->GetSize() > 0;
}

void TGeoShapeExtract::AddElement(TGeoShapeExtract* gse)
{
  if (mElements == 0)
    mElements = new TList;

  mElements->Add(gse);
}

/**************************************************************************/

void TGeoShapeExtract::SetTrans(const Double_t arr[16])
{
  for(Int_t i=0; i<16; ++i)
    mTrans[i] = arr[i];
}

void TGeoShapeExtract::SetRGBA (const Float_t  arr[4])
{
  for(Int_t i=0; i<4; ++i)
    mRGBA[i] = arr[i];
}
 TGeoShapeExtract.cxx:1
 TGeoShapeExtract.cxx:2
 TGeoShapeExtract.cxx:3
 TGeoShapeExtract.cxx:4
 TGeoShapeExtract.cxx:5
 TGeoShapeExtract.cxx:6
 TGeoShapeExtract.cxx:7
 TGeoShapeExtract.cxx:8
 TGeoShapeExtract.cxx:9
 TGeoShapeExtract.cxx:10
 TGeoShapeExtract.cxx:11
 TGeoShapeExtract.cxx:12
 TGeoShapeExtract.cxx:13
 TGeoShapeExtract.cxx:14
 TGeoShapeExtract.cxx:15
 TGeoShapeExtract.cxx:16
 TGeoShapeExtract.cxx:17
 TGeoShapeExtract.cxx:18
 TGeoShapeExtract.cxx:19
 TGeoShapeExtract.cxx:20
 TGeoShapeExtract.cxx:21
 TGeoShapeExtract.cxx:22
 TGeoShapeExtract.cxx:23
 TGeoShapeExtract.cxx:24
 TGeoShapeExtract.cxx:25
 TGeoShapeExtract.cxx:26
 TGeoShapeExtract.cxx:27
 TGeoShapeExtract.cxx:28
 TGeoShapeExtract.cxx:29
 TGeoShapeExtract.cxx:30
 TGeoShapeExtract.cxx:31
 TGeoShapeExtract.cxx:32
 TGeoShapeExtract.cxx:33
 TGeoShapeExtract.cxx:34
 TGeoShapeExtract.cxx:35
 TGeoShapeExtract.cxx:36
 TGeoShapeExtract.cxx:37
 TGeoShapeExtract.cxx:38
 TGeoShapeExtract.cxx:39
 TGeoShapeExtract.cxx:40
 TGeoShapeExtract.cxx:41
 TGeoShapeExtract.cxx:42
 TGeoShapeExtract.cxx:43
 TGeoShapeExtract.cxx:44
 TGeoShapeExtract.cxx:45
 TGeoShapeExtract.cxx:46
 TGeoShapeExtract.cxx:47
 TGeoShapeExtract.cxx:48
 TGeoShapeExtract.cxx:49
 TGeoShapeExtract.cxx:50
 TGeoShapeExtract.cxx:51
 TGeoShapeExtract.cxx:52
 TGeoShapeExtract.cxx:53
 TGeoShapeExtract.cxx:54
 TGeoShapeExtract.cxx:55
 TGeoShapeExtract.cxx:56
 TGeoShapeExtract.cxx:57
 TGeoShapeExtract.cxx:58
 TGeoShapeExtract.cxx:59
 TGeoShapeExtract.cxx:60
 TGeoShapeExtract.cxx:61
 TGeoShapeExtract.cxx:62
 TGeoShapeExtract.cxx:63
 TGeoShapeExtract.cxx:64
 TGeoShapeExtract.cxx:65
 TGeoShapeExtract.cxx:66
 TGeoShapeExtract.cxx:67