PeriDyno 1.0.0
Loading...
Searching...
No Matches
dyno::ImChart Class Reference

#include <ImChart.h>

Inheritance diagram for dyno::ImChart:
Collaboration diagram for dyno::ImChart:

Public Member Functions

 ImChart ()
 
 ~ImChart () override
 
void setCoord (ImVec2 coord)
 
ImVec2 getCoord () const
 
 DECLARE_ENUM (InputMode, Var=0, Array=1)
 
 DEF_VAR_IN (unsigned, FrameNumber, "")
 
 DEF_VAR_IN (Real, Value, "")
 
 DEF_ARRAY_IN (Real, Array, DeviceType::GPU, "")
 
 DEF_ENUM (InputMode, InputMode, InputMode::Array, "")
 
 DEF_VAR (Real, Min, Real(-1), "")
 
 DEF_VAR (Real, Max, Real(1), "")
 
 DEF_VAR (bool, FixHeight, false, "")
 
 DEF_VAR (int, Count, -1, "")
 
 DEF_VAR (std::string, Title, "chart", "")
 
 DEF_VAR (bool, OutputFile, false, "")
 
 DEF_VAR (std::string, OutputPath, "D:/outputTxt", "OutputPath")
 
- Public Member Functions inherited from dyno::ImWidget
 ImWidget ()
 
virtual ~ImWidget ()
 
- Public Member Functions inherited from dyno::VisualModule
 VisualModule ()
 
virtual ~VisualModule ()
 
void setVisible (bool bVisible)
 
bool isVisible ()
 
std::string getModuleType () override
 
- Public Member Functions inherited from dyno::Module
 Module (std::string name="default")
 
 ~Module (void) override
 
bool initialize ()
 
void update ()
 
void setName (std::string name)
 
std::string getName () override
 
virtual void setParentNode (Node *node)
 Set the parent node.
 
NodegetParentNode ()
 
SceneGraphgetSceneGraph ()
 
bool isInitialized ()
 
bool attachField (FBase *field, std::string name, std::string desc, bool autoDestroy=true) override
 Attach a field to Base.
 
bool isInputComplete ()
 Check the completeness of input fields.
 
bool isOutputCompete ()
 
 DEF_VAR (bool, ForceUpdate, false, "")
 
void setUpdateAlways (bool b)
 Set the update strategy for the module.
 
- 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

virtual void paint ()
 
virtual void update ()
 
virtual bool initialize ()
 
void resetCanvas ()
 
void varChange ()
 
void drawArray ()
 
void drawValue ()
 
void outputTxt ()
 
- Protected Member Functions inherited from dyno::Module
virtual bool initializeImpl ()
 
virtual void updateImpl ()
 
virtual void preprocess ()
 
virtual void postprocess ()
 
virtual bool validateInputs ()
 
virtual bool validateOutputs ()
 
virtual bool requireUpdate ()
 
virtual void updateStarted ()
 Two functions called at the beginning and end of update() used for debug.
 
virtual void updateEnded ()
 

Private Attributes

ImVec2 mCoord = ImVec2(0, 0)
 
float min = -1
 
float max = 1
 
RealvaluePtr = nullptr
 
CArray< Realc_Value
 
std::vector< Real > * valueVec
 
DArray< Reald_Value
 
std::shared_ptr< NodemNode
 
int frameNumber = 0
 
int count = 20
 
std::string file_postfix = ".txt"
 
bool isOut = false
 

Additional Inherited Members

- Public Types inherited from dyno::OBase
typedef std::vector< FBase * > FieldVector
 
typedef std::map< FieldID, FBase * > FieldMap
 
- 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 Attributes inherited from dyno::OBase
std::vector< FBase * > fields_input
 
std::vector< FBase * > fields_output
 
std::vector< FBase * > fields_param
 

Detailed Description

Definition at line 23 of file ImChart.h.

Constructor & Destructor Documentation

◆ ImChart()

dyno::ImChart::ImChart ( )

Definition at line 11 of file ImChart.cpp.

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

◆ ~ImChart()

dyno::ImChart::~ImChart ( )
override

Definition at line 33 of file ImChart.cpp.

Member Function Documentation

◆ DECLARE_ENUM()

dyno::ImChart::DECLARE_ENUM ( InputMode ,
Var = 0,
Array = 1 )

◆ DEF_ARRAY_IN()

dyno::ImChart::DEF_ARRAY_IN ( Real ,
Array ,
DeviceType::GPU ,
""  )

