AnimatLab  2
Test
VsFreeJoint.cpp
Go to the documentation of this file.
1 
7 #include "StdAfx.h"
8 #include "VsMovableItem.h"
9 #include "VsBody.h"
10 #include "VsJoint.h"
11 #include "VsMotorizedJoint.h"
12 #include "VsRigidBody.h"
13 #include "VsSphere.h"
14 #include "VsStructure.h"
15 #include "VsSimulator.h"
16 #include "VsOsgUserData.h"
17 #include "VsOsgUserDataVisitor.h"
18 #include "VsDragger.h"
19 #include "VsFreeJoint.h"
20 
21 
22 namespace VortexAnimatSim
23 {
24  namespace Environment
25  {
26  namespace Joints
27  {
28 
36 {
37  SetThisPointers();
38 }
39 
47 {
48  try
49  {
50  DeleteGraphics();
51  DeletePhysics();
52  }
53  catch(...)
54  {Std_TraceMsg(0, "Caught Error in desctructor of VsFreeJoint/\r\n", "", -1, false, true);}
55 }
56 
57 void VsFreeJoint::DeletePhysics()
58 {
59 }
60 
61 void VsFreeJoint::SetupPhysics()
62 {
63 }
64 
65 void VsFreeJoint::CreateJoint()
66 {
67  SetupGraphics();
68  SetupPhysics();
69 }
70 
71 #pragma region DataAccesMethods
72 
73 
74 bool VsFreeJoint::SetData(const std::string &strDataType, const std::string &strValue, bool bThrowError)
75 {
76  if(VsJoint::Physics_SetData(strDataType, strValue))
77  return true;
78 
79  if(BallSocket::SetData(strDataType, strValue, false))
80  return true;
81 
82  //If it was not one of those above then we have a problem.
83  if(bThrowError)
84  THROW_PARAM_ERROR(Al_Err_lInvalidDataType, Al_Err_strInvalidDataType, "Data Type", strDataType);
85 
86  return false;
87 }
88 
89 void VsFreeJoint::QueryProperties(CStdPtrArray<TypeProperty> &aryProperties)
90 {
91  VsJoint::Physics_QueryProperties(aryProperties);
92  BallSocket::QueryProperties(aryProperties);
93 }
94 
95 #pragma endregion
96 
97  } //Joints
98  } // Environment
99 } //VortexAnimatSim
Classes for implementing the cm-labs vortex physics engine for AnimatLab.
void Std_TraceMsg(const int iLevel, std::string strMessage, std::string strSourceFile, int iSourceLine, bool bLogToFile, bool bPrintHeader)
Traces a message to the debugger window.
virtual void SetupGraphics()
Sets up the graphics for the joint.
Definition: VsJoint.cpp:248
Declares the vortex structure class.