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

#include <plDrawableSpans.h>

Inheritance diagram for plDrawableSpans:
plDrawable hsKeyedObject plCreatable

Public Member Functions

 plDrawableSpans ()
virtual ~plDrawableSpans ()
virtual void read (hsStream *S, plResManager *mgr)
virtual void write (hsStream *S, plResManager *mgr)
void calcBounds ()
void BuildSpaceTree ()
size_t getNumSpans () const
plSpangetSpan (size_t idx) const
plIciclegetIcicle (size_t idx) const
size_t addIcicle (const plIcicle &span)
void clearSpans ()
size_t getNumBufferGroups () const
plGBufferGroupgetBuffer (size_t group) const
size_t createBufferGroup (unsigned char format)
void deleteBufferGroup (size_t group)
std::vector< plGBufferVertexgetVerts (const plIcicle *span) const
std::vector< unsigned short > getIndices (const plIcicle *span) const
std::vector< plGBufferCellgetCells (size_t group, size_t buffer) const
void addVerts (size_t group, const std::vector< plGBufferVertex > &verts)
void addIndices (size_t group, const std::vector< unsigned short > &indices)
void addCells (size_t group, const std::vector< plGBufferCell > &cells)
size_t getNumDIIndices () const
const plDISpanIndexgetDIIndex (size_t idx) const
plDISpanIndexgetDIIndex (size_t idx)
const std::vector
< plDISpanIndex > & 
getDIIndices () const
std::vector< plDISpanIndex > & getDIIndices ()
void addDIIndex (const plDISpanIndex &idx)
void delDIIndex (size_t idx)
void clearDIIndices ()
size_t getNumTransforms () const
hsMatrix44 getLocalToWorld (size_t idx) const
hsMatrix44 getWorldToLocal (size_t idx) const
hsMatrix44 getLocalToBone (size_t idx) const
hsMatrix44 getBoneToLocal (size_t idx) const
void clearTransforms ()
void addTransform (const hsMatrix44 &l2w, const hsMatrix44 &w2l, const hsMatrix44 &l2b, const hsMatrix44 &b2l)
const hsBounds3ExtgetLocalBounds ()
const hsBounds3ExtgetWorldBounds ()
const hsBounds3ExtgetMaxWorldBounds ()
void setLocalBounds (const hsBounds3Ext &bounds)
void setWorldBounds (const hsBounds3Ext &bounds)
void setMaxWorldBounds (const hsBounds3Ext &bounds)
const std::vector< plKey > & getMaterials () const
std::vector< plKey > & getMaterials ()
void addMaterial (plKey mat)
void clearMaterials ()
plSpaceTreegetSpaceTree () const
void setSpaceTree (plSpaceTree *tree)
unsigned int getProps () const
unsigned int getCriteria () const
unsigned int getRenderLevel () const
plKey getSceneNode () const
void setProps (unsigned int props)
void setCriteria (unsigned int crit)
void setRenderLevel (unsigned int level)
void setSceneNode (plKey node)
void composeGeometry (bool clearspans=true)
void decomposeGeometry (bool clearcolors=false)
size_t buildDIIndex (const std::vector< std::shared_ptr< plGeometrySpan > > &spans)
const std::vector
< std::shared_ptr
< plGeometrySpan > > 
getSourceSpans () const
std::vector< std::shared_ptr
< plGeometrySpan > > 
getSourceSpans ()
void addSourceSpan (const std::shared_ptr< plGeometrySpan > &span)

Protected Member Functions

virtual void IPrcWrite (pfPrcHelper *prc)
virtual void IPrcParse (const pfPrcTag *tag, plResManager *mgr)
plSpaceBuilderNodeIBuildTree (std::vector< plSpaceBuilderNode * > &nodes)
void ISplitSpace (std::vector< plSpaceBuilderNode * > &nodes, std::vector< plSpaceBuilderNode * > &left, std::vector< plSpaceBuilderNode * > &right)
void ISortSpace (std::vector< plSpaceBuilderNode * > &nodes, int axis)

Protected Attributes

hsBounds3Ext fLocalBounds
hsBounds3Ext fWorldBounds
hsBounds3Ext fMaxWorldBounds
std::vector< hsMatrix44fLocalToWorlds
std::vector< hsMatrix44fWorldToLocals
std::vector< hsMatrix44fLocalToBones
std::vector< hsMatrix44fBoneToLocals
std::vector< plKeyfMaterials
plSpaceTreefSpaceTree
std::vector< plIcicle * > fIcicles
std::vector< plParticleSpan * > fParticleSpans
std::vector< plSpan * > fSpans
std::vector< unsigned int > fSpanSourceIndices
std::vector< plGBufferGroup * > fGroups
std::vector< plDISpanIndexfDIIndices
unsigned int fProps
unsigned int fCriteria
unsigned int fRenderLevel
plKey fSceneNode
std::vector< std::shared_ptr
< plGeometrySpan > > 
fSourceSpans

Additional Inherited Members

- Public Types inherited from plDrawable
enum  {
  kPropNoDraw = 0x1, kPropUNUSED = 0x2, kPropSortSpans = 0x4, kPropSortFaces = 0x8,
  kPropVolatile = 0x10, kPropNoReSort = 0x20, kPropPartialSort = 0x40, kPropCharacter = 0x80,
  kPropSortAsOne = 0x100, kPropHasVisLOS = 0x200
}
enum  { kCritStatic = 0x1, kCritSortSpans = 0x2, kCritSortFaces = 0x8, kCritCharacter = 0x10 }
enum  plDrawableType {
  kNormal = 0x1, kNonDrawable = 0x2, kEnviron = 0x4, kLightProxy = 0x10000,
  kOccluderProxy = 0x20000, kAudibleProxy = 0x40000, kPhysicalProxy = 0x80000, kCoordinateProxy = 0x100000,
  kOccSnapProxy = 0x200000, kGenericProxy = 0x400000, kCameraProxy = 0x800000, kAllProxies = 0xFF0000,
  kAllTypes = 0x0000FF
}
enum  plSubDrawableType { kSubNormal = 0x1, kSubNonDrawable = 0x2, kSubEnviron = 0x4, kSubAllTypes = 0xFF }
- Static Public Attributes inherited from plDrawable
static const unsigned int kSpanTypeMask = 0xC0000000
static const unsigned int kSpanIDMask = 0x3FFFFFFF
static const unsigned int kSpanTypeIcicle = 0x00000000
static const unsigned int kSpanTypeUnknown = 0x80000000
static const unsigned int kSpanTypeParticleSpan = 0xC0000000

Constructor & Destructor Documentation

plDrawableSpans::plDrawableSpans ( )
virtual plDrawableSpans::~plDrawableSpans ( )
virtual

Member Function Documentation

void plDrawableSpans::addCells ( size_t  group,
const std::vector< plGBufferCell > &  cells 
)
void plDrawableSpans::addDIIndex ( const plDISpanIndex idx)
size_t plDrawableSpans::addIcicle ( const plIcicle span)
void plDrawableSpans::addIndices ( size_t  group,
const std::vector< unsigned short > &  indices 
)
void plDrawableSpans::addMaterial ( plKey  mat)
void plDrawableSpans::addSourceSpan ( const std::shared_ptr< plGeometrySpan > &  span)
void plDrawableSpans::addTransform ( const hsMatrix44 l2w,
const hsMatrix44 w2l,
const hsMatrix44 l2b,
const hsMatrix44 b2l 
)
void plDrawableSpans::addVerts ( size_t  group,
const std::vector< plGBufferVertex > &  verts 
)
size_t plDrawableSpans::buildDIIndex ( const std::vector< std::shared_ptr< plGeometrySpan > > &  spans)
void plDrawableSpans::BuildSpaceTree ( )
void plDrawableSpans::calcBounds ( )
void plDrawableSpans::clearDIIndices ( )
void plDrawableSpans::clearMaterials ( )
void plDrawableSpans::clearSpans ( )
void plDrawableSpans::clearTransforms ( )
void plDrawableSpans::composeGeometry ( bool  clearspans = true)
size_t plDrawableSpans::createBufferGroup ( unsigned char  format)
void plDrawableSpans::decomposeGeometry ( bool  clearcolors = false)
void plDrawableSpans::delDIIndex ( size_t  idx)
void plDrawableSpans::deleteBufferGroup ( size_t  group)
hsMatrix44 plDrawableSpans::getBoneToLocal ( size_t  idx) const
plGBufferGroup* plDrawableSpans::getBuffer ( size_t  group) const
std::vector<plGBufferCell> plDrawableSpans::getCells ( size_t  group,
size_t  buffer 
) const
unsigned int plDrawableSpans::getCriteria ( ) const
const plDISpanIndex& plDrawableSpans::getDIIndex ( size_t  idx) const
plDISpanIndex& plDrawableSpans::getDIIndex ( size_t  idx)
const std::vector<plDISpanIndex>& plDrawableSpans::getDIIndices ( ) const
std::vector<plDISpanIndex>& plDrawableSpans::getDIIndices ( )
plIcicle* plDrawableSpans::getIcicle ( size_t  idx) const
std::vector<unsigned short> plDrawableSpans::getIndices ( const plIcicle span) const
const hsBounds3Ext& plDrawableSpans::getLocalBounds ( )
hsMatrix44 plDrawableSpans::getLocalToBone ( size_t  idx) const
hsMatrix44 plDrawableSpans::getLocalToWorld ( size_t  idx) const
const std::vector<plKey>& plDrawableSpans::getMaterials ( ) const
std::vector<plKey>& plDrawableSpans::getMaterials ( )
const hsBounds3Ext& plDrawableSpans::getMaxWorldBounds ( )
size_t plDrawableSpans::getNumBufferGroups ( ) const
size_t plDrawableSpans::getNumDIIndices ( ) const
size_t plDrawableSpans::getNumSpans ( ) const
size_t plDrawableSpans::getNumTransforms ( ) const
unsigned int plDrawableSpans::getProps ( ) const
unsigned int plDrawableSpans::getRenderLevel ( ) const
plKey plDrawableSpans::getSceneNode ( ) const
const std::vector<std::shared_ptr<plGeometrySpan> > plDrawableSpans::getSourceSpans ( ) const
std::vector<std::shared_ptr<plGeometrySpan> > plDrawableSpans::getSourceSpans ( )
plSpaceTree* plDrawableSpans::getSpaceTree ( ) const
plSpan* plDrawableSpans::getSpan ( size_t  idx) const
std::vector<plGBufferVertex> plDrawableSpans::getVerts ( const plIcicle span) const
const hsBounds3Ext& plDrawableSpans::getWorldBounds ( )
hsMatrix44 plDrawableSpans::getWorldToLocal ( size_t  idx) const
plSpaceBuilderNode* plDrawableSpans::IBuildTree ( std::vector< plSpaceBuilderNode * > &  nodes)
protected
virtual void plDrawableSpans::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 hsKeyedObject.

