- Update BackSky
- Center ring for Background with Skydome - reduce ring background-sky.ac - Test for center skydome too git-svn-id: https://svn.code.sf.net/p/speed-dreams/code/trunk@4263 30fe4595-0a0c-4342-8851-515496e4dcbd Former-commit-id: 4781ea53ceb558be08b68bf2797b1eef514233fc Former-commit-id: 6faa5f4564806a92a615a25021eeb7349a1dc864
This commit is contained in:
parent
31eefb87b7
commit
3998da16cf
2 changed files with 13 additions and 4 deletions
|
@ -270,7 +270,8 @@ grInitBackground(void)
|
|||
|
||||
// Initialize the whole sky dome.
|
||||
sgVec3 viewPos;
|
||||
sgSetVec3(viewPos, 0, 0, 0);
|
||||
//sgSetVec3(viewPos, (track->max.x)/2, 0, (track->max.z)/2);
|
||||
sgSetVec3(viewPos,grWrldX/2, grWrldY/2, 0);
|
||||
TheSky->repositionFlat(viewPos, 0, 0);
|
||||
|
||||
//Setup visibility according to rain if any
|
||||
|
@ -858,7 +859,8 @@ grUpdateSky(double currentTime)
|
|||
|
||||
// At each call, update possibly high speed objects of the sky dome : the clouds.
|
||||
sgVec3 viewPos;
|
||||
sgSetVec3(viewPos, 0, 0, 0);
|
||||
sgSetVec3(viewPos, grWrldX/2, grWrldY/2, 0);
|
||||
//sgSetVec3(viewPos, 0, 0, 0);
|
||||
TheSky->repositionFlat(viewPos, 0, currentTime - lastTimeHighSpeed);
|
||||
|
||||
// Now, we are done for high speed objects.
|
||||
|
|
|
@ -62,6 +62,7 @@ ssgBranch *CarlightAnchor = NULL;
|
|||
ssgBranch *TrackLightAnchor = NULL;
|
||||
ssgBranch *ThePits = NULL;
|
||||
ssgBranch *BackSkyAnchor = NULL;
|
||||
ssgTransform *BackSkyLoc = NULL;
|
||||
|
||||
// Must have (Question: What for ?)
|
||||
int preScene(ssgEntity *e)
|
||||
|
@ -167,7 +168,9 @@ grLoadScene(tTrack *track)
|
|||
TheScene->addKid(TrackLightAnchor);
|
||||
|
||||
BackSkyAnchor = new ssgBranch;
|
||||
TheScene->addKid(BackSkyAnchor);
|
||||
BackSkyLoc = new ssgTransform;
|
||||
BackSkyLoc->addKid(BackSkyAnchor);
|
||||
TheScene->addKid(BackSkyLoc);
|
||||
|
||||
/* Load the background (horizon and sky) */
|
||||
grLoadBackground();
|
||||
|
@ -207,8 +210,12 @@ grLoadScene(tTrack *track)
|
|||
desc = grssgLoadAC3D(acname, NULL);
|
||||
BackSkyAnchor->addKid(desc);
|
||||
|
||||
//sgCoord backskypos;
|
||||
sgCoord BackSkypos;
|
||||
//sgSetCoord ( &backskypos, double(grWrldX/2), 0.0f, double(grWrldZ/2));
|
||||
sgSetCoord(&BackSkypos, grWrldX/2, grWrldY/2, 0, 0, 0, 0);
|
||||
BackSkyLoc->setTransform(&BackSkypos);
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue