PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::VoxelOctree< TDataType > Class Template Reference

#include <VoxelOctree.h>

Inheritance diagram for dyno::VoxelOctree< TDataType >:
Collaboration diagram for dyno::VoxelOctree< TDataType >:

Public Types

typedef TDataType::Real Real
 
typedef TDataType::Coord Coord
 
- Public Types inherited from dyno::TopologyModule
typedef PointType Point
 
typedef VectorND< PointType, 2 > Edge
 
typedef Vector< PointType, 3 > Triangle
 
typedef VectorND< PointType, 4 > Quad
 
typedef VectorND< PointType, 4 > Tetrahedron
 
typedef VectorND< PointType, 5 > Pyramid
 
typedef VectorND< PointType, 6 > Pentahedron
 
typedef VectorND< PointType, 8 > Hexahedron
 
typedef VectorND< PointType, 2 > Edg2Tri
 
typedef VectorND< PointType, 3 > Tri2Edg
 
typedef VectorND< PointType, 2 > Edg2Quad
 
typedef VectorND< PointType, 4 > Quad2Edg
 
typedef VectorND< PointType, 2 > Tri2Tet
 
typedef VectorND< PointType, 4 > Tet2Tri
 
typedef VectorND< PointType, 2 > Tri2Quad
 
typedef VectorND< PointType, 2 > Quad2Hex
 
typedef VectorND< PointType, 2 > Edg2Hex
 
typedef VectorND< PointType, 2 > Edg2Poly
 
- Public Types inherited from dyno::OBase
typedef std::vector< FBase * > FieldVector
 
typedef std::map< FieldID, FBase * > FieldMap
 

Public Member Functions

 VoxelOctree ()
 
 ~VoxelOctree () override
 
DYN_FUNC uint size () const
 
DYN_FUNC void setLevelNum (int num)
 
DYN_FUNC void setGrid (int nx, int ny, int nz)
 
DYN_FUNC void setDx (Real dx)
 
DYN_FUNC void setOrigin (Coord origin)
 
DYN_FUNC void setLevel0 (int level0)
 
DYN_FUNC int getLevelNum ()
 
DYN_FUNC Real getDx ()
 
DYN_FUNC Coord getOrigin ()
 
DYN_FUNC Coord getTopOrigin ()
 
DYN_FUNC int getLevel0 ()
 
DYN_FUNC void getGrid (int &nx, int &ny, int &nz)
 
GPU_FUNC VoxelOctreeNode< Coord > & operator[] (unsigned int id)
 
void setVoxelOctree (DArray< VoxelOctreeNode< Coord > > &oct)
 
GPU_FUNC void getNode (int point_i, int point_j, int point_k, VoxelOctreeNode< Coord > &node_index, int &id)
 
void getLeafs (DArray< Coord > &pos, DArray< int > &pos_pos)
 
void getCellVertices (DArray< Coord > &pos)
 
void getCellVertices0 (DArray< Coord > &pos)
 
void getCellVertices1 (DArray< Coord > &pos)
 
void getCellVertices2 (DArray< Coord > &pos)
 
void setSdfValues (DArray< Real > &vals)
 
DArray< Real > & getSdfValues ()
 
void getLeafsValue (DArray< Coord > &pos, DArray< Real > &val)
 
void updateNeighbors ()
 
DArray< VoxelOctreeNode< Coord > > & getVoxelOctree ()
 
DArrayList< int > & getNeighbors ()
 
void getSignDistance (DArray< Coord > point_pos, DArray< Real > &point_sdf, DArray< Coord > &point_normal, bool inverted=false)
 
void getSignDistanceKernel (DArray< Coord > point_pos, DArray< Real > &point_sdf)
 
void getSignDistanceMLS (DArray< Coord > point_pos, DArray< Real > &point_sdf, DArray< Coord > &point_normal, bool inverted=false)
 
- Public Member Functions inherited from dyno::TopologyModule
 TopologyModule ()
 
 ~TopologyModule () override
 
virtual int getDOF ()
 
void tagAsChanged ()
 
