cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | List of all members
osaOSGBody Class Reference

#include <osaOSGBody.h>

Inheritance diagram for osaOSGBody:
mtsOSGBody::Body osaODEBody osaOSGBodyUI osaOSGHandle osaOSGPointer3D mtsOSGBodyUI::BodyUI mtsOSGPointer3D::Pointer

Classes

class  GeodeVisitor
 
class  SwitchCallback
 
class  TransformCallback
 
class  TransparencyVisitor
 
class  UserData
 

Public Types

enum  Switch { SWITCH_OFF, SWITCH_ON }
 

Public Member Functions

 osaOSGBody (osaOSGWorld *world, const vctFrame4x4< double > &Rt)
 OSG Body constructor. More...
 
 osaOSGBody (osaOSGBody *body, const vctFrame4x4< double > &Rt)
 
 osaOSGBody (const std::string &model, const vctFrame4x4< double > &Rt, double scale=1.0, double alpha=1.0, const vctFrame4x4< double > &Rtoffset=vctFrame4x4< double >(), const std::string &option=std::string(""))
 OSG Body constructor. More...
 
 osaOSGBody (const std::string &model, osaOSGWorld *world, const vctFrame4x4< double > &Rt, double scale=1.0, double alpha=1.0, const vctFrame4x4< double > &Rtoffset=vctFrame4x4< double >(), const std::string &option=std::string(""))
 OSG Body constructor. More...
 
 osaOSGBody (const std::string &model, osaOSGBody *world, const vctFrame4x4< double > &Rt, double scale=1.0, double alpha=1.0, const vctFrame4x4< double > &Rtoffset=vctFrame4x4< double >(), const std::string &option=std::string(""))
 OSG Body constructor. More...
 
 osaOSGBody (const std::string &model, osaOSGWorld *world, const vctFrm3 &Rt, double scale=1.0, double alpha=1.0, const std::string &option=std::string(""))
 OSG Body constructor. More...
 
 osaOSGBody (const vctDynamicMatrix< double > &pointcloud, osaOSGWorld *world, const vctFrm3 &Rt, const vctFixedSizeVector< unsigned char, 3 > &rgb=RGBDEFAULT, float size=3.0)
 Construcor for 3D point cloud. More...
 
 osaOSGBody ()
 
 ~osaOSGBody ()
 
void Initialize (double scale=1.0)
 
virtual void SetTransform (const vctFrame4x4< double > &Rt)
 Set the transform of the body. More...
 
virtual void SetTransform (const vctFrm3 &Rt)
 
virtual vctFrm3 GetTransform () const
 
osg::ref_ptr
< osg::MatrixTransform > 
GetMatrixTransform ()
 
void ResetMatrixTransform ()
 
void SwitchOn ()
 Set the switch of the body. More...
 
void SwitchOff ()
 
void SetModeLine ()
 
void SetModePoint ()
 
void SetModeFill ()
 
void AddTransformCallback (void)
 
virtual vctDynamicMatrix< double > GetVertices ()
 

Static Public Attributes

static const
vctFixedSizeVector< unsigned
char, 3 > 
RGBDEFAULT
 

Protected Member Functions

virtual void UpdateTransform ()
 This method is called from the transform callback. More...
 
virtual void UpdateSwitch ()
 This method is called from the switch callback. More...
 
void ReadModel (const std::string &fname, const std::string &options, double alpha)
 
void Read3DData (const vctDynamicMatrix< double > &pc, const vctFixedSizeVector< unsigned char, 3 > &RGB=RGBDEFAULT, float size=3.0)
 

Protected Attributes

osg::ref_ptr< UserDatauserdata
 
osg::ref_ptr
< osg::PositionAttitudeTransform > 
osgscale
 
osg::ref_ptr< TransformCallbacktransformcallback
 
vctFrame4x4< double > transform
 
vctFrame4x4< double > Rtoffset
 
osg::ref_ptr
< osg::MatrixTransform > 
osgtransform
 
osg::ref_ptr< SwitchCallbackswitchcallback
 
Switch onoff
 
osg::ref_ptr< osg::Switch > osgswitch
 
osg::ref_ptr< osg::Geode > osggeode
 

Member Enumeration Documentation

Enumerator
SWITCH_OFF 
SWITCH_ON 

Constructor & Destructor Documentation

osaOSGBody::osaOSGBody ( osaOSGWorld world,
const vctFrame4x4< double > &  Rt 
)

OSG Body constructor.

Add body to a given world or subworld

osaOSGBody::osaOSGBody ( osaOSGBody body,
const vctFrame4x4< double > &  Rt 
)
osaOSGBody::osaOSGBody ( const std::string &  model,
const vctFrame4x4< double > &  Rt,
double  scale = 1.0,
double  alpha = 1.0,
const vctFrame4x4< double > &  Rtoffset = vctFrame4x4< double >(),
const std::string &  option = std::string("") 
)

OSG Body constructor.

Create a OSG body component. The body will add a required interface if a function name is passed.

