Classes | Public Types | Public Member Functions | Protected Attributes | Static Protected Attributes
vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable Class Reference

#include <perfect_spatial_hashing.h>

List of all members.

Classes

struct  PreImage

Public Types

typedef vcg::Point3i EntryCoordinate
typedef vcg::Point3< OffsetTypeOffset
typedef OffsetOffsetPointer
typedef unsigned char OffsetType

Public Member Functions

void Allocate (int size)
void BuildH1PreImage (const typename UniformGrid::EntryIterator &begin, const typename UniformGrid::EntryIterator &end)
void Clear ()
EntryCoordinate DomainToOffsetTable (const typename UniformGrid::CellCoordinate &coord)
void Finalize ()
int GetNumberOfOccupiedCells () const
OffsetPointerGetOffset (const int i, const int j, const int k)
OffsetPointer GetOffset (const int i, const int j, const int k) const
OffsetPointerGetOffset (const EntryCoordinate &at)
OffsetPointer GetOffset (const EntryCoordinate &at) const
void GetPreImageSortedPerCardinality (std::list< PreImage > &pre_image)
void GetRandomOffset (Offset &offset)
int GetSize () const
bool IsFree (const EntryCoordinate &at) const
 OffsetTable ()
OffsetPointeroperator[] (const EntryCoordinate &at)
OffsetPointer operator[] (const EntryCoordinate &at) const
void SetOffset (const typename UniformGrid::CellCoordinate &coord, const Offset &offset)
void SuggestConsistentOffsets (const EntryCoordinate &at, std::vector< Offset > &offsets)
void ValidateEntryCoordinate (EntryCoordinate &entry)
 ~OffsetTable ()

Protected Attributes

int m_EntryPerSide
std::vector< std::vector
< std::vector< std::vector
< typename
UniformGrid::CellCoordinate > > > > 
m_H1PreImage
int m_NumberOfOccupiedEntries
std::vector< std::vector
< std::vector< OffsetPointer > > > 
m_Table

Static Protected Attributes

static const int m_MAX_VERSOR_LENGTH = 256

Detailed Description

template<class OBJECT_TYPE, class SCALAR_TYPE>
class vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable

This class containts the offsets used for shifting the access to the hash table.

Definition at line 665 of file perfect_spatial_hashing.h.


Member Typedef Documentation

template<class OBJECT_TYPE , class SCALAR_TYPE >
typedef vcg::Point3i vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::EntryCoordinate

Definition at line 671 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
typedef vcg::Point3<OffsetType> vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::Offset

Definition at line 669 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
typedef Offset* vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::OffsetPointer

Definition at line 670 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
typedef unsigned char vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::OffsetType

Definition at line 668 of file perfect_spatial_hashing.h.


Constructor & Destructor Documentation

template<class OBJECT_TYPE , class SCALAR_TYPE >
vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::OffsetTable ( ) [inline]

Default constructor

Definition at line 709 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::~OffsetTable ( ) [inline]

Destructor

Definition at line 714 of file perfect_spatial_hashing.h.


Member Function Documentation

template<class OBJECT_TYPE , class SCALAR_TYPE >
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::Allocate ( int  size) [inline]

Allocate the space necessary for a offset table containing size entries for each dimension and the necessary space for computing the relative anti-image.

Parameters:
[in]sizeThe number of entries per side to allocate.

Definition at line 739 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::BuildH1PreImage ( const typename UniformGrid::EntryIterator begin,
const typename UniformGrid::EntryIterator end 
) [inline]

Build the pre-image of the $h_1$ function: the m_H1PreImage grid contains, for each cell (i, j, k) a list of the domain grid (the UniformGrid) that are mapped through $h_1$ into that cell.

Definition at line 775 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::Clear ( void  ) [inline]

Clear the entries in the offset table and in the preimage table.

Definition at line 719 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
EntryCoordinate vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::DomainToOffsetTable ( const typename UniformGrid::CellCoordinate coord) [inline]

Converts the coordinate of a given cell in the UniformGrid to a valid entry in the offset table. This function corresponds to the $h_1$ function of the article.

Parameters:
[in]coordThe index of a domain cell in the UniformGrid.
Returns:
The coordinate of the entry corresponding to coord through this mapping.

