openrave.org

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
OpenRAVE::KinBody::Link::Geometry Class Reference

geometry object holding a link parent and wrapping access to a protected geometry info More...

#include <kinbody.h>

Collaboration diagram for OpenRAVE::KinBody::Link::Geometry:
Collaboration graph
[legend]

Public Member Functions

 Geometry (boost::shared_ptr< Link > parent, const KinBody::GeometryInfo &info)
 
virtual ~Geometry ()
 
const TransformGetTransform () const
 get local geometry transform
 
GeometryType GetType () const
 
const VectorGetRenderScale () const
 
const std::string & GetRenderFilename () const
 
float GetTransparency () const
 
bool IsDraw () const RAVE_DEPRECATED
 
bool IsVisible () const
 
bool IsModifiable () const
 
dReal GetSphereRadius () const
 
dReal GetCylinderRadius () const
 
dReal GetCylinderHeight () const
 
const VectorGetBoxExtents () const
 
const RaveVector< float > & GetDiffuseColor () const
 
const RaveVector< float > & GetAmbientColor () const
 
const TriMeshGetCollisionMesh () const
 returns the local collision mesh
 
const KinBody::GeometryInfoGetInfo () const
 
virtual AABB ComputeAABB (const Transform &trans) const
 returns an axis aligned bounding box given that the geometry is transformed by trans
 
virtual void serialize (std::ostream &o, int options) const
 
virtual void SetCollisionMesh (const TriMesh &mesh)
 sets a new collision mesh and notifies every registered callback about it
 
virtual bool SetVisible (bool visible)
 sets visible flag. if changed, notifies every registered callback about it.
 
void SetDraw (bool bDraw) RAVE_DEPRECATED
 
virtual void SetTransparency (float f)
 set transparency level (0 is opaque)
 
virtual void SetDiffuseColor (const RaveVector< float > &color)
 override diffuse color of geometry material
 
virtual void SetAmbientColor (const RaveVector< float > &color)
 override ambient color of geometry material
 
virtual bool ValidateContactNormal (const Vector &position, Vector &normal) const
 validates the contact normal on the surface of the geometry and makes sure the normal faces "outside" of the shape.
 
virtual void SetRenderFilename (const std::string &renderfilename)
 sets a new render filename for the geometry. This does not change the collision
 

Static Public Attributes

static const GeometryType GeomNone RAVE_DEPRECATED = OpenRAVE::GT_None
 
static const GeometryType GeomBox RAVE_DEPRECATED = OpenRAVE::GT_Box
 
static const GeometryType
GeomSphere 
RAVE_DEPRECATED = OpenRAVE::GT_Sphere
 
static const GeometryType
GeomCylinder 
RAVE_DEPRECATED = OpenRAVE::GT_Cylinder
 
static const GeometryType
GeomTrimesh 
RAVE_DEPRECATED = OpenRAVE::GT_TriMesh
 

Protected Attributes

boost::weak_ptr< Link_parent
 
KinBody::GeometryInfo _info
 geometry info
 

Detailed Description

geometry object holding a link parent and wrapping access to a protected geometry info

Definition at line 204 of file kinbody.h.

Constructor & Destructor Documentation

OpenRAVE::KinBody::Link::Geometry::Geometry ( boost::shared_ptr< Link parent,
const KinBody::GeometryInfo info 
)
virtual OpenRAVE::KinBody::Link::Geometry::~Geometry ( )
inlinevirtual

Definition at line 215 of file kinbody.h.

Member Function Documentation

virtual AABB OpenRAVE::KinBody::Link::Geometry::ComputeAABB ( const Transform trans) const
virtual

returns an axis aligned bounding box given that the geometry is transformed by trans

const RaveVector<float>& OpenRAVE::KinBody::Link::Geometry::GetAmbientColor ( ) const
inline

Definition at line 261 of file kinbody.h.

const Vector& OpenRAVE::KinBody::Link::Geometry::GetBoxExtents ( ) const
inline

Definition at line 255 of file kinbody.h.

const TriMesh& OpenRAVE::KinBody::Link::Geometry::GetCollisionMesh ( ) const
inline

returns the local collision mesh

Definition at line 266 of file kinbody.h.

dReal OpenRAVE::KinBody::Link::Geometry::GetCylinderHeight ( ) const
inline

Definition at line 252 of file kinbody.h.

dReal OpenRAVE::KinBody::Link::Geometry::GetCylinderRadius ( ) const
inline

Definition at line 249 of file kinbody.h.

const RaveVector<float>& OpenRAVE::KinBody::Link::Geometry::GetDiffuseColor ( ) const
inline

Definition at line 258 of file kinbody.h.