◆ DEF_ENUM()

dyno::ImChart::DEF_ENUM ( InputMode ,
InputMode ,
InputMode::Array ,
""  )

◆ DEF_VAR() [1/7]

dyno::ImChart::DEF_VAR ( bool ,
FixHeight ,
false ,
""  )

◆ DEF_VAR() [2/7]

dyno::ImChart::DEF_VAR ( bool ,
OutputFile ,
false ,
""  )

◆ DEF_VAR() [3/7]

dyno::ImChart::DEF_VAR ( int ,
Count ,
- 1,
""  )

◆ DEF_VAR() [4/7]

dyno::ImChart::DEF_VAR ( Real ,
Max ,
Real(1) ,
""  )

◆ DEF_VAR() [5/7]

dyno::ImChart::DEF_VAR ( Real ,
Min ,
Real(-1) ,
""  )

◆ DEF_VAR() [6/7]

dyno::ImChart::DEF_VAR ( std::string ,
OutputPath ,
"D:/outputTxt" ,
"OutputPath"  )

◆ DEF_VAR() [7/7]

dyno::ImChart::DEF_VAR ( std::string ,
Title ,
"chart" ,
""  )

◆ DEF_VAR_IN() [1/2]

dyno::ImChart::DEF_VAR_IN ( Real ,
Value ,
""  )

◆ DEF_VAR_IN() [2/2]

dyno::ImChart::DEF_VAR_IN ( unsigned ,
FrameNumber ,
""  )

◆ drawArray()

void dyno::ImChart::drawArray ( )
protected

Definition at line 158 of file ImChart.cpp.

Here is the caller graph for this function:

◆ drawValue()

void dyno::ImChart::drawValue ( )
protected

Definition at line 202 of file ImChart.cpp.

Here is the caller graph for this function:

◆ getCoord()

ImVec2 dyno::ImChart::getCoord ( ) const

Definition at line 122 of file ImChart.cpp.

◆ initialize()

bool dyno::ImChart::initialize ( )
protectedvirtual

Implements dyno::ImWidget.

Definition at line 127 of file ImChart.cpp.

◆ outputTxt()

void dyno::ImChart::outputTxt ( )
protected

Definition at line 252 of file ImChart.cpp.

Here is the caller graph for this function:

◆ paint()

void dyno::ImChart::paint ( )
protectedvirtual

Implements dyno::ImWidget.

Definition at line 137 of file ImChart.cpp.

◆ resetCanvas()

void dyno::ImChart::resetCanvas ( )
protected

◆ setCoord()

void dyno::ImChart::setCoord ( ImVec2 coord)

Definition at line 117 of file ImChart.cpp.

◆ update()

void dyno::ImChart::update ( )
protectedvirtual

Implements dyno::ImWidget.

Definition at line 132 of file ImChart.cpp.

◆ varChange()

void dyno::ImChart::varChange ( )
protected

Definition at line 38 of file ImChart.cpp.

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

Member Data Documentation

◆ c_Value

CArray<Real> dyno::ImChart::c_Value
private

Definition at line 83 of file ImChart.h.

◆ count

int dyno::ImChart::count = 20
private

Definition at line 90 of file ImChart.h.

◆ d_Value

DArray<Real> dyno::ImChart::d_Value
private

Definition at line 85 of file ImChart.h.

◆ file_postfix

std::string dyno::ImChart::file_postfix = ".txt"
private

Definition at line 92 of file ImChart.h.

◆ frameNumber

int dyno::ImChart::frameNumber = 0
private

Definition at line 89 of file ImChart.h.

◆ isOut

bool dyno::ImChart::isOut = false
private

Definition at line 94 of file ImChart.h.

◆ max

float dyno::ImChart::max = 1
private

Definition at line 79 of file ImChart.h.

◆ mCoord

ImVec2 dyno::ImChart::mCoord = ImVec2(0, 0)
private

Definition at line 68 of file ImChart.h.

◆ min

float dyno::ImChart::min = -1
private

Definition at line 78 of file ImChart.h.

◆ mNode

std::shared_ptr<Node> dyno::ImChart::mNode
private

Definition at line 87 of file ImChart.h.

◆ valuePtr

Real* dyno::ImChart::valuePtr = nullptr
private

Definition at line 81 of file ImChart.h.

◆ valueVec

std::vector<Real>* dyno::ImChart::valueVec
private

Definition at line 84 of file ImChart.h.


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