#include <octree.h>
Collaboration diagram for Octree:
Public Member Functions | |
Octree (byte *volumeData, int maxX, int maxY, int maxZ) | |
Constructor. | |
~Octree () | |
Destructor. | |
void | remove (Node *tree) |
Removes the octree. | |
Node * | build (int minX, int minY, int minZ, int maxX, int maxY, int maxZ, int count) |
Builds the octree. | |
byte | getData (int x, int y, int z) |
Get the value of a voxel with given coordinates. | |
void | classify (SummedAreaTable *sat) |
Classifies the octree. | |
void | classify (SummedAreaTable *sat, Node *tree) |
Does the classification. | |
int | skip (int x, int y, int z, int mainViewingDir) |
Finds out the number of voxels that can be skipped. | |
int | skip (int x, int y, int z, int mainViewingDir, Node *tree) |
Find out the number of voxels that can be skipped rekursively. | |
Private Attributes | |
Node * | root |
Pointer to the root of the total octree. | |
byte * | data |
Pointer to the volume data. | |
int | width |
Width of the octree. | |
int | height |
Height of the octree. | |
int | depth |
Depth of the octree. | |
int | step_dim3 |
Stores the value of dim1Size*dim2Size. |
Using this octree speeds up classification. When used, the volume needn't be runlength-encoded each time after the transfer-function is changed.
Definition at line 87 of file octree.h.
|
Constructor.
Definition at line 19 of file octree.cpp. References build(), data, depth, height, max, root, step_dim3, and width. |
Here is the call graph for this function:
|
Destructor. Calls remove() to free memory. Definition at line 41 of file octree.cpp. |
Here is the call graph for this function:
|
Builds the octree.
Definition at line 62 of file octree.cpp. References byte, Node::children, data, Node::max, Node::maxX, Node::maxY, Node::maxZ, Node::min, Node::minX, Node::minY, Node::minZ, Node::noChildren, and width. Referenced by Octree(). |
|
Does the classification. Recursively classifies the octree.
Definition at line 180 of file octree.cpp. References Node::children, Node::classification, classify(), Node::max, Node::min, and SummedAreaTable::transparent(). |
Here is the call graph for this function:
|
Classifies the octree. Calls classify(SumedAreaTable *, Node *).
Definition at line 170 of file octree.cpp. References root. Referenced by FastClassification::classify(), and classify(). |
|
Get the value of a voxel with given coordinates.
|
|
Removes the octree. Frees memory from the octree.
Definition at line 49 of file octree.cpp. References Node::children. Referenced by ~Octree(). |
|
Find out the number of voxels that can be skipped rekursively.
Definition at line 206 of file octree.cpp. References Node::children, Node::classification, Node::maxX, Node::maxY, Node::maxZ, Node::minX, Node::minY, Node::minZ, skip(), XDIR, YDIR, and ZDIR. |
Here is the call graph for this function:
|
Finds out the number of voxels that can be skipped. The number of voxels that can be skipped is determinded.
Definition at line 198 of file octree.cpp. References root. Referenced by FastClassification::skip(), and skip(). |
|
Pointer to the volume data.
|
|
Depth of the octree.
Definition at line 193 of file octree.h. Referenced by Octree(). |
|
Height of the octree.
Definition at line 191 of file octree.h. Referenced by Octree(). |
|
Pointer to the root of the total octree.
Definition at line 183 of file octree.h. Referenced by classify(), Octree(), skip(), and ~Octree(). |
|
Stores the value of dim1Size*dim2Size. Is used for computing indices. Definition at line 199 of file octree.h. Referenced by Octree(). |
|
Width of the octree.
|