#include <LodCollapse.h>
Public Types |
|
enum | { kDirtyCollapse = LodGroup::kLastDirty, kLastDirty } |
Public Member Functions |
|
LodCollapse () | |
virtual void | setAllDirty (bool dirty) |
virtual void | traverse (NodeVisitor &) |
Note, if setTraverseOriginal is turned on
this node will traverse the original sub-graph children, not the
actual levels of detail. |
|
virtual void | accept (NodeVisitor &) |
GroupRef | setCollapseGroup (GroupRef group) |
This method will cause this LodCollapse node to
replace the given group node in the graph and arrange for the
sub-graph rooted at the group node to be collapsed into this one.
|
|
void | setCollapseGroupMaintainSceneHierarchy (bool msh) |
bool | getCollapseGroupMaintainSceneHierarchy () const |
GroupRef | getCollapseGroup () const |
getCollapseGroup returns a temporary group
node that references the children of the collapsed graph. |
|
bool | collapse () |
This method will do the collapsing and
should be called only by the update visitor. |
|
void | getCollapseChildren (NodeSet &children) const |
Request a list of the children of the
collapsed node. |
|
int | getCollapseChildCount () const |
Methods to allow Python to iterate over the
collapsed children. |
|
NodeRef | getCollapseChild (int i) const |
bool | resetCollapseState () |
Call
resetCollapseState() to make this node look like it's original
collapsed group. |
|
bool | isCollapsed () const |
virtual int | insertChildAtIndex (NodeRef child, int index) |
virtual int | removeChild (NodeRef child) |
virtual int | removeAllChildren () |
void | setCollapseRoot (Group *root) |
virtual bool | needToMaintainSceneHierarchy () const |
Look at the children and parents, and let us
know if this node should be marked as "maintain" or not. |
|
Static Public Member Functions |
|
static bool | setTraverseOriginalMode (bool) |
Use this method with discretion. |
|
static bool | isTraverseOriginalMode () |
Protected Member Functions |
|
virtual | ~LodCollapse () |
Reference counted objects shouldn't exist on
the stack. |
|
virtual LodCollapse & | operator= (const LodCollapse &rhs) |
Should we allow assignment of these?
|
|
bool | retainPolygonsAmbientOcclusionData () |
bool | retainAmbientOcclusionTextures (aw::vector< awScene::LodGroupRef > &lodGroups, bool hasSurfaceData) |
bool | collectBitmapsAndDomains (LodGroup &lodGroup, awString::IString &textureFilename, int filterSize, int &accumulatedTextureTransformsCount, aw::vector< awImage::ImageByte * > &accumulatedBitmaps, aw::vector< awLinear::Range2d > &accumulatedDomains, bool hasSurfaceData) |
bool | packAndSaveTextureToFile (awImage::Packing &packedBitmap, aw::vector< awImage::ImageByte * > &accumulatedBitmaps, awString::IString &outTextureFilename) |
void | collectAndApplyTextureTransforms (awImage::Packing &packedBitmap, aw::vector< awLinear::Range2d > &accumulatedDomains) |
void | applyOcclusionTextureToAppearance (awString::IString &outTextureFilename) |
void | getOcclusionFilename (awString::IString &filename, const char *extName) |
awImage::ImageByte * | scaleOcclusionTexture (awImage::ImageByte *source, float scaleFactor) |
Static Protected Member Functions |
|
static int | getMinimumLODCount (NodeSet &leaves) |
static bool | skipLodGroup (const awScene::LodGroup &lodGroup) |
anonymous enum |
LodCollapse | ( | ) |
virtual ~LodCollapse | ( | ) | [protected, virtual] |
Reference counted objects shouldn't exist on the stack.
virtual void setAllDirty | ( | bool | dirty | ) | [virtual] |
Reimplemented from LodGroup.
virtual void traverse | ( | NodeVisitor & | ) | [virtual] |
Note, if setTraverseOriginal is turned on this node will traverse the original sub-graph children, not the actual levels of detail.
Reimplemented from Node.
virtual void accept | ( | NodeVisitor & | ) | [virtual] |
Reimplemented from LodGroup.
This method will cause this LodCollapse node to replace the given group node in the graph and arrange for the sub-graph rooted at the group node to be collapsed into this one.
Call setCollapseGroup( NULL ) to uncollapse the currently collapsed group. Returns a ref to the node that is in the graph. If this is an uncollapse it will return a new group node that has replaced this one. If this is a collapse it will return a reference to this node.
void setCollapseGroupMaintainSceneHierarchy | ( | bool | msh | ) |
bool getCollapseGroupMaintainSceneHierarchy | ( | ) | const |
GroupRef getCollapseGroup | ( | ) | const |
getCollapseGroup returns a temporary group node that references the children of the collapsed graph.
This node should only be used for traversal of the children and should be released when done.
bool collapse | ( | ) |
This method will do the collapsing and should be called only by the update visitor.
void getCollapseChildren | ( | NodeSet & | children | ) | const |
Request a list of the children of the collapsed node.
int getCollapseChildCount | ( | ) | const |
Methods to allow Python to iterate over the collapsed children.
NodeRef getCollapseChild | ( | int | i | ) | const |
bool resetCollapseState | ( | ) |
Call resetCollapseState() to make this node look like it's original collapsed group.
It will take on the children of the orginal group and will be marked as needing to be re-collapsed.
static bool setTraverseOriginalMode | ( | bool | ) | [static] |
Use this method with discretion.
It sets a static property for all instances and hence is not safe for multi-threaded access. When the mode is true traversing collapse nodes will traverse the original un-collapsed sub-graph instead of the collapsed LodGroup. Returns the previous state of the mode.
static bool isTraverseOriginalMode | ( | ) | [static] |
bool isCollapsed | ( | ) | const |
virtual int removeAllChildren | ( | ) | [virtual] |
Reimplemented from LodGroup.
virtual bool needToMaintainSceneHierarchy | ( | ) | const [virtual] |
Look at the children and parents, and let us know if this node should be marked as "maintain" or not.
Return true if we really, really need that flag set. The "set...Check" behaves as the "set..." above if maintain is false. If maintain is true, it consults the "needTo..." to decide if it should set it or not. In the process, it may fix up the parents as well.
Reimplemented from Node.
virtual LodCollapse& operator= | ( | const LodCollapse & | rhs | ) | [protected, virtual] |
Should we allow assignment of these?
static int getMinimumLODCount | ( | NodeSet & | leaves | ) | [static, protected] |
static bool skipLodGroup | ( | const awScene::LodGroup & | lodGroup | ) | [static, protected] |
bool retainPolygonsAmbientOcclusionData | ( | ) | [protected] |
bool retainAmbientOcclusionTextures | ( | aw::vector< awScene::LodGroupRef > & | lodGroups, |
bool | hasSurfaceData | ||
) | [protected] |
bool collectBitmapsAndDomains | ( | LodGroup & | lodGroup, |
awString::IString & | textureFilename, | ||
int | filterSize, | ||
int & | accumulatedTextureTransformsCount, | ||
aw::vector< awImage::ImageByte * > & | accumulatedBitmaps, | ||
aw::vector< awLinear::Range2d > & | accumulatedDomains, | ||
bool | hasSurfaceData | ||
) | [protected] |
bool packAndSaveTextureToFile | ( | awImage::Packing & | packedBitmap, |
aw::vector< awImage::ImageByte * > & | accumulatedBitmaps, | ||
awString::IString & | outTextureFilename | ||
) | [protected] |
void collectAndApplyTextureTransforms | ( | awImage::Packing & | packedBitmap, |
aw::vector< awLinear::Range2d > & | accumulatedDomains | ||
) | [protected] |
void applyOcclusionTextureToAppearance | ( | awString::IString & | outTextureFilename | ) | [protected] |
void getOcclusionFilename | ( | awString::IString & | filename, |
const char * | extName | ||
) | [protected] |
awImage::ImageByte* scaleOcclusionTexture | ( | awImage::ImageByte * | source, |
float | scaleFactor | ||
) | [protected] |