Parameters
modelThe file name of a 3D model
RtThe initial transformation of the body
scaleThe size scale
alphaThe alpha parameter
optionFile options
osaOSGBody::osaOSGBody ( const std::string &  model,
osaOSGWorld world,
const vctFrame4x4< double > &  Rt,
double  scale = 1.0,
double  alpha = 1.0,
const vctFrame4x4< double > &  Rtoffset = vctFrame4x4< double >(),
const std::string &  option = std::string("") 
)

OSG Body constructor.

Create a OSG body component. The body will add a required interface if a function name is passed.

Parameters
modelThe file name of a 3D model
worldThe OSG world the body belongs to
RtThe initial transformation of the body
scaleThe size scale
alphaThe alpha parameter
optionFile options
osaOSGBody::osaOSGBody ( const std::string &  model,
osaOSGBody world,
const vctFrame4x4< double > &  Rt,
double  scale = 1.0,
double  alpha = 1.0,
const vctFrame4x4< double > &  Rtoffset = vctFrame4x4< double >(),
const std::string &  option = std::string("") 
)

OSG Body constructor.

Create a OSG body component. The body will add a required interface if a function name is passed.

Parameters
modelThe file name of a 3D model
bodyThe OSG body the body is attached to
RtThe initial transformation of the body wrt to body
scaleThe size scale
alphaThe alpha parameter
optionFile options
osaOSGBody::osaOSGBody ( const std::string &  model,
osaOSGWorld world,
const vctFrm3 Rt,
double  scale = 1.0,
double  alpha = 1.0,
const std::string &  option = std::string("") 
)

OSG Body constructor.

Create a OSG body component. The body will add a required interface if a function name is passed.

Parameters
modelThe file name of a 3D model
worldThe OSG world the body belongs to
RtThe initial transformation of the body
scaleThe size scale
alphaThe alpha parameter
optionFile options
osaOSGBody::osaOSGBody ( const vctDynamicMatrix< double > &  pointcloud,
osaOSGWorld world,
const vctFrm3 Rt,
const vctFixedSizeVector< unsigned char, 3 > &  rgb = RGBDEFAULT,
float  size = 3.0 
)

Construcor for 3D point cloud.

osaOSGBody::osaOSGBody ( )
osaOSGBody::~osaOSGBody ( )

Member Function Documentation

void osaOSGBody::AddTransformCallback ( void  )
osg::ref_ptr<osg::MatrixTransform> osaOSGBody::GetMatrixTransform ( )
inline
virtual vctFrm3 osaOSGBody::GetTransform ( ) const
virtual

Reimplemented in osaODEBody.

virtual vctDynamicMatrix<double> osaOSGBody::GetVertices ( )
virtual
void osaOSGBody::Initialize ( double  scale = 1.0)
void osaOSGBody::Read3DData ( const vctDynamicMatrix< double > &  pc,
const vctFixedSizeVector< unsigned char, 3 > &  RGB = RGBDEFAULT,
float  size = 3.0 
)
protected
void osaOSGBody::ReadModel ( const std::string &  fname,
const std::string &  options,
double  alpha 
)
protected
void osaOSGBody::ResetMatrixTransform ( )
inline
void osaOSGBody::SetModeFill ( )
void osaOSGBody::SetModeLine ( )
void osaOSGBody::SetModePoint ( )
virtual void osaOSGBody::SetTransform ( const vctFrame4x4< double > &  Rt)
virtual

Set the transform of the body.

Reimplemented in osaODEBody.

virtual void osaOSGBody::SetTransform ( const vctFrm3 Rt)
virtual
void osaOSGBody::SwitchOff ( )
void osaOSGBody::SwitchOn ( )

Set the switch of the body.

virtual void osaOSGBody::UpdateSwitch ( )
protectedvirtual

This method is called from the switch callback.

virtual void osaOSGBody::UpdateTransform ( )
protectedvirtual

This method is called from the transform callback.

Reimplemented in mtsOSGBodyUI::BodyUI, mtsOSGBody::Body, and mtsOSGPointer3D::Pointer.

Member Data Documentation

Switch osaOSGBody::onoff
protected
osg::ref_ptr<osg::Geode> osaOSGBody::osggeode
protected
osg::ref_ptr<osg::PositionAttitudeTransform> osaOSGBody::osgscale
protected
osg::ref_ptr< osg::Switch> osaOSGBody::osgswitch
protected
osg::ref_ptr<osg::MatrixTransform> osaOSGBody::osgtransform
protected
const vctFixedSizeVector<unsigned char,3> osaOSGBody::RGBDEFAULT
static
vctFrame4x4<double> osaOSGBody::Rtoffset
protected
osg::ref_ptr<SwitchCallback> osaOSGBody::switchcallback
protected
vctFrame4x4<double> osaOSGBody::transform
protected
osg::ref_ptr<TransformCallback> osaOSGBody::transformcallback
protected
osg::ref_ptr<UserData> osaOSGBody::userdata
protected

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