libHSPlasma
|
#include <plDrawableSpans.h>
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 |
plSpan * | getSpan (size_t idx) const |
plIcicle * | getIcicle (size_t idx) const |
size_t | addIcicle (const plIcicle &span) |
void | clearSpans () |
size_t | getNumBufferGroups () const |
plGBufferGroup * | getBuffer (size_t group) const |
size_t | createBufferGroup (unsigned char format) |
void | deleteBufferGroup (size_t group) |
std::vector< plGBufferVertex > | getVerts (const plIcicle *span) const |
std::vector< unsigned short > | getIndices (const plIcicle *span) const |
std::vector< plGBufferCell > | getCells (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 plDISpanIndex & | getDIIndex (size_t idx) const |
plDISpanIndex & | getDIIndex (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 hsBounds3Ext & | getLocalBounds () |
const hsBounds3Ext & | getWorldBounds () |
const hsBounds3Ext & | getMaxWorldBounds () |
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 () |
plSpaceTree * | getSpaceTree () 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) |
plSpaceBuilderNode * | IBuildTree (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< hsMatrix44 > | fLocalToWorlds |
std::vector< hsMatrix44 > | fWorldToLocals |
std::vector< hsMatrix44 > | fLocalToBones |
std::vector< hsMatrix44 > | fBoneToLocals |
std::vector< plKey > | fMaterials |
plSpaceTree * | fSpaceTree |
std::vector< plIcicle * > | fIcicles |
std::vector< plParticleSpan * > | fParticleSpans |
std::vector< plSpan * > | fSpans |
std::vector< unsigned int > | fSpanSourceIndices |
std::vector< plGBufferGroup * > | fGroups |
std::vector< plDISpanIndex > | fDIIndices |
unsigned int | fProps |
unsigned int | fCriteria |
unsigned int | fRenderLevel |
plKey | fSceneNode |
std::vector< std::shared_ptr < plGeometrySpan > > | fSourceSpans |
Additional Inherited Members | |
![]() | |
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 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 |
plDrawableSpans::plDrawableSpans | ( | ) |
|
virtual |
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 |
|
protected |
|
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.
|
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.
|
protected |
|
protected |
|
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 |
Writes this creatable directly to the stream. The plResManager is used to manage any key references written by this creatable.
Reimplemented from hsKeyedObject.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |