ground_segmentation 1.0
Ground segmentation in pointcloud
Loading...
Searching...
No Matches
ground_segmentation::Index3D Struct Reference

Integer 3D grid index used as key in hash map. More...

#include <ground_detection_types.hpp>

Classes

struct  HashFunction
 

Public Member Functions

 Index3D (int x, int y, int z)
 
 Index3D ()
 
bool operator== (const Index3D &oth) const
 
Index3D operator+ (Index3D const &obj) const
 

Public Attributes

int x
 
int y
 
int z
 

Detailed Description

Integer 3D grid index used as key in hash map.

Provides:

  • Hash function for unordered_map
  • Equality operator
  • Offset addition operator

Designed for efficient sparse 3D grid storage.

Definition at line 144 of file ground_detection_types.hpp.

Constructor & Destructor Documentation

◆ Index3D() [1/2]

ground_segmentation::Index3D::Index3D ( int  x,
int  y,
int  z 
)
inline

◆ Index3D() [2/2]

ground_segmentation::Index3D::Index3D ( )
inline

Definition at line 148 of file ground_detection_types.hpp.

149 {
150 x = std::numeric_limits<int>::min();
151 y = std::numeric_limits<int>::min();
152 z = std::numeric_limits<int>::min();
153 }

References x, y, and z.

Referenced by operator+().

Here is the caller graph for this function:

Member Function Documentation

◆ operator+()

Index3D ground_segmentation::Index3D::operator+ ( Index3D const &  obj) const
inline

Definition at line 169 of file ground_detection_types.hpp.

170 {
171 return Index3D(x + obj.x, y + obj.y, z + obj.z);
172 }

References Index3D(), x, y, and z.

Here is the call graph for this function:

◆ operator==()

bool ground_segmentation::Index3D::operator== ( const Index3D oth) const
inline

Definition at line 164 of file ground_detection_types.hpp.

165 {
166 return (x == oth.x) & (y == oth.y) & (z == oth.z); // use non-lazy `&` to avoid branching
167 }

References x, y, and z.

Member Data Documentation

◆ x

◆ y

◆ z


The documentation for this struct was generated from the following file: