Physsim::Box Class Reference

Represents a solid box centered at the origin (by default). More...

#include <Box.h>

Inheritance diagram for Physsim::Box:

Physsim::Primitive Physsim::Base List of all members.

Public Member Functions

 Box ()
 Constructs a unit cube centered at the origin.
 Box (Real xlen, Real ylen, Real zlen)
 Constructs a cube of the specified size.
 Box (Real xlen, Real ylen, Real zlen, const Matrix4 &T)
 Constructs a cube of the specified size transformed by the given matrix.
 Box (const Matrix4 &T)
 Constructs a unit cube transformed by the given matrix.
virtual Vector3 calc_com () const
void set_size (Real xlen, Real ylen, Real zlen)
 Sets the size of this box.
virtual void load_from_xml (XMLTreeConstPtr node, std::map< std::string, BasePtr > &id_map)
 Implements Base::load_from_xml() for serialization.
virtual void save_to_xml (XMLTreePtr node, std::list< BaseConstPtr > &shared_objects) const
 Implements Base::save_to_xml() for serialization.
virtual Real calc_mass ()
 Gets the mass for this box, computing it if necessary.
virtual Matrix3 calc_inertia ()
 Gets the inertia matrix for this box with current transform applied.
virtual SoNode * create_visualization ()
 Creates the visualization for this primitive.

Detailed Description

Represents a solid box centered at the origin (by default).


Member Function Documentation

void Box::set_size ( Real  xlen,
Real  ylen,
Real  zlen 
)

Sets the size of this box.

Note:
forces recomputation of the mesh


The documentation for this class was generated from the following files:
Generated on Wed Oct 24 14:54:22 2007 for Physsim by  doxygen 1.5.1