Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

BoxRep.cxx

Go to the documentation of this file.
00001 // $Header: /nfs/slac/g/glast/ground/cvs/geomrep/src/BoxRep.cxx,v 1.2 2001/01/23 01:40:11 burnett Exp $
00002 //  Author: Toby Burnett
00003 //
00004 // Display of any Hexahedron
00005 
00006 #include "geomrep/BoxRep.h"
00007 
00008 #include "geometry/Hexahedron.h"
00009 
00010 BoxRep::BoxRep(const Shape& shape)
00011     : m_box( dynamic_cast<const Hexahedron& >(shape) )
00012 {};
00013     
00014 
00015 void BoxRep::update()
00016 {
00017     const int lines[]=
00018     {   0,2,3,1,0, 
00019         4,6,7,5,4, -1,
00020         2,6,-1,
00021         3,7,-1,
00022         1,5,-1
00023     };
00024 
00025     for(int i=0; i<8; i++)  {
00026         addVertex(m_box.vertex(i));
00027     }
00028 
00029     indexedLineSet(lines, sizeof(lines)/sizeof(int));
00030 }
00031 
00032 

Generated at Mon Nov 26 18:18:44 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000