Geant4  10.03.p03
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
SoBox.h
Go to the documentation of this file.
1 //
2 // ********************************************************************
3 // * License and Disclaimer *
4 // * *
5 // * The Geant4 software is copyright of the Copyright Holders of *
6 // * the Geant4 Collaboration. It is provided under the terms and *
7 // * conditions of the Geant4 Software License, included in the file *
8 // * LICENSE and available at http://cern.ch/geant4/license . These *
9 // * include a list of copyright holders. *
10 // * *
11 // * Neither the authors of this software system, nor their employing *
12 // * institutes,nor the agencies providing financial support for this *
13 // * work make any representation or warranty, express or implied, *
14 // * regarding this software system or assume any liability for its *
15 // * use. Please see the license in the file LICENSE and URL above *
16 // * for the full disclaimer and the limitation of liability. *
17 // * *
18 // * This code implementation is the result of the scientific and *
19 // * technical work of the GEANT4 collaboration. *
20 // * By using, copying, modifying or distributing the software (or *
21 // * any work based on the software) you agree to acknowledge its *
22 // * use in resulting scientific publications, and indicate your *
23 // * acceptance of all terms of the Geant4 Software license. *
24 // ********************************************************************
25 //
26 //
27 // $Id: SoBox.h 66373 2012-12-18 09:41:34Z gcosmo $
28 //
29 /*-----------------------------Hepvis----------------------------------------*/
30 /* */
31 /* Node: SoBox */
32 /* Description: Represents the G4Box Geant Geometry entity */
33 /* Author: Joe Boudreau Nov 11 1996 */
34 /* */
35 /*---------------------------------------------------------------------------*/
36 #ifndef HEPVis_SoBox_h
37 #define HEPVis_SoBox_h
38 
39 #include <Inventor/fields/SoSFFloat.h>
40 #include <Inventor/fields/SoSFNode.h>
41 #include <Inventor/nodes/SoShape.h>
42 
43 class SoSFNode;
44 
46 
62 #define SoBox Geant4_SoBox
63 
64 class SoBox:public SoShape {
65 
66  // The following is required:
67  SO_NODE_HEADER(SoBox);
68 
69 public:
70 
71  //
73  //
74  SoSFFloat fDx;
75  //
77  //
78  SoSFFloat fDy;
79  //
81  //
82  SoSFFloat fDz;
83  //
85  //
86  SoSFNode alternateRep;
87 
88  //
90  //
91  SoBox();
92 
93  //
95  //
96  static void initClass();
97 
98  //
104  //
105  virtual void generateAlternateRep();
106 
107  //
109  //
110  virtual void clearAlternateRep();
111 
112 protected:
113 
114  //
116  //
117  virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center );
118 
119  //
121  //
122  virtual void generatePrimitives(SoAction *action);
123 
124  //
126  //
127  virtual SoChildList *getChildren() const;
128 
129 
130 protected:
131  //
133  //
134  virtual ~SoBox();
135 
136 private:
137 
138  //
141  //
142  void generateChildren();
143 
144  //
147  //
148  void updateChildren();
149 
150  //
152  //
153  SoChildList *children;
154 
155 };
156 
157 #endif
virtual SoChildList * getChildren() const
GetChildList, required whenever the class has hidden children.
SoBox()
Constructor, required.
Definition: SoBox.h:64
virtual void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center)
compute bounding Box, required
SoSFFloat fDy
Half-length along Y.
Definition: SoBox.h:78
static void initClass()
Class Initializer, required.
virtual void generateAlternateRep()
SoSFNode alternateRep
Alternate rep - for use by users without HEPVis shared objects.
Definition: SoBox.h:86
virtual void generatePrimitives(SoAction *action)
Generate Primitives, required.
SoSFFloat fDz
Half-length along Z.
Definition: SoBox.h:82
virtual ~SoBox()
Destructor, required.
virtual void clearAlternateRep()
We better be able to clear it, too!
SoSFFloat fDx
Half-length along X.
Definition: SoBox.h:74