9 #include "ScriptProcessor.h"
12 #include "RobotPartInterface.h"
119 virtual void LoadLayout(CStdXml &oXml);
120 virtual void LoadCollisionPair(CStdXml &oXml);
121 virtual RigidBody *LoadRoot(CStdXml &oXml);
123 virtual void AddRoot(std::string strXml);
124 virtual void RemoveRoot(std::string strID,
bool bThrowError =
true);
127 virtual void AddScript(std::string strXml);
128 virtual void RemoveScript(std::string strID,
bool bThrowError =
true);
130 virtual void UpdateData();
143 virtual CStdFPoint Position();
144 virtual void Position(CStdFPoint &oPoint,
bool bUseScaling =
true,
bool bFireChangeEvent =
false,
bool bUpdateMatrix =
true);
146 virtual float Size();
147 virtual void Size(
float fltVal,
bool bUseScaling =
true);
149 virtual RobotInterface *GetRobotInterface() {
return NULL;};
151 virtual bool AllowTranslateDragX();
152 virtual bool AllowTranslateDragY();
153 virtual bool AllowTranslateDragZ();
155 virtual bool AllowRotateDragX();
156 virtual bool AllowRotateDragY();
157 virtual bool AllowRotateDragZ();
159 virtual CStdPtrArray<CollisionPair> ExclusionList();
160 virtual void AddCollisionPair(std::string strID1, std::string strID2);
162 virtual void MinTimeStep(
float &fltMin);
164 virtual void Create();
165 virtual void StepPhysicsEngine();
166 virtual void ResetSimulation();
168 void AddJoint(Joint *lpJoint);
169 void RemoveJoint(std::string strID);
170 void AddRigidBody(RigidBody *lpBody);
171 void RemoveRigidBody(std::string strID);
173 virtual Joint *FindJoint(std::string strJointID,
bool bThrowError =
true);
174 virtual RigidBody *FindRigidBody(std::string strBodyID,
bool bThrowError =
true);
175 virtual Node *FindNode(std::string strID,
bool bThrowError =
true);
178 virtual void EnableMotor(std::string strJointID,
bool bVal);
179 virtual void SetMotorInput(std::string strJointID,
float fltInput);
181 virtual void EnableCollision(RigidBody *lpCollisionBody);
182 virtual void DisableCollision(RigidBody *lpCollisionBody);
184 virtual void Selected(
bool bValue,
bool bSelectMultiple);
185 virtual void UpdatePhysicsPosFromGraphics();
190 #pragma region DataAccesMethods
192 virtual void SetSystemPointers(
Simulator *lpSim, Structure *lpStructure, NeuralModule *lpModule,
Node *lpNode,
bool bVerify);
193 virtual float *GetDataPointer(
const std::string &strDataType);
194 virtual bool SetData(
const std::string &strDataType,
const std::string &strValue,
bool bThrowError =
true);
195 virtual void QueryProperties(CStdPtrArray<TypeProperty> &aryProperties);
196 virtual bool AddItem(
const std::string &strItemType,
const std::string &strXml,
bool bThrowError =
true,
bool bDoNotInit =
false);
197 virtual bool RemoveItem(
const std::string &strItemType,
const std::string &strID,
bool bThrowError =
true);
201 #pragma region SnapshotMethods
202 virtual long CalculateSnapshotByteSize();
203 virtual void SaveKeyFrameSnapshot(byte *aryBytes,
long &lIndex);
204 virtual void LoadKeyFrameSnapshot(byte *aryBytes,
long &lIndex);
207 virtual void Initialize();
208 virtual void Kill(
bool bState =
true);
209 virtual void SimStarting();
210 virtual void SimPausing();
211 virtual void SimStopping();
213 virtual void Load(CStdXml &oXml);
IMovableItemCallback * m_lpCallback
Movable Item callback to the GUI.
~CollisionPair()
Finaliser.
Declares the Robot IO control interface base class.
Simulates the entire environment.
Root namespace for the base simulation library for AnimatLab.
CollisionPair()
Default constructor.
CStdMap< std::string, RigidBody * > m_aryRigidBodies
std::string m_strPart2ID
GUID ID of the second part of the collision pair.
RigidBody * m_lpBody
The root rigid body object of this structure.
Baes class for all items that can be moved/roated within the environment.
CStdPtrArray< CollisionPair > m_aryExcludeCollisionList
This is the list of other body part ID's to exclude from collision tests.
A "static" structure in the simulation.
float m_fltSize
The radius of the graphical sphere shown for the structure position.
ScriptProcessor * m_lpScript
Script processor for running python or other scripting systems related to this structure.
Base class for body parts and neural network nodes.
CStdMap< std::string, Joint * > m_aryJoints
std::string m_strPart1ID
GUID ID of the first part of the collision pair.
Declares the robotics inerface for animatlab.
The base class for all of the basic rigid body type of objects.