|
Public Types | |
RootLoad = 1 | |
Issued by a new object needing to kick off loading. | |
LowPriority | |
NormalPriority | |
WarmUp | |
AttemptSplitChildren | |
EditorLoad | |
This is a load for the purposes of some editor task. | |
ConfigTOCLoad | |
BlenderLoad | |
InstanceShutdown | |
Unload only, used in the AtlasInstanceTOC destructor. | |
CollisionPreload | |
Loading required data for leaf collision. | |
enum | LoadReasons { RootLoad = 1, LowPriority, NormalPriority, WarmUp, AttemptSplitChildren, EditorLoad, ConfigTOCLoad, BlenderLoad, InstanceShutdown, CollisionPreload } |
For tracking purposes we allow most load/unload methods to specify a reason. More... | |
Public Member Functions | |
AtlasTOC () | |
virtual | ~AtlasTOC () |
virtual bool | write (Stream *s) |
Serialize the TOC to a stream. | |
virtual bool | read (Stream *s) |
Serialize the TOC from a stream. | |
virtual void | generate (RectI invalidationRegion) |
(Re)build all the tiles that contain the specified region, which is specified in leaf level tiles. | |
virtual void | getIOStatus (AtlasFile::IOStatus::TOCIOStatus &status) |
Fill in the TOC I/O status structure. | |
virtual void | cbOnChunkWriteComplete (U32 key, AtlasDeferredIO *adio) |
virtual void | cbOnStubWriteComplete (U32 key, AtlasDeferredIO *adio) |
virtual void | cbPostBackToAtlasFile (U32 key, AtlasDeferredIO *adio) |
virtual void | cbOnChunkReadComplete (U32 stubIdx, AtlasChunk *chunk) |
virtual void | cbOnChunkReadStarted (U32 stubIdx) |
virtual void | cbPopulateChunkReadNote (AtlasReadNote *arn) |
virtual void | dumpStubLoadStatus (U32 stubIdx) |
Used to dump the load request status of the specified stub. | |
virtual void | syncCallback (const F32 deltaTime) |
This gets called back from AtlasFile::syncThreads, with time in seconds since last call. | |
virtual AtlasChunk * | constructNewChunk () |
Construct a new chunk that is of the appropriate type for this TOC, and set the owning TOC to ourselves. | |
virtual void | recalculateUpdates (Vector< AtlasReadNote * > &list, U32 maxCount) |
Take our internal priority list, and fill the provided list with a pri-sorted set of elements describing what are our highest priorities at the moment. | |
const U32 | getTreeDepth () const |
AtlasFile * | getAtlasFile () const |
Static Public Member Functions | |
static const U32 | getNodeCount (const U32 depth) |
Size of a quadtree of depth. | |
static const U32 | getNodeIndex (const U32 level, const Point2I pos) |
Index of a node at given position in a quadtree. | |
Protected Attributes | |
U32 | mTreeDepth |
Depth of our tree. | |
AtlasFile * | mFile |
Owning file. | |
bool | mIsQuadtree |
Safety; are we allowing people to use us in a way that implies we're a quadtree? (This is mostly here so people don't try to diddle a config TOC the wrong way. | |
Friends | |
class | AtlasFile |
For tracking purposes we allow most load/unload methods to specify a reason.
This also lets us filter and prioritize based on context, if needed.
RootLoad | Issued by a new object needing to kick off loading. |
LowPriority | |
NormalPriority | |
WarmUp | |
AttemptSplitChildren | |
EditorLoad | This is a load for the purposes of some editor task. |
ConfigTOCLoad | |
BlenderLoad | |
InstanceShutdown | Unload only, used in the AtlasInstanceTOC destructor. |
CollisionPreload | Loading required data for leaf collision. |
AtlasTOC::AtlasTOC | ( | ) | [inline] |
virtual AtlasTOC::~AtlasTOC | ( | ) | [inline, virtual] |
Size of a quadtree of depth.
Index of a node at given position in a quadtree.
Serialize the TOC to a stream.
This is mostly useful for ResourceTOCs.
Reimplemented in AtlasResourceTOC< StubTypeT >, AtlasResourceGeomTOC, AtlasResourceTOC< AtlasResourceGeomStub >, AtlasResourceTOC< AtlasResourceConfigStub >, and AtlasResourceTOC< AtlasResourceTexStub >.
Serialize the TOC from a stream.
This is mostly useful for ResourceTOCs.
Reimplemented in AtlasResourceTOC< StubTypeT >, AtlasResourceGeomTOC, AtlasResourceTOC< AtlasResourceGeomStub >, AtlasResourceTOC< AtlasResourceConfigStub >, and AtlasResourceTOC< AtlasResourceTexStub >.
(Re)build all the tiles that contain the specified region, which is specified in leaf level tiles.
Reimplemented in AtlasResourceTOC< StubTypeT >, AtlasResourceTOC< AtlasResourceGeomStub >, AtlasResourceTOC< AtlasResourceConfigStub >, and AtlasResourceTOC< AtlasResourceTexStub >.
virtual void AtlasTOC::getIOStatus | ( | AtlasFile::IOStatus::TOCIOStatus & | status | ) | [inline, virtual] |
Fill in the TOC I/O status structure.
Reimplemented in AtlasResourceTOC< StubTypeT >, AtlasResourceTOC< AtlasResourceGeomStub >, AtlasResourceTOC< AtlasResourceConfigStub >, and AtlasResourceTOC< AtlasResourceTexStub >.
virtual void AtlasTOC::cbOnChunkWriteComplete | ( | U32 | key, | |
AtlasDeferredIO * | adio | |||
) | [inline, virtual] |
virtual void AtlasTOC::cbOnStubWriteComplete | ( | U32 | key, | |
AtlasDeferredIO * | adio | |||
) | [inline, virtual] |
virtual void AtlasTOC::cbPostBackToAtlasFile | ( | U32 | key, | |
AtlasDeferredIO * | adio | |||
) | [inline, virtual] |
virtual void AtlasTOC::cbOnChunkReadComplete | ( | U32 | stubIdx, | |
AtlasChunk * | chunk | |||
) | [inline, virtual] |
virtual void AtlasTOC::cbPopulateChunkReadNote | ( | AtlasReadNote * | arn | ) | [inline, virtual] |
Used to dump the load request status of the specified stub.
Reimplemented in AtlasResourceTOC< StubTypeT >, AtlasResourceTOC< AtlasResourceGeomStub >, AtlasResourceTOC< AtlasResourceConfigStub >, and AtlasResourceTOC< AtlasResourceTexStub >.
This gets called back from AtlasFile::syncThreads, with time in seconds since last call.
It's useful for updating things like heat.
Reimplemented in AtlasResourceTOC< StubTypeT >, AtlasResourceTOC< AtlasResourceGeomStub >, AtlasResourceTOC< AtlasResourceConfigStub >, and AtlasResourceTOC< AtlasResourceTexStub >.
virtual AtlasChunk* AtlasTOC::constructNewChunk | ( | ) | [inline, virtual] |
Construct a new chunk that is of the appropriate type for this TOC, and set the owning TOC to ourselves.
Reimplemented in AtlasResourceTOC< StubTypeT >, AtlasResourceTOC< AtlasResourceGeomStub >, AtlasResourceTOC< AtlasResourceConfigStub >, and AtlasResourceTOC< AtlasResourceTexStub >.
virtual void AtlasTOC::recalculateUpdates | ( | Vector< AtlasReadNote * > & | list, | |
U32 | maxCount | |||
) | [inline, virtual] |
Take our internal priority list, and fill the provided list with a pri-sorted set of elements describing what are our highest priorities at the moment.
Reimplemented in AtlasResourceTOC< StubTypeT >, AtlasResourceTOC< AtlasResourceGeomStub >, AtlasResourceTOC< AtlasResourceConfigStub >, and AtlasResourceTOC< AtlasResourceTexStub >.
const U32 AtlasTOC::getTreeDepth | ( | ) | const [inline] |
AtlasFile* AtlasTOC::getAtlasFile | ( | ) | const [inline] |
friend class AtlasFile [friend] |
U32 AtlasTOC::mTreeDepth [protected] |
Depth of our tree.
AtlasFile* AtlasTOC::mFile [protected] |
Owning file.
bool AtlasTOC::mIsQuadtree [protected] |
Safety; are we allowing people to use us in a way that implies we're a quadtree? (This is mostly here so people don't try to diddle a config TOC the wrong way.
)