HOG2
Classes | Enumerations | Functions
VoxelUtils Namespace Reference

Classes

struct  Point3D
 
struct  triangle
 
struct  vn
 
struct  work
 

Enumerations

enum  plane {
  xPositive, xNegative, yPositive, yNegative,
  zPositive, zNegative
}
 

Functions

bool operator== (const triangle &a, const triangle &b)
 
bool operator== (const vn &a, const vn &b)
 
void ThreadedWorker (VoxelGrid *s, std::vector< triangle > &data, SharedQueue< work > &queue, std::mutex &lock)
 
void PXHelper (VoxelGrid *s, int x, int y, int ymax, int z, int zmax, std::vector< triangle > &data)
 
void AddPXFace (VoxelGrid *s, int x, std::vector< triangle > &data)
 
void NXHelper (VoxelGrid *s, int x, int y, int ymax, int z, int zmax, std::vector< triangle > &data)
 
void AddNXFace (VoxelGrid *s, int x, std::vector< triangle > &data)
 
void PYHelper (VoxelGrid *s, int x, int xmax, int y, int z, int zmax, std::vector< triangle > &data)
 
void AddPYFace (VoxelGrid *s, int y, std::vector< triangle > &data)
 
void NYHelper (VoxelGrid *s, int x, int xmax, int y, int z, int zmax, std::vector< triangle > &data)
 
void AddNYFace (VoxelGrid *s, int y, std::vector< triangle > &data)
 
void PZHelper (VoxelGrid *s, int x, int xmax, int y, int ymax, int z, std::vector< triangle > &data)
 
void AddPZFace (VoxelGrid *s, int z, std::vector< triangle > &data)
 
void NZHelper (VoxelGrid *s, int x, int xmax, int y, int ymax, int z, std::vector< triangle > &data)
 
void AddNZFace (VoxelGrid *s, int z, std::vector< triangle > &data)
 
void GetTriangles (VoxelGrid *s, std::vector< triangle > &data)
 
triangle MakeTriangle (Point3D normal, Point3D v1, Point3D v2, Point3D v3)
 
int XMaxSquare (VoxelGrid *s, int x, int y, int ymax, int z, int zmax, int xOffset)
 
std::pair< int, int > XMaxRect (VoxelGrid *s, int x, int y, int ymax, int z, int zmax, int xOffset)
 
int YMaxSquare (VoxelGrid *s, int x, int xmax, int y, int z, int zmax, int yOffset)
 
std::pair< int, int > YMaxRect (VoxelGrid *s, int x, int xmax, int y, int z, int zmax, int yOffset)
 
int ZMaxSquare (VoxelGrid *s, int x, int xmax, int y, int ymax, int z, int zOffset)
 
std::pair< int, int > ZMaxRect (VoxelGrid *s, int x, int xmax, int y, int ymax, int z, int zOffset)
 

Enumeration Type Documentation

◆ plane

Enumerator
xPositive 
xNegative 
yPositive 
yNegative 
zPositive 
zNegative 

Definition at line 17 of file VoxelTriangleExtraction.cpp.

Function Documentation

◆ AddNXFace()

void VoxelUtils::AddNXFace ( VoxelGrid s,
int  x,
std::vector< triangle > &  data 
)

Definition at line 299 of file VoxelTriangleExtraction.cpp.

References VoxelGrid::GetLimits(), and NXHelper().

Referenced by ThreadedWorker().

◆ AddNYFace()

void VoxelUtils::AddNYFace ( VoxelGrid s,
int  y,
std::vector< triangle > &  data 
)

Definition at line 444 of file VoxelTriangleExtraction.cpp.

References VoxelGrid::GetLimits(), and NYHelper().

Referenced by ThreadedWorker().

◆ AddNZFace()

void VoxelUtils::AddNZFace ( VoxelGrid s,
int  z,
std::vector< triangle > &  data 
)

Definition at line 590 of file VoxelTriangleExtraction.cpp.

References VoxelGrid::GetLimits(), and NZHelper().

Referenced by ThreadedWorker().

◆ AddPXFace()

void VoxelUtils::AddPXFace ( VoxelGrid s,
int  x,
std::vector< triangle > &  data 
)

Definition at line 267 of file VoxelTriangleExtraction.cpp.

References VoxelGrid::GetLimits(), and PXHelper().

Referenced by ThreadedWorker().

◆ AddPYFace()

void VoxelUtils::AddPYFace ( VoxelGrid s,
int  y,
std::vector< triangle > &  data 
)

Definition at line 413 of file VoxelTriangleExtraction.cpp.

References VoxelGrid::GetLimits(), and PYHelper().

Referenced by ThreadedWorker().

◆ AddPZFace()

void VoxelUtils::AddPZFace ( VoxelGrid s,
int  z,
std::vector< triangle > &  data 
)

Definition at line 558 of file VoxelTriangleExtraction.cpp.

References VoxelGrid::GetLimits(), and PZHelper().

Referenced by ThreadedWorker().

◆ GetTriangles()

void VoxelUtils::GetTriangles ( VoxelGrid s,
std::vector< triangle > &  data 
)

