[osg-ephemeris] setSkyDomeCenter() confusion
Don Burns
don at andesengineering.com
Tue Apr 28 10:27:59 PDT 2009
http://andesengineering.com/Projects/OsgEphemeris/
Under "osgEpehemris Doxygen Reference Pages"->EphemerisModel
ephemerisModel->setMoveWithEyePoint(true); // or false
Also, if using the .osg file directives:
osgEphemerisModel::EphemerisModel {
...
MoveWithEyePoint true
...
}
-don
On Tue, Apr 28, 2009 at 8:26 AM, Terry Welsh <mogumbo at gmail.com> wrote:
>
> http://www.mail-archive.com/osg-users@lists.openscenegraph.org/msg26279.html
> Looks like someone else is having trouble with
> EphemerisModel::setSkyDomeCenter(). Can someone shed some light on
> this problem?
> --
> Terry Welsh / mogumbo 'at' gmail.com
> www.reallyslick.com / www.mogumbo.com
>
>
>
> On Thu, Nov 13, 2008 at 3:38 PM, Terry Welsh <mogumbo at gmail.com> wrote:
> > I'm trying to debug a coworker's app here. After flying a couple
> > kilometers in his simulation I start to see the sky getting clipped
> > behind me as if the sky dome is not moving. He is using
> > EphemerisModel::setSkyDomeCenter() every frame as it appears he is
> > supposed to according to the instructions in EphemerisModel.h
> > (although, I don't entirely understand what these instructions mean):
> >
> > "...Note that this should be used even when setMoveWithEyePoint() is
> > set to true because of datbase size initialization regardless of
> > run-time updates."
> >
> > So I dug into the code in the MoveWithEyePointTransform class, which
> > is supposed to move the sky around with your eyepoint. This line:
> >
> > matrix.preMult(osg::Matrix::translate(osg::Vec3(
> > eyePointLocal.x(),eyePointLocal.y(),0.0f) - _center));
> >
> > should cause the movement of the sky, but as long as you're setting
> > the center with setSkyDomeCenter() the x and y values of eyePointLocal
> > and _center come out to be the same thing. So the sky doesn't really
> > get moved around at all.
> >
> > I commented out the setSkyDomeCenter() in my coworker's app so that
> > _center would be (0,0,0) and now the sky dome doesn't get clipped. So
> > are the instructions misleading us? Or am I still doing something
> > wrong and just getting lucky?
> > --
> > Terry Welsh / mogumbo 'at' gmail.com
> > www.reallyslick.com / www.mogumbo.com
> >
> _______________________________________________
> osg-ephemeris mailing list
> osg-ephemeris at andesengineering.com
> http://andesengineering.com/mailman/listinfo/osg-ephemeris
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://andesengineering.com/pipermail/osg-ephemeris/attachments/20090428/0e8604c9/attachment.htm
More information about the osg-ephemeris
mailing list