Definition at line 850 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::Finalize ( ) [inline]

Definition at line 765 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
int vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::GetNumberOfOccupiedCells ( ) const [inline]

Return the number of entries containing a valid offset.

Returns:
The number of not empty entries.

Definition at line 905 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
OffsetPointer& vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::GetOffset ( const int  i,
const int  j,
const int  k 
) [inline]

Return the pointer to the offset stored at the given entry. NULL if that entry doesn't contain a offset

Definition at line 910 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
OffsetPointer vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::GetOffset ( const int  i,
const int  j,
const int  k 
) const [inline]

Definition at line 911 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
OffsetPointer& vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::GetOffset ( const EntryCoordinate at) [inline]

Definition at line 913 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
OffsetPointer vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::GetOffset ( const EntryCoordinate at) const [inline]

Definition at line 914 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::GetPreImageSortedPerCardinality ( std::list< PreImage > &  pre_image) [inline]

Sorts the entries of the PreImage table based on their cardinality.

Parameters:
[out]preimageThe list containing the entries of the preimage sorted by cardinality

Definition at line 792 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::GetRandomOffset ( Offset offset) [inline]

Return a random offset: this function is used during the first steps of the creation process, when the offsets are computed at random.

Parameters:
[out]Arandom offset

Definition at line 877 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
int vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::GetSize ( ) const [inline]

Return the number of entries of the offset table for each dimension.

Returns:
The number of entries for each side

Definition at line 889 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
bool vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::IsFree ( const EntryCoordinate at) const [inline]

Checks if the given entry in the offset table is free

Parameters:
[in]atThe coordinate of the entry to be checked.
Returns:
true if and only if the entry with coordinate at is free.

Definition at line 897 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
OffsetPointer& vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::operator[] ( const EntryCoordinate at) [inline]

Definition at line 916 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
OffsetPointer vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::operator[] ( const EntryCoordinate at) const [inline]

Definition at line 917 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::SetOffset ( const typename UniformGrid::CellCoordinate coord,
const Offset offset 
) [inline]

Adds a new element to the offset table.

Parameters:
[in]coordThe index of the UniformGrid cell whose offset has to be stored.
[in]offsetThe offset to associate to the given UniformGrid cell.

Definition at line 864 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::SuggestConsistentOffsets ( const EntryCoordinate at,
std::vector< Offset > &  offsets 
) [inline]

Check if the entries in the offset table near the given entry contain a valid offset.

Parameters:
[in]atThe entry of the offset table whose neighboring entries will be checked.
[out]offsetsThe set of consistent offset found by inspecting the neighboring entries.
Returns:
a vector containing possible offsets for the given entry

Definition at line 813 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
void vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::ValidateEntryCoordinate ( EntryCoordinate entry) [inline]

Assures that the given entry can be used to access the offset table without throwing an out-of-bound exception.

Parameters:
[in,out]entryThe entry to be checked.

Definition at line 837 of file perfect_spatial_hashing.h.


Member Data Documentation

template<class OBJECT_TYPE , class SCALAR_TYPE >
int vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::m_EntryPerSide [protected]

The resolution of the offset table.

Definition at line 921 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
std::vector< std::vector< std::vector< std::vector< typename UniformGrid::CellCoordinate > > > > vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::m_H1PreImage [protected]

The $f1$ pre-image.

Definition at line 924 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
const int vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::m_MAX_VERSOR_LENGTH = 256 [static, protected]

The maximal length of the single component of each offset.

Definition at line 920 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
int vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::m_NumberOfOccupiedEntries [protected]

The number of entries containing a valid offset.

Definition at line 922 of file perfect_spatial_hashing.h.

template<class OBJECT_TYPE , class SCALAR_TYPE >
std::vector< std::vector< std::vector< OffsetPointer > > > vcg::PerfectSpatialHashing< OBJECT_TYPE, SCALAR_TYPE >::OffsetTable::m_Table [protected]

The offset table.

Definition at line 923 of file perfect_spatial_hashing.h.


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


shape_reconstruction
Author(s): Roberto Martín-Martín
autogenerated on Sat Jun 8 2019 18:41:19