const KinBody::GeometryInfo& OpenRAVE::KinBody::Link::Geometry::GetInfo ( ) const
inline

Definition at line 270 of file kinbody.h.

const std::string& OpenRAVE::KinBody::Link::Geometry::GetRenderFilename ( ) const
inline

Definition at line 229 of file kinbody.h.

const Vector& OpenRAVE::KinBody::Link::Geometry::GetRenderScale ( ) const
inline

Definition at line 225 of file kinbody.h.

dReal OpenRAVE::KinBody::Link::Geometry::GetSphereRadius ( ) const
inline

Definition at line 246 of file kinbody.h.

const Transform& OpenRAVE::KinBody::Link::Geometry::GetTransform ( ) const
inline

get local geometry transform

Definition at line 219 of file kinbody.h.

float OpenRAVE::KinBody::Link::Geometry::GetTransparency ( ) const
inline

Definition at line 232 of file kinbody.h.

GeometryType OpenRAVE::KinBody::Link::Geometry::GetType ( ) const
inline

Definition at line 222 of file kinbody.h.

bool OpenRAVE::KinBody::Link::Geometry::IsDraw ( ) const
inline
Deprecated:
(12/1/12)

Definition at line 236 of file kinbody.h.

bool OpenRAVE::KinBody::Link::Geometry::IsModifiable ( ) const
inline

Definition at line 242 of file kinbody.h.

bool OpenRAVE::KinBody::Link::Geometry::IsVisible ( ) const
inline

Definition at line 239 of file kinbody.h.

virtual void OpenRAVE::KinBody::Link::Geometry::serialize ( std::ostream &  o,
int  options 
) const
virtual
virtual void OpenRAVE::KinBody::Link::Geometry::SetAmbientColor ( const RaveVector< float > &  color)
virtual

override ambient color of geometry material

virtual void OpenRAVE::KinBody::Link::Geometry::SetCollisionMesh ( const TriMesh mesh)
virtual

sets a new collision mesh and notifies every registered callback about it

virtual void OpenRAVE::KinBody::Link::Geometry::SetDiffuseColor ( const RaveVector< float > &  color)
virtual

override diffuse color of geometry material

void OpenRAVE::KinBody::Link::Geometry::SetDraw ( bool  bDraw)
inline
Deprecated:
(12/1/12)

Definition at line 285 of file kinbody.h.

virtual void OpenRAVE::KinBody::Link::Geometry::SetRenderFilename ( const std::string &  renderfilename)
virtual

sets a new render filename for the geometry. This does not change the collision

virtual void OpenRAVE::KinBody::Link::Geometry::SetTransparency ( float  f)
virtual

set transparency level (0 is opaque)

virtual bool OpenRAVE::KinBody::Link::Geometry::SetVisible ( bool  visible)
virtual

sets visible flag. if changed, notifies every registered callback about it.

Returns
true if changed
virtual bool OpenRAVE::KinBody::Link::Geometry::ValidateContactNormal ( const Vector position,
Vector normal 
) const
virtual

validates the contact normal on the surface of the geometry and makes sure the normal faces "outside" of the shape.

Parameters
positionthe position of the contact point specified in the link's coordinate system
normalthe unit normal of the contact point specified in the link's coordinate system
Returns
true if the normal is changed to face outside of the shape

Member Data Documentation

KinBody::GeometryInfo OpenRAVE::KinBody::Link::Geometry::_info
protected

geometry info

Definition at line 307 of file kinbody.h.

boost::weak_ptr<Link> OpenRAVE::KinBody::Link::Geometry::_parent
protected

Definition at line 306 of file kinbody.h.

const GeometryType GeomNone OpenRAVE::KinBody::Link::Geometry::RAVE_DEPRECATED = OpenRAVE::GT_None
static
Deprecated:
(12/07/16)

Definition at line 208 of file kinbody.h.

const GeometryType GeomBox OpenRAVE::KinBody::Link::Geometry::RAVE_DEPRECATED = OpenRAVE::GT_Box
static

Definition at line 209 of file kinbody.h.

const GeometryType GeomSphere OpenRAVE::KinBody::Link::Geometry::RAVE_DEPRECATED = OpenRAVE::GT_Sphere
static

Definition at line 210 of file kinbody.h.

const GeometryType GeomCylinder OpenRAVE::KinBody::Link::Geometry::RAVE_DEPRECATED = OpenRAVE::GT_Cylinder
static

Definition at line 211 of file kinbody.h.

const GeometryType GeomTrimesh OpenRAVE::KinBody::Link::Geometry::RAVE_DEPRECATED = OpenRAVE::GT_TriMesh
static

Definition at line 212 of file kinbody.h.


The documentation for this class was generated from the following file: