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

#include <VolumeOctreeBoolean.h>

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

Public Types

typedef TDataType::Real Real
 
typedef TDataType::Coord Coord
 
typedef TopologyModule::Triangle Triangle
 
- Public Types inherited from dyno::VolumeOctree< TDataType >
typedef TDataType::Real Real
 
typedef TDataType::Coord Coord
 
- Public Types inherited from dyno::Node
template<class T>
using SPtr = std::shared_ptr<T>
 
- Public Types inherited from dyno::OBase
typedef std::vector< FBase * > FieldVector
 
typedef std::map< FieldID, FBase * > FieldMap
 

Public Member Functions

 DECLARE_ENUM (BooleanOperation, UNION_SET=0, INTERSECTION_SET=1, SUBTRACTION_SET=2)
 
 VolumeOctreeBoolean ()
 
 ~VolumeOctreeBoolean () override
 
 DEF_NODE_PORT (VolumeOctree< TDataType >, OctreeA, "Volume Octree A")
 
 DEF_NODE_PORT (VolumeOctree< TDataType >, OctreeB, "Volume Octree B")
 
 DEF_VAR (bool, MinDx, true, "")
 
 DEF_ENUM (BooleanOperation, BooleanType, BooleanOperation::INTERSECTION_SET, "Boolean operation type")
 
- Public Member Functions inherited from dyno::VolumeOctree< TDataType >
 VolumeOctree ()
 
 ~VolumeOctree () override
 
virtual void updateVolume ()
 
virtual Real dx ()
 
std::string getNodeType () override
 
 DEF_VAR (bool, Inverted, false, "")
 
 DEF_VAR (int, LevelNumber, 3, "Number of Adaptive Levels")
 
 DEF_INSTANCE_STATE (VoxelOctree< TDataType >, SDFTopology, "SDF Voxel Octree")
 
- Public Member Functions inherited from dyno::Node
 Node ()
 
 ~Node () override
 
void setName (std::string name)
 
std::string getName () override
 
bool isAutoSync ()
 
bool isAutoHidden ()
 
void setAutoSync (bool con)
 Whether the node can be automatically synchronized when its ancestor is updated.
 
void setAutoHidden (bool con)
 
virtual bool isActive ()
 Check the state of dynamics.
 
virtual void setActive (bool active)
 Set the state of dynamics.
 
virtual bool isVisible ()
 Check the visibility of context.
 
virtual void setVisible (bool visible)
 Set the visibility of context.
 
virtual Real getDt ()
 Simulation timestep.
 
void setDt (Real dt)
 
void setSceneGraph (SceneGraph *scn)
 
SceneGraphgetSceneGraph ()
 
std::vector< NodePort * > & getImportNodes ()
 
std::vector< NodePort * > & getExportNodes ()
 
bool addModule (std::shared_ptr< Module > module)
 Add a module to m_module_list and other special module lists.
 
bool deleteModule (std::shared_ptr< Module > module)
 
template<class TModule>
bool addModule (std::shared_ptr< TModule > tModule)
 Add a speical kind of module.
 
template<class TModule>
bool deleteModule (std::shared_ptr< TModule > tModule)
 
std::list< std::shared_ptr< Module > > & getModuleList ()
 
bool hasModule (std::string name)
 
std::shared_ptr< ModulegetModule (std::string name)
 Get a module by its name.
 
template<class TModule>
std::shared_ptr< TModule > getModule ()
 Get the Module by the module class name.
 
template<class TModule>
std::shared_ptr< TModule > getModule (std::string name)
 
std::shared_ptr< PipelineresetPipeline ()
 
std::shared_ptr< AnimationPipelineanimationPipeline ()
 
std::shared_ptr< GraphicsPipelinegraphicsPipeline ()
 
template<class TModule>
std::shared_ptr< TModule > addModule (std::string name)
 
void update ()
 Called every time interval.
 
void updateGraphicsContext ()
 
void reset ()
 
virtual NBoundingBox boundingBox ()
 
bool connect (NodePort *nPort)
 Depth-first tree traversal.
 
bool disconnect (NodePort *nPort)
 
bool attachField (FBase *field, std::string name, std::string desc, bool autoDestroy=true) override
 Attach a field to Node.
 
std::vector< NodePort * > & getAllNodePorts ()
 
uint sizeOfNodePorts ()
 
uint sizeOfImportNodes () const
 
uint sizeOfExportNodes () const
 
void setForceUpdate (bool b)
 
 DEF_VAR_STATE (Real, ElapsedTime, 0, "Elapsed Time")
 
 DEF_VAR_STATE (Real, TimeStep, Real(0.033), "Time step size")
 
 DEF_VAR_STATE (uint, FrameNumber, 0, "Frame number")
 
- 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.
 
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 ()
 
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 ()
 

Protected Member Functions

Coord lowerBound () override
 
Coord upperBound () override
 
bool validateInputs () override
 
void resetStates () override
 
void updateStates () override
 
void initParameter ()
 
void updateSignOperation ()
 
- Protected Member Functions inherited from dyno::Node
bool appendExportNode (NodePort *nodePort)
 
bool removeExportNode (NodePort *nodePort)
 
virtual void preUpdateStates ()
 
virtual void postUpdateStates ()
 
virtual void updateTopology ()
 
virtual bool requireUpdate ()
 
void tick ()
 notify all state and output fields are updated
 

Private Attributes

int m_offset_ax
 
int m_offset_ay
 
int m_offset_az
 
int m_offset_bx
 
int m_offset_by
 
int m_offset_bz
 
int m_nx
 
int m_ny
 
int m_nz
 
Real m_dx
 
Coord m_origin
 
int m_level0 = 0
 
int m_reconstructed_model = EMPTY
 

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.
 
- Public Attributes inherited from dyno::VolumeOctree< TDataType >
DArray< Coordm_object
 
DArray< Coordm_normal
 
- Public Attributes inherited from dyno::Node
std::string m_node_name
 
- 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::VolumeOctreeBoolean< TDataType >

Definition at line 29 of file VolumeOctreeBoolean.h.

Member Typedef Documentation

◆ Coord

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

Definition at line 34 of file VolumeOctreeBoolean.h.

◆ Real

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

Definition at line 33 of file VolumeOctreeBoolean.h.

◆ Triangle

template<typename TDataType>
typedef TopologyModule::Triangle dyno::VolumeOctreeBoolean< TDataType >::Triangle

Definition at line 35 of file VolumeOctreeBoolean.h.

Constructor & Destructor Documentation

◆ VolumeOctreeBoolean()

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

Definition at line 17 of file VolumeOctreeBoolean.cpp.

Here is the call graph for this function:

◆ ~VolumeOctreeBoolean()

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

Definition at line 37 of file VolumeOctreeBoolean.cpp.

Member Function Documentation

◆ DECLARE_ENUM()

template<typename TDataType>
dyno::VolumeOctreeBoolean< TDataType >::DECLARE_ENUM ( BooleanOperation ,
UNION_SET = 0,
INTERSECTION_SET = 1,
SUBTRACTION_SET = 2 )

◆ DEF_ENUM()

template<typename TDataType>
dyno::VolumeOctreeBoolean< TDataType >::DEF_ENUM ( BooleanOperation ,
BooleanType ,
BooleanOperation::INTERSECTION_SET ,
"Boolean operation type"  )

◆ DEF_NODE_PORT() [1/2]

template<typename TDataType>
dyno::VolumeOctreeBoolean< TDataType >::DEF_NODE_PORT ( VolumeOctree< TDataType > ,
OctreeA ,
"Volume Octree A"  )
Here is the call graph for this function:

◆ DEF_NODE_PORT() [2/2]

template<typename TDataType>
dyno::VolumeOctreeBoolean< TDataType >::DEF_NODE_PORT ( VolumeOctree< TDataType > ,
OctreeB ,
"Volume Octree B"  )
Here is the call graph for this function:

◆ DEF_VAR()

template<typename TDataType>
dyno::VolumeOctreeBoolean< TDataType >::DEF_VAR ( bool ,
MinDx ,
true ,
""  )

