SM_MechanicalObject Class Reference

#include <SM_MechanicalObject.h>

List of all members.

Public Member Functions

 SM_MechanicalObject ()
 ~SM_MechanicalObject ()
bool isBounded () const
MStatus compute (const MPlug &plug, MDataBlock &data)
 method called each time an attribute needs to be evaluated
MStatus connectionMade (const MPlug &plug, const MPlug &otherPlug, bool asSrc)
 method called when the attribute "plug" is connected to "other plug"
MStatus connectionBroken (const MPlug &plug, const MPlug &otherPlug, bool asSrc)
 method called when the attribute "plug" is no more connected to "other plug"
MStatus setDependentsDirty (const MPlug &plugBeingDirtied, MPlugArray &affectedPlugs)
 creates the dependencies between attributes
void draw (M3dView &view, const MDagPath &path, M3dView::DisplayStyle style, M3dView::DisplayStatus)
 to display the object on 3d opengl scene
MStatus setSofaOutSending (MDataBlock &data)
 build the data storing the pointer to the sofaObject representing the node
MStatus buildSofaObject (const MPlug &plug)
MStatus updateAttributes (MDataBlock &data)
 update the sofa object parameters from the maya node attributes
MStatus createOutMesh (MDataBlock &data)
 create the mesh resulting from the sofa simulation
MStatus updateSofaObject (MObject &obj, double time)
void getScaling (const MPlug &plug)
MStatus getSofaImported (const MPlug &plug)

Static Public Member Functions

static void * creator ()
 return a new instance of the node
static MStatus initialize ()
 build the attributes of the node

Static Public Attributes

static const MTypeId typeId
 the id of the node

Protected Attributes

double initialVelocity [3]
double scaling [3]
MechanicalObject< Vec3dTypes > * sofaObject
 the sofa object representing the node
Vec3dTypes::VecDeriv Xprev
 we need to know the previous inMesh coords in the case of keyframe movement
bool incomingConnection
 is there an incoming connection made
bool mechanicNeedUpdate
 does the mechanical object need to be updated
double initialTime
 the initial time value

Static Protected Attributes

static MObject attInMesh
 input mesh
static MObject attOutMesh
 output mesh
static MObject attNeedUpdate
 does the output mesh need to be updated
static MObject attUpdated
 the sofaObject has been updated
static MObject attSofaImport
 was the mech obj imported from .scn
static MObject attOrigin
 origin vertex in world (translation)
static MObject attRotate
 rotation value
static MObject attScale
 scale value
static MObject attInTime
 time value
static MObject attSofaOutSending
 data storing the sofa object to send it to other nodes
static MObject attVelocity
 mechanical object velocity


Constructor & Destructor Documentation

SM_MechanicalObject::SM_MechanicalObject (  ) 

SM_MechanicalObject::~SM_MechanicalObject (  ) 


Member Function Documentation

bool SM_MechanicalObject::isBounded (  )  const [inline]

MPxLocatorNode inheritance look at maya documentation for more details on these methods

MStatus SM_MechanicalObject::compute ( const MPlug &  plug,
MDataBlock &  data 
)

method called each time an attribute needs to be evaluated

void * SM_MechanicalObject::creator (  )  [static]

return a new instance of the node

MStatus SM_MechanicalObject::initialize (  )  [static]

build the attributes of the node

MStatus SM_MechanicalObject::connectionMade ( const MPlug &  plug,
const MPlug &  otherPlug,
bool  asSrc 
)

method called when the attribute "plug" is connected to "other plug"

MStatus SM_MechanicalObject::connectionBroken ( const MPlug &  plug,
const MPlug &  otherPlug,
bool  asSrc 
)

method called when the attribute "plug" is no more connected to "other plug"

MStatus SM_MechanicalObject::setDependentsDirty ( const MPlug &  plugBeingDirtied,
MPlugArray &  affectedPlugs 
)

creates the dependencies between attributes

void SM_MechanicalObject::draw ( M3dView &  view,
const MDagPath &  path,
M3dView::DisplayStyle  style,
M3dView::DisplayStatus   
) [inline]

to display the object on 3d opengl scene

MStatus SM_MechanicalObject::setSofaOutSending ( MDataBlock &  data  ) 

build the data storing the pointer to the sofaObject representing the node

MStatus SM_MechanicalObject::buildSofaObject ( const MPlug &  plug  ) 

build the sofaObject representing the node

Parameters:
plug : the input mesh connected

MStatus SM_MechanicalObject::updateAttributes ( MDataBlock &  data  ) 

update the sofa object parameters from the maya node attributes

MStatus SM_MechanicalObject::createOutMesh ( MDataBlock &  data  ) 

create the mesh resulting from the sofa simulation

MStatus SM_MechanicalObject::updateSofaObject ( MObject &  obj,
double  time 
)

update the sofa object from the maya mesh

Parameters:
obj : the updated input mesh
time : the current maya time

void SM_MechanicalObject::getScaling ( const MPlug &  plug  ) 

get the transformation scale value

Parameters:
plug : the input scaling value from the mesh transform

MStatus SM_MechanicalObject::getSofaImported ( const MPlug &  plug  ) 

build the sofa object from a sofa scene file

Parameters:
plug : the sofaObject imported (getting from importer node)


Member Data Documentation

const MTypeId SM_MechanicalObject::typeId [static]

the id of the node

MObject SM_MechanicalObject::attInMesh [static, protected]

input mesh

maya attributes

MObject SM_MechanicalObject::attOutMesh [static, protected]

output mesh

MObject SM_MechanicalObject::attNeedUpdate [static, protected]

does the output mesh need to be updated

MObject SM_MechanicalObject::attUpdated [static, protected]

the sofaObject has been updated

MObject SM_MechanicalObject::attSofaImport [static, protected]

was the mech obj imported from .scn

MObject SM_MechanicalObject::attOrigin [static, protected]

origin vertex in world (translation)

MObject SM_MechanicalObject::attRotate [static, protected]

rotation value

MObject SM_MechanicalObject::attScale [static, protected]

scale value

MObject SM_MechanicalObject::attInTime [static, protected]

time value

MObject SM_MechanicalObject::attSofaOutSending [static, protected]

data storing the sofa object to send it to other nodes

MObject SM_MechanicalObject::attVelocity [static, protected]

mechanical object velocity

double SM_MechanicalObject::initialVelocity[3] [protected]

local attributes

double SM_MechanicalObject::scaling[3] [protected]

MechanicalObject<Vec3dTypes>* SM_MechanicalObject::sofaObject [protected]

the sofa object representing the node

Sofa Data

Vec3dTypes::VecDeriv SM_MechanicalObject::Xprev [protected]

we need to know the previous inMesh coords in the case of keyframe movement

bool SM_MechanicalObject::incomingConnection [protected]

is there an incoming connection made

bool SM_MechanicalObject::mechanicNeedUpdate [protected]

does the mechanical object need to be updated

double SM_MechanicalObject::initialTime [protected]

the initial time value


The documentation for this class was generated from the following files:
Generated on Thu Apr 12 17:46:22 2007 for SofaMaya by  doxygen 1.5.1-p1