CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions
DDI::Box Class Reference

#include <Box.h>

Inheritance diagram for DDI::Box:
DDI::Solid

Public Member Functions

 Box (double xHalf, double yHalf, double zHalf)
 
void stream (std::ostream &os) const
 
double volume () const
 
 ~Box ()
 
- Public Member Functions inherited from DDI::Solid
const std::vector< double > & parameters () const
 
void setParameters (std::vector< double > const &p)
 
DDSolidShape shape () const
 
 Solid ()
 
 Solid (DDSolidShape shape)
 
virtual ~Solid ()
 

Additional Inherited Members

- Protected Attributes inherited from DDI::Solid
std::vector< double > p_
 
DDSolidShape shape_
 

Detailed Description

Definition at line 10 of file Box.h.

Constructor & Destructor Documentation

DDI::Box::Box ( double  xHalf,
double  yHalf,
double  zHalf 
)
inline

Definition at line 13 of file Box.h.

References DDI::Solid::p_.

14  : Solid(ddbox)
15  {
16  p_.push_back(xHalf);
17  p_.push_back(yHalf);
18  p_.push_back(zHalf);
19  }
Solid()
Definition: Solid.h:14
std::vector< double > p_
Definition: Solid.h:32
DDI::Box::~Box ( )
inline

Definition at line 20 of file Box.h.

20 { }

Member Function Documentation

void DDI::Box::stream ( std::ostream &  os) const
virtual

Reimplemented from DDI::Solid.

Definition at line 5 of file Box.cc.

References DDI::Solid::p_.

6 {
7  os << " xhalf[cm]=" << p_[0]/cm
8  << " yhalf[cm]=" << p_[1]/cm
9  << " zhalf[cm]=" << p_[2]/cm;
10 
11 }
std::vector< double > p_
Definition: Solid.h:32
double DDI::Box::volume ( void  ) const
inlinevirtual

Reimplemented from DDI::Solid.

Definition at line 22 of file Box.h.

References DDI::Solid::p_.

22 { return 8.*p_[0]*p_[1]*p_[2]; }
std::vector< double > p_
Definition: Solid.h:32