|
From: <mk...@us...> - 2003-02-19 21:24:20
|
Update of /cvsroot/csp/APPLICATIONS/CSPSim/Source
In directory sc8-pr-cvs1:/tmp/cvs-serv32220/Source
Modified Files:
Makefile.in Sky.cpp
Log Message:
fix for moon size
Index: Makefile.in
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Makefile.in,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Makefile.in 19 Feb 2003 11:41:58 -0000 1.2
--- Makefile.in 19 Feb 2003 21:24:16 -0000 1.3
***************
*** 1,5 ****
TOPDIR = ..
! SUBDIRS = FX
DEMETER_PREFIX = $(TOPDIR)/$(DEMETER_RELATIVE)
--- 1,5 ----
TOPDIR = ..
! #SUBDIRS = FX
DEMETER_PREFIX = $(TOPDIR)/$(DEMETER_RELATIVE)
***************
*** 95,101 ****
build-subdirs:
! @for dir in $(SUBDIRS); do \
! $(MAKE) -C $${dir} all; \
! done
$(DEPDIR)/%.d : %
--- 95,101 ----
build-subdirs:
! # @for dir in $(SUBDIRS); do \
! # $(MAKE) -C $${dir} all; \
! # done
$(DEPDIR)/%.d : %
***************
*** 122,125 ****
--- 122,128 ----
$(CXX) -c $(CFLAGS) $(@:.o=.cpp)
+ AeroDynamics.o: AeroDynamics.cpp
+ $(CXX) -c $(CFLAGS) -O3 $(@:.o=.cpp)
+
Makefile: Makefile.in
cd $(TOPDIR) && ./configure
Index: Sky.cpp
===================================================================
RCS file: /cvsroot/csp/APPLICATIONS/CSPSim/Source/Sky.cpp,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** Sky.cpp 19 Feb 2003 11:41:58 -0000 1.1
--- Sky.cpp 19 Feb 2003 21:24:16 -0000 1.2
***************
*** 495,502 ****
Moon::Moon(): AstronomicalBody() {
_radius = 1738000.0;
m_Latitude = -100.0;
m_DirtyImage = true;
m_Phase = 0.0;
-
m_ApparentBrightness = 0.0;
m_MoonShine = 0.0;
--- 495,503 ----
Moon::Moon(): AstronomicalBody() {
_radius = 1738000.0;
+ // approximate distance for setting initial size
+ //_distance = 384400000.0 - 6370000.0;
m_Latitude = -100.0;
m_DirtyImage = true;
m_Phase = 0.0;
m_ApparentBrightness = 0.0;
m_MoonShine = 0.0;
***************
*** 504,509 ****
m_SunShine = 0.0;
! float y = 4100.0;
! float x = 4100.0;
m_Image = osgDB::readImageFile("moon.png");
assert(m_Image.valid());
--- 505,511 ----
m_SunShine = 0.0;
! m_RenderDistance = 950000.0;
! float x, y;
! x = y = 1.0; //_radius / _distance * m_RenderDistance;
m_Image = osgDB::readImageFile("moon.png");
assert(m_Image.valid());
***************
*** 634,638 ****
void Moon::updateScene(double lat, double lmst, Sun const &sun, float intensity) {
- static double R = 950000.0;
double h, A;
double x, y, z;
--- 636,639 ----
***************
*** 654,659 ****
y *= cos(A);
z = sin(h);
! osg::Matrix T = osg::Matrix::translate(x*R, y*R, z*R);
! m_Transform->setMatrix(T);
_updateLighting(x, y, z, h, intensity);
}
--- 655,662 ----
y *= cos(A);
z = sin(h);
! double scale = m_RenderDistance * _radius / _distance;
! osg::Matrix S = osg::Matrix::scale(scale, scale, scale);
! osg::Matrix T = osg::Matrix::translate(x*m_RenderDistance, y*m_RenderDistance, z*m_RenderDistance);
! m_Transform->setMatrix(S*T);
_updateLighting(x, y, z, h, intensity);
}
|