◆ initParameter()

template<typename TDataType>
void dyno::VolumeOctreeBoolean< TDataType >::initParameter ( )
protected

Definition at line 42 of file VolumeOctreeBoolean.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ lowerBound()

template<typename TDataType>
Coord dyno::VolumeOctreeBoolean< TDataType >::lowerBound ( )
inlineoverrideprotectedvirtual

Reimplemented from dyno::VolumeOctree< TDataType >.

Definition at line 55 of file VolumeOctreeBoolean.h.

◆ resetStates()

template<typename TDataType>
void dyno::VolumeOctreeBoolean< TDataType >::resetStates ( )
overrideprotectedvirtual

Reimplemented from dyno::Node.

Definition at line 200 of file VolumeOctreeBoolean.cpp.

Here is the call graph for this function:

◆ updateSignOperation()

template<typename TDataType>
void dyno::VolumeOctreeBoolean< TDataType >::updateSignOperation ( )
protected

Definition at line 165 of file VolumeOctreeBoolean.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ updateStates()

template<typename TDataType>
void dyno::VolumeOctreeBoolean< TDataType >::updateStates ( )
overrideprotectedvirtual

Reimplemented from dyno::Node.

Definition at line 155 of file VolumeOctreeBoolean.cpp.

◆ upperBound()

template<typename TDataType>
Coord dyno::VolumeOctreeBoolean< TDataType >::upperBound ( )
inlineoverrideprotectedvirtual

Reimplemented from dyno::VolumeOctree< TDataType >.

Definition at line 56 of file VolumeOctreeBoolean.h.

◆ validateInputs()

template<typename TDataType>
bool dyno::VolumeOctreeBoolean< TDataType >::validateInputs ( )
overrideprotectedvirtual

Reimplemented from dyno::Node.

Definition at line 743 of file VolumeOctreeBoolean.cpp.

Here is the call graph for this function:

Member Data Documentation

◆ m_dx

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

Definition at line 76 of file VolumeOctreeBoolean.h.

◆ m_level0

template<typename TDataType>
int dyno::VolumeOctreeBoolean< TDataType >::m_level0 = 0
private

Definition at line 78 of file VolumeOctreeBoolean.h.

◆ m_nx

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

Definition at line 73 of file VolumeOctreeBoolean.h.

◆ m_ny

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

Definition at line 74 of file VolumeOctreeBoolean.h.

◆ m_nz

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

Definition at line 75 of file VolumeOctreeBoolean.h.

◆ m_offset_ax

template<typename TDataType>
int dyno::VolumeOctreeBoolean< TDataType >::m_offset_ax
private

Definition at line 70 of file VolumeOctreeBoolean.h.

◆ m_offset_ay

template<typename TDataType>
int dyno::VolumeOctreeBoolean< TDataType >::m_offset_ay
private

Definition at line 70 of file VolumeOctreeBoolean.h.

◆ m_offset_az

template<typename TDataType>
int dyno::VolumeOctreeBoolean< TDataType >::m_offset_az
private

Definition at line 70 of file VolumeOctreeBoolean.h.

◆ m_offset_bx

template<typename TDataType>
int dyno::VolumeOctreeBoolean< TDataType >::m_offset_bx
private

Definition at line 71 of file VolumeOctreeBoolean.h.

◆ m_offset_by

template<typename TDataType>
int dyno::VolumeOctreeBoolean< TDataType >::m_offset_by
private

Definition at line 71 of file VolumeOctreeBoolean.h.

◆ m_offset_bz

template<typename TDataType>
int dyno::VolumeOctreeBoolean< TDataType >::m_offset_bz
private

Definition at line 71 of file VolumeOctreeBoolean.h.

◆ m_origin

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

Definition at line 77 of file VolumeOctreeBoolean.h.

◆ m_reconstructed_model

template<typename TDataType>
int dyno::VolumeOctreeBoolean< TDataType >::m_reconstructed_model = EMPTY
private

Definition at line 80 of file VolumeOctreeBoolean.h.


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