AnimatLab  2
Test
VsMouth.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 #include "VsMouth.h"
21 #include "VsSimulator.h"
22 
23 namespace VortexAnimatSim
24 {
25  namespace Environment
26  {
27  namespace Bodies
28  {
29 
37 {
38  SetThisPointers();
39 }
40 
48 {
49  try
50  {
51  DeleteGraphics();
52  DeletePhysics();
53  }
54  catch(...)
55  {Std_TraceMsg(0, "Caught Error in desctructor of VsMouth/\r\n", "", -1, false, true);}
56 }
57 
58 void VsMouth::CreateGraphicsGeometry()
59 {
60  m_osgGeometry = CreateSphereGeometry(LatitudeSegments(), LongtitudeSegments(), m_fltRadius);
61 }
62 
63 void VsMouth::CreatePhysicsGeometry() {}
64 
65 void VsMouth::ResizePhysicsGeometry() {}
66 
68 {
69  CreateGeometry();
70 
71  VsRigidBody::CreateItem();
72 }
73 
74  } //Bodies
75  } // Environment
76 } //VortexAnimatSim
77 
virtual void CreateParts()
Allows the rigid body to create its parts using the chosen physics engine.
Definition: VsMouth.cpp:67
Declares the vortex mouth class.
osg::Geometry * CreateSphereGeometry(int latres, int longres, float radius)
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.
float m_fltRadius
The radius of the sensor part. It is shown as a sphere object.
Definition: Sensor.h:29
Declares the vortex structure class.