AnimatLab  2
Test
OsgMouth.cpp
Go to the documentation of this file.
1 
7 #include "StdAfx.h"
8 #include <stdarg.h>
9 #include "OsgMovableItem.h"
10 #include "OsgBody.h"
11 #include "OsgJoint.h"
12 #include "OsgRigidBody.h"
13 #include "OsgStructure.h"
14 #include "OsgUserData.h"
15 #include "OsgUserDataVisitor.h"
16 
17 #include "OsgMouseSpring.h"
18 #include "OsgLight.h"
19 #include "OsgCameraManipulator.h"
20 #include "OsgDragger.h"
21 
22 #include "OsgMouth.h"
23 
24 namespace OsgAnimatSim
25 {
26  namespace Environment
27  {
28  namespace Bodies
29  {
30 
38 {
39  m_bPhsyicsDefined = false;
40  SetThisPointers();
41 }
42 
50 {
51  try
52  {
53  DeleteGraphics();
54  DeletePhysics(false);
55  }
56  catch(...)
57  {Std_TraceMsg(0, "Caught Error in desctructor of OsgMouth/\r\n", "", -1, false, true);}
58 }
59 
60 void OsgMouth::CreateGraphicsGeometry()
61 {
62  m_osgGeometry = CreateSphereGeometry(LatitudeSegments(), LongtitudeSegments(), m_fltRadius);
63 }
64 
65 void OsgMouth::CreatePhysicsGeometry()
66 {
67  m_bPhsyicsDefined = true;
68 }
69 
70 void OsgMouth::ResizePhysicsGeometry() {}
71 
73 {
74  CreateGeometry();
75 
76  OsgRigidBody::CreateItem();
77 }
78 
79  } //Bodies
80  } // Environment
81 } //VortexAnimatSim
82 
Declares the vortex Light class.
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 CreateParts()
Allows the rigid body to create its parts using the chosen physics engine.
Definition: OsgMouth.cpp:72
Declares the vortex structure class.
float m_fltRadius
The radius of the sensor part. It is shown as a sphere object.
Definition: Sensor.h:29
osg::Geometry ANIMAT_OSG_PORT * CreateSphereGeometry(int latres, int longres, float radius)