8 #include "VsSimulator.h"
12 namespace Visualization
37 {
Std_TraceMsg(0,
"Caught Error in desctructor of VsHud\r\n",
"", -1,
false,
true);}
42 AnimatBase::Initialize();
44 m_osgProjection =
new osg::Projection;
45 m_osgProjection->setMatrix(osg::Matrix::ortho2D(0, 800, 0, 600));
47 HudItem *lpItem = NULL;
48 int iCount = m_aryHudItems.GetSize();
49 for(
int iIndex = 0; iIndex < iCount; iIndex++)
51 lpItem = m_aryHudItems[iIndex];
52 lpItem->Initialize(m_osgProjection.get());
55 m_osgMT =
new osg::MatrixTransform;
56 m_osgMT->setReferenceFrame(osg::Transform::ABSOLUTE_RF);
57 m_osgMT->getOrCreateStateSet()->setMode(GL_LIGHTING, osg::StateAttribute::OFF);
58 m_osgMT->getOrCreateStateSet()->setAttributeAndModes(
new osg::Program, osg::StateAttribute::ON);
59 m_osgMT->addChild(m_osgProjection.get());
63 THROW_ERROR(Vs_Err_lUnableToConvertToVsSimulator, Vs_Err_strUnableToConvertToVsSimulator);
65 lpVsSim->OSGRoot()->addChild(m_osgMT.get());
70 HudItem *lpItem = NULL;
71 int iCount = m_aryHudItems.GetSize();
72 for(
int iIndex = 0; iIndex < iCount; iIndex++)
74 lpItem = m_aryHudItems[iIndex];
virtual void Initialize()
Initializes this object.
VsHud()
Default constructor.
virtual ~VsHud()
Destructor.
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.