Harald JOHNSEN:

- model.cxx :
  load the 2.5D panels before the animations so that the panels can be used in
  animations his solve the problem of 2.5D panels visible outside of the
  aircraft (one can add a null animation to put the panel at the top of the
  aircraft graph so it is drawn first) and this adds the possibility to have
  billboarded/popup panels.

- newcloud.cxx :
  removed 'this' pointer cast for amd64 compiler.
This commit is contained in:
ehofman
2005-08-22 17:44:35 +00:00
parent 19623cac21
commit 68eb7031e2
2 changed files with 14 additions and 12 deletions

View File

@@ -226,6 +226,7 @@ static void makeDList( ssgBranch *b, const set<ssgBranch *> &ignore )
for (int i = 0; i<nb; i++) {
ssgEntity *e = b->getKid(i);
if (e->isAKindOf(ssgTypeLeaf())) {
if( ((ssgLeaf*)e)->getNumVertices() > 0)
((ssgLeaf*)e)->makeDList();
} else if (e->isAKindOf(ssgTypeBranch()) && ignore.find((ssgBranch *)e) == ignore.end()) {
makeDList( (ssgBranch*)e, ignore );
@@ -321,6 +322,17 @@ sgLoad3DModel( const string &fg_root, const string &path,
model->addKid(align);
}
if ( load_panel ) {
// Load panels
vector<SGPropertyNode_ptr> panel_nodes = props.getChildren("panel");
for (i = 0; i < panel_nodes.size(); i++) {
SG_LOG(SG_INPUT, SG_DEBUG, "Loading a panel");
ssgEntity * panel = load_panel(panel_nodes[i]);
if (panel_nodes[i]->hasValue("name"))
panel->setName((char *)panel_nodes[i]->getStringValue("name"));
model->addKid(panel);
}
}
// Load animations
set<ssgBranch *> ignore_branches;
vector<SGPropertyNode_ptr> animation_nodes = props.getChildren("animation");
@@ -338,17 +350,6 @@ sgLoad3DModel( const string &fg_root, const string &path,
}
#endif
if ( load_panel ) {
// Load panels
vector<SGPropertyNode_ptr> panel_nodes = props.getChildren("panel");
for (i = 0; i < panel_nodes.size(); i++) {
SG_LOG(SG_INPUT, SG_DEBUG, "Loading a panel");
ssgEntity * panel = load_panel(panel_nodes[i]);
if (panel_nodes[i]->hasValue("name"))
panel->setName((char *)panel_nodes[i]->getStringValue("name"));
model->addKid(panel);
}
}
return alignmainmodel;
}

View File

@@ -48,6 +48,7 @@ bool SGNewCloud::useAnisotropic = true;
SGBbCache *SGNewCloud::cldCache = 0;
static bool texturesLoaded = false;
static float minx, maxx, miny, maxy, minz, maxz;
static int cloudIdCounter = 1;
float SGNewCloud::nearRadius = 3500.0f;
bool SGNewCloud::lowQuality = false;
@@ -64,7 +65,7 @@ void SGNewCloud::init(void) {
pauseLength = 0.0f;
last_step = -1.0f;
familly = CLFamilly_nn;
cloudId = (int) this;
cloudId = ++cloudIdCounter;
sgSetVec3(center, 0.0f, 0.0f, 0.0f);
sgSetVec3(cloudpos, 0.0f, 0.0f, 0.0f);
radius = 0.0f;