virtual void plDrawableSpans::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 hsKeyedObject.

void plDrawableSpans::ISortSpace ( std::vector< plSpaceBuilderNode * > &  nodes,
int  axis 
)
protected
void plDrawableSpans::ISplitSpace ( std::vector< plSpaceBuilderNode * > &  nodes,
std::vector< plSpaceBuilderNode * > &  left,
std::vector< plSpaceBuilderNode * > &  right 
)
protected
virtual void plDrawableSpans::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 hsKeyedObject.

void plDrawableSpans::setCriteria ( unsigned int  crit)
void plDrawableSpans::setLocalBounds ( const hsBounds3Ext bounds)
void plDrawableSpans::setMaxWorldBounds ( const hsBounds3Ext bounds)
void plDrawableSpans::setProps ( unsigned int  props)
void plDrawableSpans::setRenderLevel ( unsigned int  level)
void plDrawableSpans::setSceneNode ( plKey  node)
void plDrawableSpans::setSpaceTree ( plSpaceTree tree)
void plDrawableSpans::setWorldBounds ( const hsBounds3Ext bounds)
virtual void plDrawableSpans::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 hsKeyedObject.

Member Data Documentation

std::vector<hsMatrix44> plDrawableSpans::fBoneToLocals
protected
unsigned int plDrawableSpans::fCriteria
protected
std::vector<plDISpanIndex> plDrawableSpans::fDIIndices
protected
std::vector<plGBufferGroup*> plDrawableSpans::fGroups
protected
std::vector<plIcicle*> plDrawableSpans::fIcicles
protected
hsBounds3Ext plDrawableSpans::fLocalBounds
protected
std::vector<hsMatrix44> plDrawableSpans::fLocalToBones
protected
std::vector<hsMatrix44> plDrawableSpans::fLocalToWorlds
protected
std::vector<plKey> plDrawableSpans::fMaterials
protected
hsBounds3Ext plDrawableSpans::fMaxWorldBounds
protected
std::vector<plParticleSpan*> plDrawableSpans::fParticleSpans
protected
unsigned int plDrawableSpans::fProps
protected
unsigned int plDrawableSpans::fRenderLevel
protected
plKey plDrawableSpans::fSceneNode
protected
std::vector< std::shared_ptr<plGeometrySpan> > plDrawableSpans::fSourceSpans
protected
plSpaceTree* plDrawableSpans::fSpaceTree
protected
std::vector<plSpan*> plDrawableSpans::fSpans
protected
std::vector<unsigned int> plDrawableSpans::fSpanSourceIndices
protected
hsBounds3Ext plDrawableSpans::fWorldBounds
protected
std::vector<hsMatrix44> plDrawableSpans::fWorldToLocals
protected

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