openrave.org

Public Types | Public Member Functions | Protected Member Functions | Protected Attributes

OpenRAVE::KinBody::Link::GEOMPROPERTIES Class Reference

#include <kinbody.h>

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

List of all members.

Public Types

enum  GeomType {
  GeomNone = 0, GeomBox = 1, GeomSphere = 2, GeomCylinder = 3,
  GeomTrimesh = 4
}
 

The type of geometry primitive.

More...

Public Member Functions

 GEOMPROPERTIES (boost::shared_ptr< Link > parent)
virtual ~GEOMPROPERTIES ()
const TransformGetTransform () const
 Local transformation of the geom primitive with respect to the link's coordinate system.
GeomType GetType () const
const VectorGetRenderScale () const
const std::string & GetRenderFilename () const
 render resource file, should be transformed by _t before rendering
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
 trimesh representation of the collision data of this object in this local coordinate system
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

Protected Member Functions

bool InitCollisionMesh (float fTessellation=1)

Protected Attributes

boost::weak_ptr< Link_parent
Transform _t
 see GetTransform
Vector vGeomData
RaveVector< float > diffuseColor
RaveVector< float > ambientColor
 hints for how to color the meshes
TRIMESH collisionmesh
 see GetCollisionMesh
GeomType _type
 the type of geometry primitive
std::string _renderfilename
Vector vRenderScale
 render scale of the object (x,y,z)
float ftransparency
 value from 0-1 for the transparency of the rendered object, 0 is opaque
bool _bVisible
 if true, geometry is visible as part of the 3d model (default is true)
bool _bModifiable
 if true, object geometry can be dynamically modified (default is true)

Detailed Description

Describes the properties of a basic geometric primitive. Contains everything associated with a physical body along with a seprate (optional) render file.

Definition at line 97 of file kinbody.h.


Member Enumeration Documentation

The type of geometry primitive.

Enumerator:
GeomNone 
GeomBox 
GeomSphere 
GeomCylinder 
GeomTrimesh 

Definition at line 101 of file kinbody.h.


Constructor & Destructor Documentation

OpenRAVE::KinBody::Link::GEOMPROPERTIES::GEOMPROPERTIES ( boost::shared_ptr< Link parent  ) 
virtual OpenRAVE::KinBody::Link::GEOMPROPERTIES::~GEOMPROPERTIES (  )  [inline, virtual]

Definition at line 110 of file kinbody.h.


Member Function Documentation

AABB OpenRAVE::KinBody::Link::GEOMPROPERTIES::ComputeAABB ( const Transform trans  )  const [virtual]

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

Definition at line 150 of file kinbodylink.cpp.

const RaveVector<float>& OpenRAVE::KinBody::Link::GEOMPROPERTIES::GetAmbientColor (  )  const [inline]

Definition at line 159 of file kinbody.h.

const Vector& OpenRAVE::KinBody::Link::GEOMPROPERTIES::GetBoxExtents (  )  const [inline]

Definition at line 153 of file kinbody.h.

const TRIMESH& OpenRAVE::KinBody::Link::GEOMPROPERTIES::GetCollisionMesh (  )  const [inline]

trimesh representation of the collision data of this object in this local coordinate system

Should be transformed by GEOMPROPERTIES::GetTransform() before rendering. For spheres and cylinders, an appropriate discretization value is chosen.

Definition at line 167 of file kinbody.h.

dReal OpenRAVE::KinBody::Link::GEOMPROPERTIES::GetCylinderHeight (  )  const [inline]

Definition at line 150 of file kinbody.h.

dReal OpenRAVE::KinBody::Link::GEOMPROPERTIES::GetCylinderRadius (  )  const [inline]

Definition at line 147 of file kinbody.h.

const RaveVector<float>& OpenRAVE::KinBody::Link::GEOMPROPERTIES::GetDiffuseColor (  )  const [inline]

Definition at line 156 of file kinbody.h.

const std::string& OpenRAVE::KinBody::Link::GEOMPROPERTIES::GetRenderFilename (  )  const [inline]

render resource file, should be transformed by _t before rendering

If the value is "__norenderif__:x", then the viewer should not render the object if it supports *.x files where"x" is the file extension.

Definition at line 127 of file kinbody.h.

const Vector& OpenRAVE::KinBody::Link::GEOMPROPERTIES::GetRenderScale (  )  const [inline]

Definition at line 120 of file kinbody.h.

