Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source/Theater
In directory sc8-pr-cvs1:/tmp/cvs-serv18948/Theater
Modified Files:
FeatureGroup.cpp RandomBillboardModel.cpp
RandomForestModel.cpp
Log Message:
Index: FeatureGroup.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Theater/FeatureGroup.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** FeatureGroup.cpp 26 Jun 2003 09:25:23 -0000 1.1
--- FeatureGroup.cpp 6 Aug 2003 06:25:19 -0000 1.2
***************
*** 66,70 ****
m_SceneGroup = new FeatureSceneGroup();
m_Model->addSceneModel(m_SceneGroup.get(), LayoutTransform(), ElevationCorrection(terrain, m_X, m_Y, m_Orientation));
! m_SceneGroup->setPosition(osg::Vec3(m_X-origin.x, m_Y-origin.y, -origin.z));
m_SceneGroup->setAttitude(osg::Quat(m_Orientation, osg::Z_AXIS));
return m_SceneGroup.get();
--- 66,70 ----
m_SceneGroup = new FeatureSceneGroup();
m_Model->addSceneModel(m_SceneGroup.get(), LayoutTransform(), ElevationCorrection(terrain, m_X, m_Y, m_Orientation));
! m_SceneGroup->setPosition(osg::Vec3(m_X-origin.x(), m_Y-origin.y(), -origin.z()));
m_SceneGroup->setAttitude(osg::Quat(m_Orientation, osg::Z_AXIS));
return m_SceneGroup.get();
***************
*** 100,105 ****
//std::cout << " -> " << place << std::endl;
//std::cout << " -> " << map.getCenter() << std::endl;
! m_X = place.x;
! m_Y = place.y;
}
--- 100,105 ----
//std::cout << " -> " << place << std::endl;
//std::cout << " -> " << map.getCenter() << std::endl;
! m_X = place.x();
! m_Y = place.y();
}
Index: RandomBillboardModel.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Theater/RandomBillboardModel.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RandomBillboardModel.cpp 26 Jun 2003 09:25:23 -0000 1.1
--- RandomBillboardModel.cpp 6 Aug 2003 06:25:19 -0000 1.2
***************
*** 62,66 ****
float area = radius * radius;
int i, n = m_Models.size();
! simdata::Random rand(m_Seed);
m_Offsets.resize(n);
for (i = 0; i < n; i++) {
--- 62,67 ----
float area = radius * radius;
int i, n = m_Models.size();
! simdata::random::Taus2 rand;
! rand.setSeed(m_Seed);
m_Offsets.resize(n);
for (i = 0; i < n; i++) {
***************
*** 68,73 ****
m_Offsets[i].reserve(count);
while (count > 0) {
! float x = rand.newRand()*2.0-1.0;
! float y = rand.newRand()*2.0-1.0;
if (x*x + y*y < 1.0) {
m_Offsets[i].push_back(simdata::Vector3(x*radius, y*radius, 0.0));
--- 69,74 ----
m_Offsets[i].reserve(count);
while (count > 0) {
! float x = rand.uniform(-1.0, 1.0);
! float y = rand.uniform(-1.0, 1.0);
if (x*x + y*y < 1.0) {
m_Offsets[i].push_back(simdata::Vector3(x*radius, y*radius, 0.0));
Index: RandomForestModel.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Theater/RandomForestModel.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** RandomForestModel.cpp 26 Jun 2003 09:25:23 -0000 1.1
--- RandomForestModel.cpp 6 Aug 2003 06:25:19 -0000 1.2
***************
*** 139,143 ****
float area = 3.1416 * radius * radius;
int i, n = m_Models.size();
! simdata::Random rand(m_Seed);
m_Offsets.resize(n);
for (i = 0; i < n; i++) {
--- 139,144 ----
float area = 3.1416 * radius * radius;
int i, n = m_Models.size();
! simdata::random::Taus2 rand;
! rand.setSeed(m_Seed);
m_Offsets.resize(n);
for (i = 0; i < n; i++) {
***************
*** 145,150 ****
m_Offsets[i].reserve(count);
while (count > 0) {
! float x = rand.newRand()*2.0-1.0;
! float y = rand.newRand()*2.0-1.0;
if (x*x + y*y < 1.0) {
m_Offsets[i].push_back(simdata::Vector3(x*radius, y*radius, 0.0));
--- 146,151 ----
m_Offsets[i].reserve(count);
while (count > 0) {
! float x = rand.uniform(-1.0, 1.0);
! float y = rand.uniform(-1.0, 1.0);
if (x*x + y*y < 1.0) {
m_Offsets[i].push_back(simdata::Vector3(x*radius, y*radius, 0.0));
|