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

#include <NormalVisualization.h>

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

Public Types

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

 NormalVisualization ()
 
 ~NormalVisualization ()
 
std::string getNodeType () override
 
 DEF_VAR (Real, Length, 0.2, "LinLength")
 
 DEF_VAR (bool, Normalize, true, "Normalize")
 
 DEF_VAR (Real, LineWidth, 0.01, " LineWidth")
 
 DEF_VAR (bool, ShowWireframe, true, "ShowWireframe")
 
 DEF_VAR (int, ArrowResolution, 8, "")
 
 DEF_INSTANCE_IN (TriangleSet< TDataType >, TriangleSet, "")
 
 DEF_ARRAY_IN (Coord, InNormal, DeviceType::GPU, "")
 
 DEF_ARRAY_IN (Real, Scalar, DeviceType::GPU, "")
 
 DEF_INSTANCE_STATE (EdgeSet< TDataType >, NormalSet, "")
 
 DEF_ARRAY_STATE (Coord, Normal, DeviceType::GPU, "")
 
 DEF_INSTANCE_STATE (PointSet< TDataType >, TriangleCenter, "")
 
 DEF_INSTANCE_STATE (TriangleSet< TDataType >, ArrowCylinder, "")
 
 DEF_INSTANCE_STATE (TriangleSet< TDataType >, ArrowCone, "")
 
 DEF_ARRAY_STATE (Transform3f, TransformsCylinder, DeviceType::GPU, "Instance transform")
 
 DEF_ARRAY_STATE (Transform3f, TransformsCone, DeviceType::GPU, "Instance transform")
 
- 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

void resetStates () override
 
void updateStates () override
 
- 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 validateInputs ()
 
virtual bool requireUpdate ()
 
void tick ()
 notify all state and output fields are updated
 

Private Member Functions

 DECLARE_TCLASS (Normal, TDataType)
 
void varChanged ()
 
void renderChanged ()
 

Private Attributes

std::shared_ptr< GLInstanceVisualModuleglInstanceCylinder
 
std::shared_ptr< GLInstanceVisualModuleglInstanceCone
 
DArray< Coordd_points
 
DArray< TopologyModule::Edged_edges
 
DArray< Coordd_normalPt
 
DArray< Coordd_normal
 
DArray< CoordtriangleCenter
 

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::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::NormalVisualization< TDataType >

Definition at line 30 of file NormalVisualization.h.

Member Typedef Documentation

◆ Coord

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

Definition at line 36 of file NormalVisualization.h.

◆ Real

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

Definition at line 35 of file NormalVisualization.h.

Constructor & Destructor Documentation

◆ NormalVisualization()

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

◆ ~NormalVisualization()

template<typename TDataType>
dyno::NormalVisualization< TDataType >::~NormalVisualization ( )
inline

Definition at line 39 of file NormalVisualization.h.

Member Function Documentation

◆ DECLARE_TCLASS()

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DECLARE_TCLASS ( Normal ,
TDataType  )
private

◆ DEF_ARRAY_IN() [1/2]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_ARRAY_IN ( Coord ,
InNormal ,
DeviceType::GPU ,
""  )

◆ DEF_ARRAY_IN() [2/2]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_ARRAY_IN ( Real ,
Scalar ,
DeviceType::GPU ,
""  )

◆ DEF_ARRAY_STATE() [1/3]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_ARRAY_STATE ( Coord ,
Normal ,
DeviceType::GPU ,
""  )

◆ DEF_ARRAY_STATE() [2/3]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_ARRAY_STATE ( Transform3f ,
TransformsCone ,
DeviceType::GPU ,
"Instance transform"  )

◆ DEF_ARRAY_STATE() [3/3]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_ARRAY_STATE ( Transform3f ,
TransformsCylinder ,
DeviceType::GPU ,
"Instance transform"  )

◆ DEF_INSTANCE_IN()

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_INSTANCE_IN ( TriangleSet< TDataType > ,
TriangleSet ,
""  )

◆ DEF_INSTANCE_STATE() [1/4]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_INSTANCE_STATE ( EdgeSet< TDataType > ,
NormalSet ,
""  )

◆ DEF_INSTANCE_STATE() [2/4]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_INSTANCE_STATE ( PointSet< TDataType > ,
TriangleCenter ,
""  )

◆ DEF_INSTANCE_STATE() [3/4]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_INSTANCE_STATE ( TriangleSet< TDataType > ,
ArrowCone ,
""  )

◆ DEF_INSTANCE_STATE() [4/4]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_INSTANCE_STATE ( TriangleSet< TDataType > ,
ArrowCylinder ,
""  )

◆ DEF_VAR() [1/5]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_VAR ( bool ,
Normalize ,
true ,
"Normalize"  )

◆ DEF_VAR() [2/5]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_VAR ( bool ,
ShowWireframe ,
true ,
"ShowWireframe"  )

◆ DEF_VAR() [3/5]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_VAR ( int ,
ArrowResolution ,
8 ,
""  )

◆ DEF_VAR() [4/5]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_VAR ( Real ,
Length ,
0. 2,
"LinLength"  )

◆ DEF_VAR() [5/5]

template<typename TDataType>
dyno::NormalVisualization< TDataType >::DEF_VAR ( Real ,
LineWidth ,
0. 01,
" LineWidth"  )

◆ getNodeType()

template<typename TDataType>
std::string dyno::NormalVisualization< TDataType >::getNodeType ( )
inlineoverridevirtual

Reimplemented from dyno::Node.

Definition at line 48 of file NormalVisualization.h.

◆ renderChanged()

template<typename TDataType>
void dyno::NormalVisualization< TDataType >::renderChanged ( )
private

◆ resetStates()

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

Reimplemented from dyno::Node.

◆ updateStates()

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

Reimplemented from dyno::Node.

◆ varChanged()

template<typename TDataType>
void dyno::NormalVisualization< TDataType >::varChanged ( )
private

Member Data Documentation

◆ d_edges

template<typename TDataType>
DArray<TopologyModule::Edge> dyno::NormalVisualization< TDataType >::d_edges
private

Definition at line 86 of file NormalVisualization.h.

◆ d_normal

template<typename TDataType>
DArray<Coord> dyno::NormalVisualization< TDataType >::d_normal
private

Definition at line 88 of file NormalVisualization.h.

◆ d_normalPt

template<typename TDataType>
DArray<Coord> dyno::NormalVisualization< TDataType >::d_normalPt
private

Definition at line 87 of file NormalVisualization.h.

◆ d_points

template<typename TDataType>
DArray<Coord> dyno::NormalVisualization< TDataType >::d_points
private

Definition at line 85 of file NormalVisualization.h.

◆ glInstanceCone

template<typename TDataType>
std::shared_ptr<GLInstanceVisualModule> dyno::NormalVisualization< TDataType >::glInstanceCone
private

Definition at line 84 of file NormalVisualization.h.

◆ glInstanceCylinder

template<typename TDataType>
std::shared_ptr<GLInstanceVisualModule> dyno::NormalVisualization< TDataType >::glInstanceCylinder
private

Definition at line 83 of file NormalVisualization.h.

◆ triangleCenter

template<typename TDataType>
DArray<Coord> dyno::NormalVisualization< TDataType >::triangleCenter
private

Definition at line 89 of file NormalVisualization.h.


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