void tagAsUnchanged ()
 
bool isTopologyChanged ()
 
void update ()
 
- Public Member Functions inherited from dyno::OBase
 OBase ()
 
 ~OBase () override
 
virtual std::string caption ()
 Return the caption.
 
virtual bool captionVisible ()
 Whether to hide the caption in the GUI.
 
virtual std::string description ()
 Return a description for the node or module, override this function to support user-defined description.
 
virtual std::string getName ()
 
bool addField (FBase *data)
 Add a field to Base FieldID will be set to the name of Field by default.
 
bool addField (FieldID name, FBase *data)
 Add a field to Base.
 
bool addFieldAlias (FieldID name, FBase *data)
 
bool addFieldAlias (FieldID name, FBase *data, FieldMap &fieldAlias)
 
bool findField (FBase *data)
 Find a field by its pointer.
 
bool findFieldAlias (const FieldID name)
 Find a field by its name.
 
bool findFieldAlias (const FieldID name, FieldMap &fieldAlias)
 Find a field in fieldAlias by its name This function is typically called by other functions.
 
bool removeField (FBase *data)
 Remove a field by its pointer.
 
bool removeFieldAlias (const FieldID name)
 Remove a field by its name.
 
bool removeFieldAlias (const FieldID name, FieldMap &fieldAlias)
 
FBasegetField (const FieldID name)
 Return a field by its name.
 
std::vector< FBase * > & getAllFields ()
 
virtual bool attachField (FBase *field, std::string name, std::string desc, bool autoDestroy=true)
 Attach a field to Base.
 
template<typename T>
TgetField (FieldID name)
 
bool isAllFieldsReady ()
 Check the completeness of all required fields.
 
std::vector< FieldIDgetFieldAlias (FBase *data)
 
int getFieldAliasCount (FBase *data)
 
void setBlockCoord (float x, float y)
 
float bx ()
 
float by ()
 
bool findInputField (FBase *field)
 
bool addInputField (FBase *field)
 
bool removeInputField (FBase *field)
 
std::vector< FBase * > & getInputFields ()
 
bool findOutputField (FBase *field)
 
bool addOutputField (FBase *field)
 
bool addToOutput (FBase *field)
 
bool removeOutputField (FBase *field)
 
bool removeFromOutput (FBase *field)
 
std::vector< FBase * > & getOutputFields ()
 
bool findParameter (FBase *field)
 
bool addParameter (FBase *field)
 
bool removeParameter (FBase *field)
 
std::vector< FBase * > & getParameters ()
 
- Public Member Functions inherited from dyno::Object
 Object ()
 
virtual ~Object ()
 
ObjectId objectId ()
 

Private Attributes

int m_nx
 
int m_ny
 
int m_nz
 
int level_num = 3
 
int m_level0
 
Real m_dx
 
Coord m_origin
 
DArray< VoxelOctreeNode< Coord > > m_octree
 
DArray< RealsdfValues
 
DArrayList< int > m_neighbors
 

Additional Inherited Members

- Static Public Member Functions inherited from dyno::Object
static bool registerClass (ClassInfo *ci)
 
static ObjectcreateObject (std::string name)
 
static std::map< std::string, ClassInfo * > * getClassMap ()
 
static ObjectId baseId ()
 Base Id.
 
- Protected Member Functions inherited from dyno::TopologyModule
virtual void updateTopology ()
 
- Protected Attributes inherited from dyno::OBase
std::vector< FBase * > fields_input
 
std::vector< FBase * > fields_output
 
std::vector< FBase * > fields_param
 

Detailed Description

template<typename TDataType>
class dyno::VoxelOctree< TDataType >

Definition at line 199 of file VoxelOctree.h.

Member Typedef Documentation

◆ Coord

template<typename TDataType>
typedef TDataType::Coord dyno::VoxelOctree< TDataType >::Coord

Definition at line 204 of file VoxelOctree.h.

◆ Real

template<typename TDataType>
typedef TDataType::Real dyno::VoxelOctree< TDataType >::Real

Definition at line 203 of file VoxelOctree.h.

