7 #ifndef _PLANE_PRIMITIVE_H 
    8 #define _PLANE_PRIMITIVE_H 
   10 #include <Moby/Primitive.h> 
   15 class CylinderPrimitive;
 
   16 class SpherePrimitive;
 
   18 class PolyhedralPrimitive;
 
   29     virtual void set_pose(
const Ravelin::Pose3d& T);
 
   30     virtual void get_vertices(boost::shared_ptr<const Ravelin::Pose3d> P, std::vector<Point3d>& vertices) 
const;
 
   31     void get_vertices(
BVPtr bv, boost::shared_ptr<const Ravelin::Pose3d> P, std::vector<Point3d>& vertices) 
const;
 
   39     virtual boost::shared_ptr<const IndexedTriArray> 
get_mesh(boost::shared_ptr<const Ravelin::Pose3d> P);
 
   40     virtual void calc_mass_properties() { 
_density.reset(); 
_J.set_zero(); }
 
   42     virtual void load_from_xml(boost::shared_ptr<const XMLTree> node, std::map<std::string, BasePtr>& id_map);
 
   43     virtual void save_to_xml(
XMLTreePtr node, std::list<boost::shared_ptr<const Base> >& shared_objects) 
const;
 
   45     virtual double get_bounding_radius()
 const { 
return 0.0; }
 
   51     std::map<CollisionGeometryPtr, boost::shared_ptr<OBB> > 
_obbs; 
 
boost::shared_ptr< BV > BVPtr
Bounding volume (BV) smart pointer. 
Definition: Types.h:92
std::map< CollisionGeometryPtr, boost::shared_ptr< OBB > > _obbs
The bounding volumes for the heightmap. 
Definition: PlanePrimitive.h:51
virtual void load_from_xml(boost::shared_ptr< const XMLTree > node, std::map< std::string, BasePtr > &id_map)
Implements Base::load_from_xml() for serialization. 
Definition: PlanePrimitive.cpp:495
virtual double calc_dist_and_normal(const Point3d &point, std::vector< Ravelin::Vector3d > &normals) const 
Finds the signed distance betwen the plane and a point. 
Definition: PlanePrimitive.cpp:477
Defines a triangle-mesh-based primitive type used for inertial property calculation and geometry prov...
Definition: Primitive.h:41
virtual double calc_signed_dist(boost::shared_ptr< const Primitive > p, Point3d &pthis, Point3d &pp) const 
Computes the signed distance between this and another primitive. 
virtual void set_pose(const Ravelin::Pose3d &T)
Transforms the primitive. 
Definition: PlanePrimitive.cpp:59
virtual double calc_height(const Point3d &p) const 
Computes the height at a particular point. 
Definition: PlanePrimitive.cpp:152
boost::shared_ptr< CollisionGeometry > CollisionGeometryPtr
Collision geometry smart pointer. 
Definition: Types.h:77
boost::shared_ptr< XMLTree > XMLTreePtr
XML tree smart pointer. 
Definition: Types.h:104
virtual void save_to_xml(XMLTreePtr node, std::list< boost::shared_ptr< const Base > > &shared_objects) const 
Implements Base::save_to_xml() for serialization. 
Definition: PlanePrimitive.cpp:505
virtual bool is_convex() const 
Determines whether this primitive is convex. 
Definition: PlanePrimitive.h:44
Ravelin::Vector3d Point3d
Typedef to distinguish between a 3D vector and a point. 
Definition: Types.h:47
PlanePrimitive()
Initializes the heightmap primitive. 
Definition: PlanePrimitive.cpp:41
boost::shared_ptr< double > _density
The density of this primitive. 
Definition: Primitive.h:109
Implements the CollisionDetection abstract class to perform exact contact finding using abstract shap...
Definition: CCD.h:36
virtual osg::Node * create_visualization()
Computes the OSG visualization. 
Definition: PlanePrimitive.cpp:183
Represents a heightmap with height zero on the xz plane (primitive can be transformed) ...
Definition: PlanePrimitive.h:21
Ravelin::SpatialRBInertiad _J
The inertia of the primitive. 
Definition: Primitive.h:112
virtual BVPtr get_BVH_root(CollisionGeometryPtr geom)
Gets the BVH root for the heightmap. 
Definition: PlanePrimitive.cpp:72
virtual Point3d get_supporting_point(const Ravelin::Vector3d &dir) const 
Gets the supporting point for the plane (for GJK) 
Definition: PlanePrimitive.cpp:161
virtual void get_vertices(boost::shared_ptr< const Ravelin::Pose3d > P, std::vector< Point3d > &vertices) const 
Get vertices corresponding to this primitive. 
virtual boost::shared_ptr< const IndexedTriArray > get_mesh(boost::shared_ptr< const Ravelin::Pose3d > P)
Gets the mesh of the heightmap. 
Definition: PlanePrimitive.cpp:51