dReal OpenRAVE::KinBody::Link::GEOMPROPERTIES::GetSphereRadius (  )  const [inline]

Definition at line 144 of file kinbody.h.

const Transform& OpenRAVE::KinBody::Link::GEOMPROPERTIES::GetTransform (  )  const [inline]

Local transformation of the geom primitive with respect to the link's coordinate system.

Definition at line 114 of file kinbody.h.

float OpenRAVE::KinBody::Link::GEOMPROPERTIES::GetTransparency (  )  const [inline]

Definition at line 130 of file kinbody.h.

GeomType OpenRAVE::KinBody::Link::GEOMPROPERTIES::GetType (  )  const [inline]

Definition at line 117 of file kinbody.h.

bool OpenRAVE::KinBody::Link::GEOMPROPERTIES::InitCollisionMesh ( float  fTessellation = 1  )  [protected]

triangulates the geometry object and initializes collisionmesh. GeomTrimesh types must already be triangulated

Parameters:
fTessellation to control how fine the triangles need to be. 1.0f is the default value

Definition at line 320 of file kinbodylink.cpp.

bool OpenRAVE::KinBody::Link::GEOMPROPERTIES::IsDraw (  )  const [inline]
Deprecated:
(12/1/12)

Definition at line 134 of file kinbody.h.

bool OpenRAVE::KinBody::Link::GEOMPROPERTIES::IsModifiable (  )  const [inline]

Definition at line 140 of file kinbody.h.

bool OpenRAVE::KinBody::Link::GEOMPROPERTIES::IsVisible (  )  const [inline]

Definition at line 137 of file kinbody.h.

void OpenRAVE::KinBody::Link::GEOMPROPERTIES::serialize ( std::ostream &  o,
int  options 
) const [virtual]

Definition at line 404 of file kinbodylink.cpp.

void OpenRAVE::KinBody::Link::GEOMPROPERTIES::SetAmbientColor ( const RaveVector< float > &  color  )  [virtual]

override ambient color of geometry material

Definition at line 450 of file kinbodylink.cpp.

void OpenRAVE::KinBody::Link::GEOMPROPERTIES::SetCollisionMesh ( const TRIMESH mesh  )  [virtual]

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

Definition at line 417 of file kinbodylink.cpp.

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

override diffuse color of geometry material

Definition at line 443 of file kinbodylink.cpp.

void OpenRAVE::KinBody::Link::GEOMPROPERTIES::SetDraw ( bool  bDraw  )  [inline]
Deprecated:
(12/1/12)

Definition at line 182 of file kinbody.h.

void OpenRAVE::KinBody::Link::GEOMPROPERTIES::SetRenderFilename ( const std::string &  renderfilename  )  [virtual]

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

Definition at line 563 of file kinbodylink.cpp.

void OpenRAVE::KinBody::Link::GEOMPROPERTIES::SetTransparency ( float  f  )  [virtual]

set transparency level (0 is opaque)

Definition at line 436 of file kinbodylink.cpp.

bool OpenRAVE::KinBody::Link::GEOMPROPERTIES::SetVisible ( bool  visible  )  [virtual]

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

Returns:
true if changed

Definition at line 425 of file kinbodylink.cpp.

bool OpenRAVE::KinBody::Link::GEOMPROPERTIES::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:
position the position of the contact point specified in the link's coordinate system
normal the 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

Definition at line 490 of file kinbodylink.cpp.


Member Data Documentation

if true, object geometry can be dynamically modified (default is true)

Definition at line 221 of file kinbody.h.

if true, geometry is visible as part of the 3d model (default is true)

Definition at line 220 of file kinbody.h.

Definition at line 207 of file kinbody.h.

See also:
ref GetRenderFilename

Definition at line 216 of file kinbody.h.

see GetTransform

Definition at line 208 of file kinbody.h.

the type of geometry primitive

Definition at line 215 of file kinbody.h.

hints for how to color the meshes

Definition at line 213 of file kinbody.h.

see GetCollisionMesh

Definition at line 214 of file kinbody.h.

Definition at line 213 of file kinbody.h.

value from 0-1 for the transparency of the rendered object, 0 is opaque

Definition at line 218 of file kinbody.h.

for boxes, first 3 values are extents for sphere it is radius for cylinder, first 2 values are radius and height for trimesh, none

Definition at line 209 of file kinbody.h.

render scale of the object (x,y,z)

Definition at line 217 of file kinbody.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines