libHSPlasma
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
plGenericPhysical Class Reference

#include <plGenericPhysical.h>

Inheritance diagram for plGenericPhysical:
plPhysical plSynchedObject hsKeyedObject plCreatable

Public Types

enum  PhysType {
  kPhysNone, kPhysHavok, kPhysODE, kPhysX,
  kNumPhysTypes
}

Public Member Functions

 plGenericPhysical ()
virtual ~plGenericPhysical ()
virtual void read (hsStream *S, plResManager *mgr)
virtual void write (hsStream *S, plResManager *mgr)
float getMass () const
float getFriction () const
float getRestitution () const
plSimDefs::Bounds getBoundsType () const
unsigned int getMemberGroup () const
unsigned int getReportGroup () const
unsigned int getCollideGroup () const
bool isReportEnabled () const
bool isCollideEnabled () const
unsigned short getLOSDBs () const
plKey getObject () const
plKey getSceneNode () const
plKey getSubWorld () const
plKey getSoundGroup () const
hsVector3 getPos () const
hsQuat getRot () const
bool getProperty (size_t prop) const
void setProperty (size_t prop, bool value)
hsVector3 getDimensions () const
hsVector3 getOffset () const
float getRadius () const
float getLength () const
const std::vector< hsVector3 > & getVerts () const
std::vector< hsVector3 > & getVerts ()
const std::vector< unsigned int > & getIndices () const
std::vector< unsigned int > & getIndices ()
size_t getTMDSize () const
const unsigned char * getTMDBuffer () const
void setMass (float mass)
void setFriction (float friction)
void setRestitution (float restitution)
void setBoundsType (plSimDefs::Bounds bounds)
void setMemberGroup (unsigned int group)
void setReportGroup (unsigned int report)
void setCollideGroup (unsigned int collide)
void setReportEnabled (bool enable)
void setCollideEnabled (bool enable)
void setLOSDBs (unsigned short los)
void setObject (plKey object)
void setSceneNode (plKey node)
void setSubWorld (plKey world)
void setSoundGroup (plKey group)
void setPos (const hsVector3 &pos)
void setRot (const hsQuat &rot)
void setDimensions (const hsVector3 &box)
void setOffset (const hsVector3 &offset)
void setRadius (float radius)
void setLength (float length)
void setVerts (size_t numVerts, const hsVector3 *verts)
void setIndices (size_t numIndices, const unsigned int *indices)
void setTMDBuffer (size_t tmdSize, const unsigned char *tmdBuffer)
PhysType getBufferType () const
size_t getBufferSize () const
const unsigned char * getBufferData () const
void setBuffer (PhysType type, size_t size, const unsigned char *data)

Protected Member Functions

void IReadHKPhysical (hsStream *S, plResManager *mgr)
void IReadODEPhysical (hsStream *S, plResManager *mgr)
void IReadPXPhysical (hsStream *S, plResManager *mgr)
void IWriteHKPhysical (hsStream *S, plResManager *mgr)
void IWriteODEPhysical (hsStream *S, plResManager *mgr)
void IWritePXPhysical (hsStream *S, plResManager *mgr)
virtual void IPrcWrite (pfPrcHelper *prc)
virtual void IPrcParse (const pfPrcTag *tag, plResManager *mgr)

Protected Attributes

PhysType fInternalType
unsigned char * fInternalBuffer
size_t fInternalSize
float fMass
float fFriction
float fRestitution
plSimDefs::Bounds fBounds
unsigned int fMemberGroup
unsigned int fCollideGroup
unsigned int fReportGroup
bool fDisableReport
bool fDisableCollide
unsigned short fLOSDBs
plKey fObjectKey
plKey fSceneNode
plKey fSubWorld
plKey fSoundGroup
hsVector3 fPos
hsQuat fRot
hsVector3 fDimensions
hsVector3 fOffset
float fRadius
float fLength
hsBitVector fProps
std::vector< hsVector3fVerts
std::vector< unsigned int > fIndices
size_t fTMDSize
unsigned char * fTMDBuffer

Member Enumeration Documentation

Enumerator:
kPhysNone 
kPhysHavok 
kPhysODE 
kPhysX 
kNumPhysTypes 

Constructor & Destructor Documentation

plGenericPhysical::plGenericPhysical ( )
virtual plGenericPhysical::~plGenericPhysical ( )
virtual

Member Function Documentation

plSimDefs::Bounds plGenericPhysical::getBoundsType ( ) const
const unsigned char* plGenericPhysical::getBufferData ( ) const
size_t plGenericPhysical::getBufferSize ( ) const
PhysType plGenericPhysical::getBufferType ( ) const
unsigned int plGenericPhysical::getCollideGroup ( ) const
hsVector3 plGenericPhysical::getDimensions ( ) const
float plGenericPhysical::getFriction ( ) const
const std::vector<unsigned int>& plGenericPhysical::getIndices ( ) const
std::vector<unsigned int>& plGenericPhysical::getIndices ( )
float plGenericPhysical::getLength ( ) const
unsigned short plGenericPhysical::getLOSDBs ( ) const
float plGenericPhysical::getMass ( ) const
unsigned int plGenericPhysical::getMemberGroup ( ) const
plKey plGenericPhysical::getObject ( ) const
hsVector3 plGenericPhysical::getOffset ( ) const
hsVector3 plGenericPhysical::getPos ( ) const
bool plGenericPhysical::getProperty ( size_t  prop) const
float plGenericPhysical::getRadius ( ) const
unsigned int plGenericPhysical::getReportGroup ( ) const
float plGenericPhysical::getRestitution ( ) const
hsQuat plGenericPhysical::getRot ( ) const
plKey plGenericPhysical::getSceneNode ( ) const
plKey plGenericPhysical::getSoundGroup ( ) const
plKey plGenericPhysical::getSubWorld ( ) const
const unsigned char* plGenericPhysical::getTMDBuffer ( ) const
size_t plGenericPhysical::getTMDSize ( ) const
const std::vector<hsVector3>& plGenericPhysical::getVerts ( ) const
std::vector<hsVector3>& plGenericPhysical::getVerts ( )
virtual void plGenericPhysical::IPrcParse ( const pfPrcTag tag,
plResManager mgr 
)
protectedvirtual

This must be overloaded by subclasses to parse PRC data specific to the class from the PRC document. It is called once for each tag that is a child to the Creatable tag itself, so subclasses should check for each supported tag and handle it accordingly if it matches. If the tag is not recognized, it should be passed along to the parent class.

Reimplemented from plSynchedObject.

virtual void plGenericPhysical::IPrcWrite ( pfPrcHelper prc)
protectedvirtual

This must be overloaded by subclasses to write PRC data specific to the class to the PRC document. Do not write the top-level creatable tag, that is handled by prcWrite().

Reimplemented from plSynchedObject.

void plGenericPhysical::IReadHKPhysical ( hsStream S,
plResManager mgr 
)
protected
void plGenericPhysical::IReadODEPhysical ( hsStream S,
plResManager mgr 
)
protected
void plGenericPhysical::IReadPXPhysical ( hsStream S,
plResManager mgr 
)
protected
bool plGenericPhysical::isCollideEnabled ( ) const
bool plGenericPhysical::isReportEnabled ( ) const
void plGenericPhysical::IWriteHKPhysical ( hsStream S,
plResManager mgr 
)
protected
void plGenericPhysical::IWriteODEPhysical ( hsStream S,
plResManager mgr 
)
protected
void plGenericPhysical::IWritePXPhysical ( hsStream S,
plResManager mgr 
)
protected
virtual void plGenericPhysical::read ( hsStream ,
plResManager  
)
virtual

Reads this creatable directly from the stream. If any keys are read, they will be added to the plResManager automatically.

Reimplemented from plSynchedObject.

void plGenericPhysical::setBoundsType ( plSimDefs::Bounds  bounds)
void plGenericPhysical::setBuffer ( PhysType  type,
size_t  size,
const unsigned char *  data 
)
void plGenericPhysical::setCollideEnabled ( bool  enable)
void plGenericPhysical::setCollideGroup ( unsigned int  collide)
void plGenericPhysical::setDimensions ( const hsVector3 box)
void plGenericPhysical::setFriction ( float  friction)
void plGenericPhysical::setIndices ( size_t  numIndices,
const unsigned int *  indices 
)
void plGenericPhysical::setLength ( float  length)
void plGenericPhysical::setLOSDBs ( unsigned short  los)
void plGenericPhysical::setMass ( float  mass)
void plGenericPhysical::setMemberGroup ( unsigned int  group)
void plGenericPhysical::setObject ( plKey  object)
void plGenericPhysical::setOffset ( const hsVector3 offset)
void plGenericPhysical::setPos ( const hsVector3 pos)
void plGenericPhysical::setProperty ( size_t  prop,
bool  value 
)
void plGenericPhysical::setRadius ( float  radius)
void plGenericPhysical::setReportEnabled ( bool  enable)
void plGenericPhysical::setReportGroup ( unsigned int  report)
void plGenericPhysical::setRestitution ( float  restitution)
void plGenericPhysical::setRot ( const hsQuat rot)
void plGenericPhysical::setSceneNode ( plKey  node)
void plGenericPhysical::setSoundGroup ( plKey  group)
void plGenericPhysical::setSubWorld ( plKey  world)
void plGenericPhysical::setTMDBuffer ( size_t  tmdSize,
const unsigned char *  tmdBuffer 
)
void plGenericPhysical::setVerts ( size_t  numVerts,
const hsVector3 verts 
)
virtual void plGenericPhysical::write ( hsStream ,
plResManager  
)
virtual

Writes this creatable directly to the stream. The plResManager is used to manage any key references written by this creatable.

Reimplemented from plSynchedObject.

Member Data Documentation

plSimDefs::Bounds plGenericPhysical::fBounds
protected
unsigned int plGenericPhysical::fCollideGroup
protected
hsVector3 plGenericPhysical::fDimensions
protected
bool plGenericPhysical::fDisableCollide
protected
bool plGenericPhysical::fDisableReport
protected
float plGenericPhysical::fFriction
protected
std::vector<unsigned int> plGenericPhysical::fIndices
protected
unsigned char* plGenericPhysical::fInternalBuffer
protected
size_t plGenericPhysical::fInternalSize
protected
PhysType plGenericPhysical::fInternalType
protected
float plGenericPhysical::fLength
protected
unsigned short plGenericPhysical::fLOSDBs
protected
float plGenericPhysical::fMass
protected
unsigned int plGenericPhysical::fMemberGroup
protected
plKey plGenericPhysical::fObjectKey
protected
hsVector3 plGenericPhysical::fOffset
protected
hsVector3 plGenericPhysical::fPos
protected
hsBitVector plGenericPhysical::fProps
protected
float plGenericPhysical::fRadius
protected
unsigned int plGenericPhysical::fReportGroup
protected
float plGenericPhysical::fRestitution
protected
hsQuat plGenericPhysical::fRot
protected
plKey plGenericPhysical::fSceneNode
protected
plKey plGenericPhysical::fSoundGroup
protected
plKey plGenericPhysical::fSubWorld
protected
unsigned char* plGenericPhysical::fTMDBuffer
protected
size_t plGenericPhysical::fTMDSize
protected
std::vector<hsVector3> plGenericPhysical::fVerts
protected

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