Constructor & Destructor Documentation

◆ VoxelOctree()

template<typename TDataType>
dyno::VoxelOctree< TDataType >::VoxelOctree ( )

◆ ~VoxelOctree()

template<typename TDataType>
dyno::VoxelOctree< TDataType >::~VoxelOctree ( )
override

Member Function Documentation

◆ getCellVertices()

template<typename TDataType>
void dyno::VoxelOctree< TDataType >::getCellVertices ( DArray< Coord > & pos)

◆ getCellVertices0()

template<typename TDataType>
void dyno::VoxelOctree< TDataType >::getCellVertices0 ( DArray< Coord > & pos)

◆ getCellVertices1()

template<typename TDataType>
void dyno::VoxelOctree< TDataType >::getCellVertices1 ( DArray< Coord > & pos)

◆ getCellVertices2()

template<typename TDataType>
void dyno::VoxelOctree< TDataType >::getCellVertices2 ( DArray< Coord > & pos)

◆ getDx()

template<typename TDataType>
DYN_FUNC Real dyno::VoxelOctree< TDataType >::getDx ( )
inline

Definition at line 219 of file VoxelOctree.h.

◆ getGrid()

template<typename TDataType>
DYN_FUNC void dyno::VoxelOctree< TDataType >::getGrid ( int & nx,
int & ny,
int & nz )
inline

Definition at line 223 of file VoxelOctree.h.

◆ getLeafs()

template<typename TDataType>
void dyno::VoxelOctree< TDataType >::getLeafs ( DArray< Coord > & pos,
DArray< int > & pos_pos )

◆ getLeafsValue()

template<typename TDataType>
void dyno::VoxelOctree< TDataType >::getLeafsValue ( DArray< Coord > & pos,
DArray< Real > & val )

◆ getLevel0()

template<typename TDataType>
DYN_FUNC int dyno::VoxelOctree< TDataType >::getLevel0 ( )
inline

Definition at line 222 of file VoxelOctree.h.

◆ getLevelNum()

template<typename TDataType>
DYN_FUNC int dyno::VoxelOctree< TDataType >::getLevelNum ( )
inline

Definition at line 218 of file VoxelOctree.h.

◆ getNeighbors()

template<typename TDataType>
DArrayList< int > & dyno::VoxelOctree< TDataType >::getNeighbors ( )
inline

Definition at line 289 of file VoxelOctree.h.

◆ getNode()

template<typename TDataType>
GPU_FUNC void dyno::VoxelOctree< TDataType >::getNode ( int point_i,
int point_j,
int point_k,
VoxelOctreeNode< Coord > & node_index,
int & id )
inline

Definition at line 231 of file VoxelOctree.h.

Here is the call graph for this function:

◆ getOrigin()

template<typename TDataType>
DYN_FUNC Coord dyno::VoxelOctree< TDataType >::getOrigin ( )
inline

Definition at line 220 of file VoxelOctree.h.

◆ getSdfValues()

template<typename TDataType>
DArray< Real > & dyno::VoxelOctree< TDataType >::getSdfValues ( )
inline

Definition at line 278 of file VoxelOctree.h.

◆ getSignDistance()

template<typename TDataType>
void dyno::VoxelOctree< TDataType >::getSignDistance ( DArray< Coord > point_pos,
DArray< Real > & point_sdf,
DArray< Coord > & point_normal,
bool inverted = false )

◆ getSignDistanceKernel()

template<typename TDataType>
void dyno::VoxelOctree< TDataType >::getSignDistanceKernel ( DArray< Coord > point_pos,
DArray< Real > & point_sdf )

◆ getSignDistanceMLS()

template<typename TDataType>
void dyno::VoxelOctree< TDataType >::getSignDistanceMLS ( DArray< Coord > point_pos,
DArray< Real > & point_sdf,
DArray< Coord > & point_normal,
bool inverted = false )

◆ getTopOrigin()

template<typename TDataType>
DYN_FUNC Coord dyno::VoxelOctree< TDataType >::getTopOrigin ( )
inline

