AnimatLab  2
Test
LineBase.h
Go to the documentation of this file.
1 
7 #pragma once
8 
9 namespace AnimatSim
10 {
11  namespace Environment
12  {
13  namespace Bodies
14  {
25  class ANIMAT_PORT LineBase : public RigidBody
26  {
27  protected:
29  float m_fltLength;
30 
33 
35  CStdArray<std::string> m_aryAttachmentPointIDs;
36 
38  CStdArray<Attachment *> m_aryAttachmentPoints;
39 
40  virtual void LoadAttachments(CStdXml &oXml);
41  virtual void InitializeAttachments();
42  virtual void AttachedPartMovedOrRotated(std::string strID);
43 
44  public:
45  LineBase();
46  virtual ~LineBase();
47 
48  static LineBase *CastToDerived(AnimatBase *lpBase) {return static_cast<LineBase*>(lpBase);}
49 
50  virtual void Enabled(bool bValue);
51 
52  virtual float Length();
53  virtual float PrevLength();
54 
55  //Line parts are never static joints.
56  virtual bool HasStaticJoint() {return false;};
57 
58  virtual bool AllowMouseManipulation();
59  virtual void Position(CStdFPoint &oPoint, bool bUseScaling = true, bool bFireChangeEvent = false, bool bUpdateMatrix = true);
60  virtual void AbsolutePosition(CStdFPoint &oPoint);
61  virtual void OrientNewPart(float fltXPos, float fltYPos, float fltZPos, float fltXNorm, float fltYNorm, float fltZNorm);
62 
63  CStdArray<Attachment *> *AttachmentPoints();
64  virtual void AttachmentPoints(std::string srXml);
65 
66  virtual void Resize();
67  virtual float CalculateLength();
68  virtual void AfterResetSimulation();
69 
70  virtual float *GetDataPointer(const std::string &strDataType);
71  virtual bool SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError = true);
72  virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
73 
74  virtual void CreateParts();
75  virtual void CreateJoints();
76  virtual void Load(CStdXml &oXml);
77 
78  };
79 
80  } //Bodies
81  } // Environment
82 } //AnimatSim
Root namespace for the base simulation library for AnimatLab.
float m_fltPrevLength
Length of the line in the previous timestep.
Definition: LineBase.h:32
Animat base class.
Definition: AnimatBase.h:36
CStdArray< Attachment * > m_aryAttachmentPoints
A pointer to the primary attachment part.
Definition: LineBase.h:38
float m_fltLength
Current length of the line.
Definition: LineBase.h:29
virtual bool HasStaticJoint()
Query if this object has a static joint.
Definition: LineBase.h:56
Base class for Line body part types.
Definition: LineBase.h:25
CStdArray< std::string > m_aryAttachmentPointIDs
The ID's of the attachment points for this muscle. This is used during the load/initialization proces...
Definition: LineBase.h:35
The base class for all of the basic rigid body type of objects.
Definition: RigidBody.h:66