HOG2
|
#include <Voxels.h>
Classes | |
struct | OctreeNode |
struct | voxelWorld |
Public Member Functions | |
Voxels (const char *filename) | |
~Voxels () | |
void | Export (const char *filename) |
void | GetSuccessors (const voxelState &nodeID, std::vector< voxelState > &neighbors) const |
void | GetActions (const voxelState &nodeID, std::vector< voxelAction > &actions) const |
void | ApplyAction (voxelState &s, voxelAction a) const |
bool | InvertAction (voxelAction &a) const |
double | HCost (const voxelState &node1, const voxelState &node2) const |
Heuristic value between two arbitrary nodes. More... | |
double | GCost (const voxelState &node1, const voxelState &node2) const |
double | GCost (const voxelState &node, const voxelAction &act) const |
bool | GoalTest (const voxelState &node, const voxelState &goal) const |
uint64_t | GetStateHash (const voxelState &node) const |
void | GetStateFromHash (uint64_t parent, voxelState &s) |
uint64_t | GetActionHash (voxelAction act) const |
void | OpenGLDraw () const |
void | OpenGLDraw (const voxelState &) const |
void | OpenGLDraw (const voxelState &, const voxelState &, float) const |
Draw the transition at some percentage 0...1 between two states. More... | |
void | OpenGLDraw (const voxelState &, const voxelAction &) const |
void | GLLabelState (const voxelState &, const char *) const |
void | GLDrawLine (const voxelState &x, const voxelState &y) const |
void | Draw (Graphics::Display &display) const |
Public Member Functions inherited from SearchEnvironment< voxelState, voxelAction > | |
virtual | ~SearchEnvironment () |
virtual int | GetNumSuccessors (const voxelState &stateID) const |
virtual voxelAction | GetAction (const voxelState &s1, const voxelState &s2) const |
virtual void | UndoAction (voxelState &s, voxelAction a) const |
virtual void | GetNextState (const voxelState &s1, voxelAction a, voxelState &s2) const |
virtual void | StoreGoal (voxelState &s) |
Stores the goal for use by single-state HCost. More... | |
virtual void | ClearGoal () |
Clears the goal from memory. More... | |
virtual bool | IsGoalStored () const |
Returns true if the goal is stored and false otherwise. More... | |
virtual double | HCost (const voxelState &node1, const voxelState &node2, double parentHCost) const |
virtual double | HCost (const voxelState &node) const |
Heuristic value between node and the stored goal. More... | |
virtual bool | GoalTest (const voxelState &node) const |
Goal Test if the goal is stored. More... | |
virtual uint64_t | GetMaxHash () const |
virtual void | GetStateFromHash (uint64_t parent, voxelState &s) const |
virtual double | GetPathLength (std::vector< voxelState > &neighbors) |
virtual double | GetPathLength (const voxelState &start, std::vector< voxelAction > &neighbors) |
virtual OccupancyInterface< voxelState, voxelAction > * | GetOccupancyInfo () |
virtual void | SetOccupancyInfo (OccupancyInterface< voxelState, voxelAction > *) |
virtual void | OpenGLDraw () const |
virtual void | GLDrawPath (const std::vector< voxelState > &x) const |
virtual void | SetColor (const rgbColor &r) const |
virtual void | SetColor (GLfloat rr, GLfloat g, GLfloat b, GLfloat t=1.0) const |
virtual void | GetColor (GLfloat &rr, GLfloat &g, GLfloat &b, GLfloat &t) const |
virtual rgbColor | GetColor () const |
virtual void | Draw (Graphics::Display &display, const voxelState &) const |
virtual void | DrawLine (Graphics::Display &display, const voxelState &x, const voxelState &y, float width=1.0) const |
Public Member Functions inherited from Heuristic< voxelState > | |
Heuristic () | |
virtual | ~Heuristic () |
Private Types | |
typedef std::vector< OctreeNode > | OctreeLayer |
Private Member Functions | |
void | AddVoxelCubeToOctree (uint64_t values, point3d p) |
point3d | GetVoxelCoordinate (uint64_t morton, float voxelSize, const float minbounds[4]) const |
uint32_t | Part1By2 (uint32_t x) const |
uint32_t | EncodeMorton3 (uint32_t x, uint32_t y, uint32_t z) const |
uint32_t | Compact1By2 (uint32_t x) const |
uint32_t | DecodeMorton3X (uint32_t code) const |
uint32_t | DecodeMorton3Y (uint32_t code) const |
uint32_t | DecodeMorton3Z (uint32_t code) const |
size_t | GetIndex (size_t x, size_t y, size_t z) const |
void | GetCoordsForIndex (size_t i, size_t &x, size_t &y, size_t &z) const |
Private Attributes | |
std::vector< uint64_t > | mLayer0VoxelGrids |
std::vector< OctreeLayer > | mOctreeLayers |
voxelWorld | w |
Additional Inherited Members | |
Public Attributes inherited from Heuristic< voxelState > | |
std::vector< HeuristicTreeNode > | lookups |
std::vector< Heuristic * > | heuristics |
uint64_t | histogram [256] |
Protected Attributes inherited from SearchEnvironment< voxelState, voxelAction > | |
bool | bValidSearchGoal |
voxelState | searchGoal |
rgbColor | color |
GLfloat | transparency |
|
private |
Voxels::Voxels | ( | const char * | filename | ) |
Definition at line 38 of file Voxels.cpp.
References AddVoxelCubeToOctree(), GetCoordsForIndex(), GetVoxelCoordinate(), Voxels::voxelWorld::grid, Voxels::voxelWorld::header, max, Voxels::voxelWorld::maxbounds, Voxels::voxelWorld::minbounds, Voxels::voxelWorld::morton, Voxels::voxelWorld::numVoxelsGrids, point3d, Voxels::voxelWorld::voxelSize, and w.
Voxels::~Voxels | ( | ) |
Definition at line 107 of file Voxels.cpp.
|
private |
|
virtual |
Implements SearchEnvironment< voxelState, voxelAction >.
Definition at line 180 of file Voxels.cpp.
|
private |
Definition at line 347 of file Voxels.cpp.
Referenced by DecodeMorton3X(), DecodeMorton3Y(), and DecodeMorton3Z().
|
private |
Definition at line 357 of file Voxels.cpp.
References Compact1By2().
Referenced by GetVoxelCoordinate().
|
private |
Definition at line 362 of file Voxels.cpp.
References Compact1By2().
Referenced by GetVoxelCoordinate().
|
private |
Definition at line 367 of file Voxels.cpp.
References Compact1By2().
Referenced by GetVoxelCoordinate().
|
virtual |
Reimplemented from SearchEnvironment< voxelState, voxelAction >.
Definition at line 324 of file Voxels.cpp.
|
private |
Definition at line 341 of file Voxels.cpp.
References Part1By2().
void Voxels::Export | ( | const char * | filename | ) |
Definition at line 112 of file Voxels.cpp.
References GetCoordsForIndex(), GetVoxelCoordinate(), Voxels::voxelWorld::grid, max, Voxels::voxelWorld::maxbounds, min(), Voxels::voxelWorld::minbounds, Voxels::voxelWorld::morton, Voxels::voxelWorld::numVoxelsGrids, point3d, Voxels::voxelWorld::voxelSize, and w.
|
virtual |
Implements SearchEnvironment< voxelState, voxelAction >.
Definition at line 202 of file Voxels.cpp.
|
virtual |
Implements SearchEnvironment< voxelState, voxelAction >.
Definition at line 197 of file Voxels.cpp.
|
virtual |
Implements SearchEnvironment< voxelState, voxelAction >.
Definition at line 226 of file Voxels.cpp.
|
virtual |
Implements SearchEnvironment< voxelState, voxelAction >.
Definition at line 175 of file Voxels.cpp.
|
private |
Definition at line 377 of file Voxels.cpp.
Referenced by Export(), OpenGLDraw(), and Voxels().
|
private |
Definition at line 372 of file Voxels.cpp.
void Voxels::GetStateFromHash | ( | uint64_t | parent, |
voxelState & | s | ||
) |
Definition at line 218 of file Voxels.cpp.
References voxelState::x, voxelState::y, and voxelState::z.
|
virtual |
Implements SearchEnvironment< voxelState, voxelAction >.
Definition at line 213 of file Voxels.cpp.
|
virtual |
Implements SearchEnvironment< voxelState, voxelAction >.
Definition at line 170 of file Voxels.cpp.
|
private |
Definition at line 232 of file Voxels.cpp.
References DecodeMorton3X(), DecodeMorton3Y(), DecodeMorton3Z(), and point3d.
Referenced by Export(), OpenGLDraw(), and Voxels().
|
virtual |
Reimplemented from SearchEnvironment< voxelState, voxelAction >.
Definition at line 319 of file Voxels.cpp.
|
virtual |
Reimplemented from SearchEnvironment< voxelState, voxelAction >.
Definition at line 314 of file Voxels.cpp.
|
virtual |
Implements SearchEnvironment< voxelState, voxelAction >.
Definition at line 207 of file Voxels.cpp.
|
virtual |
Heuristic value between two arbitrary nodes.
Implements SearchEnvironment< voxelState, voxelAction >.
Definition at line 192 of file Voxels.cpp.
|
virtual |
Implements SearchEnvironment< voxelState, voxelAction >.
Definition at line 185 of file Voxels.cpp.
void Voxels::OpenGLDraw | ( | ) | const |
Definition at line 251 of file Voxels.cpp.
References rgbColor::b, DrawBox(), DrawBoxFrame(), rgbColor::g, Colors::GetColor(), GetCoordsForIndex(), GetVoxelCoordinate(), Voxels::voxelWorld::grid, max, Voxels::voxelWorld::maxbounds, Voxels::voxelWorld::minbounds, Voxels::voxelWorld::morton, Voxels::voxelWorld::numVoxelsGrids, point3d, rgbColor::r, Voxels::voxelWorld::voxelSize, and w.
|
virtual |
Reimplemented from SearchEnvironment< voxelState, voxelAction >.
Definition at line 299 of file Voxels.cpp.
|
virtual |
Reimplemented from SearchEnvironment< voxelState, voxelAction >.
Definition at line 309 of file Voxels.cpp.
|
virtual |
Draw the transition at some percentage 0...1 between two states.
Reimplemented from SearchEnvironment< voxelState, voxelAction >.
Definition at line 304 of file Voxels.cpp.
|
private |
Definition at line 331 of file Voxels.cpp.
Referenced by EncodeMorton3().
|
private |
Definition at line 103 of file Voxels.h.
Referenced by AddVoxelCubeToOctree().
|
private |
|
private |
Definition at line 117 of file Voxels.h.
Referenced by Export(), OpenGLDraw(), and Voxels().