Definition at line 221 of file VoxelOctree.h.

◆ getVoxelOctree()

template<typename TDataType>
DArray< VoxelOctreeNode< Coord > > & dyno::VoxelOctree< TDataType >::getVoxelOctree ( )
inline

Definition at line 288 of file VoxelOctree.h.

◆ operator[]()

template<typename TDataType>
GPU_FUNC VoxelOctreeNode< Coord > & dyno::VoxelOctree< TDataType >::operator[] ( unsigned int id)
inline

Definition at line 225 of file VoxelOctree.h.

◆ setDx()

template<typename TDataType>
DYN_FUNC void dyno::VoxelOctree< TDataType >::setDx ( Real dx)
inline

Definition at line 214 of file VoxelOctree.h.

◆ setGrid()

template<typename TDataType>
DYN_FUNC void dyno::VoxelOctree< TDataType >::setGrid ( int nx,
int ny,
int nz )
inline

Definition at line 213 of file VoxelOctree.h.

◆ setLevel0()

template<typename TDataType>
DYN_FUNC void dyno::VoxelOctree< TDataType >::setLevel0 ( int level0)
inline

Definition at line 216 of file VoxelOctree.h.

◆ setLevelNum()

template<typename TDataType>
DYN_FUNC void dyno::VoxelOctree< TDataType >::setLevelNum ( int num)
inline

Definition at line 212 of file VoxelOctree.h.

◆ setOrigin()

template<typename TDataType>
DYN_FUNC void dyno::VoxelOctree< TDataType >::setOrigin ( Coord origin)
inline

Definition at line 215 of file VoxelOctree.h.

◆ setSdfValues()

template<typename TDataType>
void dyno::VoxelOctree< TDataType >::setSdfValues ( DArray< Real > & vals)

◆ setVoxelOctree()

template<typename TDataType>
void dyno::VoxelOctree< TDataType >::setVoxelOctree ( DArray< VoxelOctreeNode< Coord > > & oct)

◆ size()

template<typename TDataType>
DYN_FUNC uint dyno::VoxelOctree< TDataType >::size ( ) const
inline

Definition at line 210 of file VoxelOctree.h.

◆ updateNeighbors()

template<typename TDataType>
void dyno::VoxelOctree< TDataType >::updateNeighbors ( )

Member Data Documentation

◆ level_num

template<typename TDataType>
int dyno::VoxelOctree< TDataType >::level_num = 3
private

Definition at line 313 of file VoxelOctree.h.

◆ m_dx

template<typename TDataType>
Real dyno::VoxelOctree< TDataType >::m_dx
private

Definition at line 316 of file VoxelOctree.h.

◆ m_level0

template<typename TDataType>
int dyno::VoxelOctree< TDataType >::m_level0
private

Definition at line 314 of file VoxelOctree.h.

◆ m_neighbors

template<typename TDataType>
DArrayList<int> dyno::VoxelOctree< TDataType >::m_neighbors
private

Definition at line 321 of file VoxelOctree.h.

◆ m_nx

template<typename TDataType>
int dyno::VoxelOctree< TDataType >::m_nx
private

Definition at line 309 of file VoxelOctree.h.

◆ m_ny

template<typename TDataType>
int dyno::VoxelOctree< TDataType >::m_ny
private

Definition at line 310 of file VoxelOctree.h.

◆ m_nz

template<typename TDataType>
int dyno::VoxelOctree< TDataType >::m_nz
private

Definition at line 311 of file VoxelOctree.h.

◆ m_octree

template<typename TDataType>
DArray<VoxelOctreeNode<Coord> > dyno::VoxelOctree< TDataType >::m_octree
private

Definition at line 319 of file VoxelOctree.h.

◆ m_origin

template<typename TDataType>
Coord dyno::VoxelOctree< TDataType >::m_origin
private

Definition at line 317 of file VoxelOctree.h.

◆ sdfValues

template<typename TDataType>
DArray<Real> dyno::VoxelOctree< TDataType >::sdfValues
private

Definition at line 320 of file VoxelOctree.h.


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