◆ MakeTriangle()

triangle VoxelUtils::MakeTriangle ( Point3D  normal,
Point3D  v1,
Point3D  v2,
Point3D  v3 
)

◆ NXHelper()

void VoxelUtils::NXHelper ( VoxelGrid s,
int  x,
int  y,
int  ymax,
int  z,
int  zmax,
std::vector< triangle > &  data 
)

Definition at line 275 of file VoxelTriangleExtraction.cpp.

References MakeTriangle(), and XMaxRect().

Referenced by AddNXFace().

◆ NYHelper()

void VoxelUtils::NYHelper ( VoxelGrid s,
int  x,
int  xmax,
int  y,
int  z,
int  zmax,
std::vector< triangle > &  data 
)

Definition at line 420 of file VoxelTriangleExtraction.cpp.

References MakeTriangle(), and YMaxRect().

Referenced by AddNYFace().

◆ NZHelper()

void VoxelUtils::NZHelper ( VoxelGrid s,
int  x,
int  xmax,
int  y,
int  ymax,
int  z,
std::vector< triangle > &  data 
)

Definition at line 565 of file VoxelTriangleExtraction.cpp.

References MakeTriangle(), and ZMaxRect().

Referenced by AddNZFace().

◆ operator==() [1/2]

bool VoxelUtils::operator== ( const triangle a,
const triangle b 
)

◆ operator==() [2/2]

bool VoxelUtils::operator== ( const vn a,
const vn b 
)

Definition at line 46 of file VoxelTriangleExtraction.cpp.

References VoxelUtils::vn::normal, and VoxelUtils::vn::v.

◆ PXHelper()

void VoxelUtils::PXHelper ( VoxelGrid s,
int  x,
int  y,
int  ymax,
int  z,
int  zmax,
std::vector< triangle > &  data 
)

Definition at line 243 of file VoxelTriangleExtraction.cpp.

References MakeTriangle(), and XMaxRect().

Referenced by AddPXFace().

◆ PYHelper()

void VoxelUtils::PYHelper ( VoxelGrid s,
int  x,
int  xmax,
int  y,
int  z,
int  zmax,
std::vector< triangle > &  data 
)

Definition at line 389 of file VoxelTriangleExtraction.cpp.

References MakeTriangle(), and YMaxRect().

Referenced by AddPYFace().

◆ PZHelper()

void VoxelUtils::PZHelper ( VoxelGrid s,
int  x,
int  xmax,
int  y,
int  ymax,
int  z,
std::vector< triangle > &  data 
)

Definition at line 534 of file VoxelTriangleExtraction.cpp.

References MakeTriangle(), and ZMaxRect().

Referenced by AddPZFace().

◆ ThreadedWorker()

void VoxelUtils::ThreadedWorker ( VoxelGrid s,
std::vector< triangle > &  data,
SharedQueue< work > &  queue,
std::mutex &  lock 
)

◆ XMaxRect()

std::pair<int, int> VoxelUtils::XMaxRect ( VoxelGrid s,
int  x,
int  y,
int  ymax,
int  z,
int  zmax,
int  xOffset 
)

Definition at line 188 of file VoxelTriangleExtraction.cpp.

References VoxelGrid::IsBlocked(), and XMaxSquare().

Referenced by NXHelper(), and PXHelper().

◆ XMaxSquare()

int VoxelUtils::XMaxSquare ( VoxelGrid s,
int  x,
int  y,
int  ymax,
int  z,
int  zmax,
int  xOffset 
)

Definition at line 159 of file VoxelTriangleExtraction.cpp.

References VoxelGrid::IsBlocked().

Referenced by XMaxRect().

◆ YMaxRect()

std::pair<int, int> VoxelUtils::YMaxRect ( VoxelGrid s,
int  x,
int  xmax,
int  y,
int  z,
int  zmax,
int  yOffset 
)

Definition at line 335 of file VoxelTriangleExtraction.cpp.

References VoxelGrid::IsBlocked(), and YMaxSquare().

Referenced by NYHelper(), and PYHelper().

◆ YMaxSquare()

int VoxelUtils::YMaxSquare ( VoxelGrid s,
int  x,
int  xmax,
int  y,
int  z,
int  zmax,
int  yOffset 
)

Definition at line 306 of file VoxelTriangleExtraction.cpp.

References VoxelGrid::IsBlocked().

Referenced by YMaxRect().

◆ ZMaxRect()

std::pair<int, int> VoxelUtils::ZMaxRect ( VoxelGrid s,
int  x,
int  xmax,
int  y,
int  ymax,
int  z,
int  zOffset 
)

Definition at line 480 of file VoxelTriangleExtraction.cpp.

References VoxelGrid::IsBlocked(), and ZMaxSquare().

Referenced by NZHelper(), and PZHelper().

◆ ZMaxSquare()

int VoxelUtils::ZMaxSquare ( VoxelGrid s,
int  x,
int  xmax,
int  y,
int  ymax,
int  z,
int  zOffset 
)

Definition at line 451 of file VoxelTriangleExtraction.cpp.

References VoxelGrid::IsBlocked().

Referenced by ZMaxRect().