@@ -34,6 +34,7 @@ SOFTWARE.*/
3434#include < FSCore/box.h>
3535#include < vector>
3636#include < memory>
37+ #include " constants.h"
3738
3839namespace Post {
3940
@@ -84,6 +85,24 @@ class FEPostModel
8485 // ! Find the index of object data with the given name
8586 int FindObjectDataIndex (const std::string& name) const ;
8687
88+ ModelDataField* GetObjectData (int n) { return m_data[n]; }
89+ ModelDataField* FindObjectData (const std::string& name)
90+ {
91+ int n = FindObjectDataIndex (name);
92+ if (n < 0 ) return nullptr ;
93+ return m_data[n];
94+ }
95+
96+ void AddData (PlotObjectData* po)
97+ {
98+ po->SetFieldID (BUILD_FIELD (DATA_CLASS::OBJECT_DATA, m_data.size (), 0 ));
99+ m_data.push_back (po);
100+ }
101+
102+ PlotObjectData* GetData (int n) { return m_data[n]; }
103+
104+ size_t DataCount () const { return m_data.size (); }
105+
87106 public:
88107 // ! Unique identifier for the plot object
89108 int m_id;
@@ -94,6 +113,7 @@ class FEPostModel
94113 // ! Rotation of the plot object
95114 quatd m_rot;
96115
116+ private:
97117 // ! Vector of data associated with the plot object
98118 std::vector<PlotObjectData*> m_data;
99119 };
@@ -299,6 +319,9 @@ class FEPostModel
299319 // ! Check if the field code is valid for the given state
300320 bool IsValidFieldCode (int nfield, int nstate);
301321
322+ float EvaluatePlotObjectData (int nobj, int ntime, int nfield);
323+ float EvaluatePlotObject (PlotObject* po, ModelDataField& data, int comp, int ntime);
324+
302325public:
303326 // ! Add a dependant object that will be notified of model changes
304327 void AddDependant (FEModelDependant* pc);
@@ -345,6 +368,10 @@ class FEPostModel
345368 // ! Get a plot object by index
346369 PlotObject* GetPlotObject (int n);
347370
371+ int GetPlotObjectIndex (PlotObject* po);
372+
373+ PlotObject* FindPlotObject (const std::string& name);
374+
348375 // ! Get the number of point objects
349376 int PointObjects () const ;
350377 // ! Add a point object
0 commit comments