AnimatLab  2
Test
Materials.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Environment
12  {
23  class ANIMAT_PORT Materials : public AnimatBase
24  {
25  protected:
26  CStdPtrArray<MaterialType> m_aryMaterialTypes;
27 
28  virtual void LoadMaterialTypes(CStdXml &oXml);
29  virtual MaterialType *LoadMaterialType(CStdXml &oXml);
30 
31  virtual void AddMaterialType(std::string strXml, bool bDoNotInit);
32  virtual void RemoveMaterialType(std::string strID, bool bThrowError = true);
33 
34  virtual int FindTypeListPos(std::string strID, bool bThrowError = true);
35 
36  virtual void CreateDefaultMaterial();
37 
38  public:
39  Materials();
40  virtual ~Materials();
41 
42  static Materials *CastToDerived(AnimatBase *lpBase) {return static_cast<Materials*>(lpBase);}
43 
44  virtual void Reset();
45  virtual void Initialize();
46 
47 #pragma region DataAccesMethods
48 
49  virtual bool AddItem(const std::string &strItemType, const std::string &strXml, bool bThrowError = true, bool bDoNotInit = false);
50  virtual bool RemoveItem(const std::string &strItemType, const std::string &strID, bool bThrowError = true);
51 
52 #pragma endregion
53 
54  virtual void Load(CStdXml &oXml);
55  };
56 
57  } // Visualization
58 } //VortexAnimatSim
Root namespace for the base simulation library for AnimatLab.
Keeps track of all of the materials and the various material pair interaction parameters for the enti...
Definition: Materials.h:23
Animat base class.
Definition: AnimatBase.h:36