CMS 3D CMS Logo

Public Member Functions

DDI::Box Class Reference

#include <Box.h>

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

List of all members.

Public Member Functions

 Box (double xHalf, double yHalf, double zHalf)
void stream (std::ostream &os) const
double volume () const
 ~Box ()

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_.

     : Solid(ddbox)
    { 
      p_.push_back(xHalf);
      p_.push_back(yHalf);
      p_.push_back(zHalf);
    }  
DDI::Box::~Box ( ) [inline]

Definition at line 20 of file Box.h.

{ }

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_.

{
   os << " xhalf[cm]=" << p_[0]/cm
      << " yhalf[cm]=" << p_[1]/cm
      << " zhalf[cm]=" << p_[2]/cm;

}
double DDI::Box::volume ( ) const [inline, virtual]

Reimplemented from DDI::Solid.

Definition at line 22 of file Box.h.

References DDI::Solid::p_.

{ return 8.*p_[0]*p_[1]*p_[2]; }