|
From: <mk...@us...> - 2003-07-02 20:02:01
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv23554
Modified Files:
ObjectModel.cpp ScreenInfo.cpp
Log Message:
Index: ObjectModel.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/ObjectModel.cpp,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** ObjectModel.cpp 26 Jun 2003 09:25:23 -0000 1.15
--- ObjectModel.cpp 2 Jul 2003 20:01:58 -0000 1.16
***************
*** 312,315 ****
--- 312,318 ----
void ObjectModel::addContactMarkers() {
m_ContactMarkers = new osg::Group;
+ osg::CullFace *cf = new osg::CullFace;
+ cf->setMode(osg::CullFace::BACK);
+ m_ContactMarkers->getOrCreateStateSet()->setAttributeAndModes(cf, osg::StateAttribute::ON);
for (unsigned i = 0; i < m_Contacts.size(); i++) {
osg::Geode *diamond = new osg::Geode;
Index: ScreenInfo.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/ScreenInfo.cpp,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** ScreenInfo.cpp 30 Jun 2003 22:27:57 -0000 1.16
--- ScreenInfo.cpp 2 Jul 2003 20:01:58 -0000 1.17
***************
*** 68,74 ****
ScreenInfo::ScreenInfo(float pos_x, float pos_y, std::string const &name, std::string const &text):
! m_TTFPath("ltype.ttf"),
! m_FontSize(15),
! m_CharacterSize(11),
m_Text(0) {
m_Text = makeText(pos_x,pos_y - m_CharacterSize, text);
--- 68,74 ----
ScreenInfo::ScreenInfo(float pos_x, float pos_y, std::string const &name, std::string const &text):
! m_TTFPath("screeninfo.ttf"),
! m_FontSize(20),
! m_CharacterSize(14),
m_Text(0) {
m_Text = makeText(pos_x,pos_y - m_CharacterSize, text);
***************
*** 99,114 ****
m_Text->setUseDisplayList(false);
! osgText::Text *s1 = makeText(posx + 4 * m_CharacterSize, posy - m_CharacterSize, "fps min: max: av:");
! addDrawable(s1);
! m_MinFps = makeText(posx + (4 + 6) * m_CharacterSize, posy - m_CharacterSize);
m_MinFps->setUseDisplayList(false);
addDrawable(m_MinFps);
! m_MaxFps = makeText(posx + (4 + 6 + 4 + 4) * m_CharacterSize, posy - m_CharacterSize);
m_MaxFps->setUseDisplayList(false);
addDrawable(m_MaxFps);
! m_Av = makeText(posx + (4 + 6 + 4 + 4 + 4 + 3) * m_CharacterSize, posy - m_CharacterSize);
m_Av->setUseDisplayList(false);
addDrawable(m_Av);
--- 99,126 ----
m_Text->setUseDisplayList(false);
! // FIXME
! // this is clearly not the right thing to do, but just happens
! // to be too expedient to resist. need to look more deeply into
! // the osg::Text implementation to figure out how to detect mono
! // spaced fonts and get the character width of a string prior to
! // and update/draw passes.
! float width = m_CharacterSize * 0.7;
!
! osgText::Text *s1_0 = makeText(posx + 6 * width, posy - m_CharacterSize, "fps min:");
! addDrawable(s1_0);
! osgText::Text *s1_1 = makeText(posx + 21 * width, posy - m_CharacterSize, "max:");
! addDrawable(s1_1);
! osgText::Text *s1_2 = makeText(posx + 33 * width, posy - m_CharacterSize, "avg:");
! addDrawable(s1_2);
! m_MinFps = makeText(posx + (6 + 9) * width, posy - m_CharacterSize);
m_MinFps->setUseDisplayList(false);
addDrawable(m_MinFps);
! m_MaxFps = makeText(posx + (21 + 5) * width, posy - m_CharacterSize);
m_MaxFps->setUseDisplayList(false);
addDrawable(m_MaxFps);
! m_Av = makeText(posx + (33 + 5) * width, posy - m_CharacterSize);
m_Av->setUseDisplayList(false);
addDrawable(m_Av);
***************
*** 117,121 ****
addDrawable(s2);
! m_Date = makeText(posx + 4 * m_CharacterSize, posy - 2 * m_CharacterSize);
m_Date->setUseDisplayList(false);
addDrawable(m_Date);
--- 129,133 ----
addDrawable(s2);
! m_Date = makeText(posx + 6 * width, posy - 2 * m_CharacterSize);
m_Date->setUseDisplayList(false);
addDrawable(m_Date);
|