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 );
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");
}
#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;
}
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;
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;