8 #include "OsgMovableItem.h"
10 #include "OsgRigidBody.h"
14 #include "OsgUserData.h"
15 #include "OsgUserDataVisitor.h"
17 #include "OsgMouseSpring.h"
19 #include "OsgCameraManipulator.h"
20 #include "OsgDragger.h"
21 #include "OsgSimulator.h"
25 namespace Visualization
50 {
Std_TraceMsg(0,
"Caught Error in desctructor of OsgHud\r\n",
"", -1,
false,
true);}
55 AnimatBase::Initialize();
57 m_osgProjection =
new osg::Projection;
58 m_osgProjection->setMatrix(osg::Matrix::ortho2D(0, 800, 0, 600));
60 HudItem *lpItem = NULL;
61 int iCount = m_aryHudItems.GetSize();
62 for(
int iIndex = 0; iIndex < iCount; iIndex++)
64 lpItem = m_aryHudItems[iIndex];
65 lpItem->Initialize(m_osgProjection.get());
68 m_osgMT =
new osg::MatrixTransform;
69 m_osgMT->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
70 m_osgMT->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
71 m_osgMT->getOrCreateStateSet()->setAttributeAndModes(
new osg::Program, osg::StateAttribute::ON);
72 m_osgMT->addChild(m_osgProjection.get());
76 THROW_ERROR(Osg_Err_lUnableToConvertToVsSimulator, Osg_Err_strUnableToConvertToVsSimulator);
78 lpVsSim->OSGRoot()->addChild(m_osgMT.get());
83 HudItem *lpItem = NULL;
84 int iCount = m_aryHudItems.GetSize();
85 for(
int iIndex = 0; iIndex < iCount; iIndex++)
87 lpItem = m_aryHudItems[iIndex];
Declares the vortex Light class.
Simulator * m_lpSim
The pointer to a Simulation.
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 Initialize()
Initializes this object.
Declares the vortex organism class.
Declares the vortex structure class.
OsgHud()
Default constructor.
virtual ~OsgHud()
Destructor.