First, My excuses if the message got posted multiple times !copy&paste screwed up...
--- David Findlay <[EMAIL PROTECTED]> wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On 07:09, giovedì 12 dicembre 2002, ace project > wrote this piece of wisdom: > > Our (ACE/ICE) multiplayer engine is ready to draw > > planes in the game now, but I cant seem to figure > out > > how to add them to the drawing graph in a way that > I > > can actually see them. > > > > Does anyone know how to do this or know the > pitfalls > > why is it failing ? > > Have you checked in the NetworkOLK code? Thanks, > > David > I've checked that one to, but I haven't seen it in action yet (It worked Linux-only right?) Both initialistation look similair: --- FGModelPlacement::FGModelPlacement () : _lon_deg(0), _lat_deg(0), _elev_ft(0), _roll_deg(0), _pitch_deg(0), _heading_deg(0), _selector(new ssgSelector), _position(new ssgTransform), _location(new FGLocation) { } FGModelPlacement::init (const string &path) { ssgBranch * model = fgLoad3DModel(path); if (model != 0) _position->addKid(model); _selector->addKid(_position); _selector->clrTraversalMaskBits(SSGTRAV_HOT); } void FGModelPlacement::update () { _location->setPosition( _lon_deg, _lat_deg, _elev_ft ); _location->setOrientation( _roll_deg, _pitch_deg, _heading_deg ); sgMat4 POS; sgCopyMat4(POS, _location->getTransformMatrix()); sgVec3 trans; sgCopyVec3(trans, _location->get_view_pos()); for(int i = 0; i < 4; i++) { float tmp = POS[i][3]; for( int j=0; j<3; j++ ) { POS[i][j] += (tmp * trans[j]); } } _position->setTransform(POS); } --- Versus --- new_ele->fgd_sel = new ssgSelector; new_ele->fgd_pos = new ssgTransform; ssgEntity *fgd_obj = globals->get_model_loader()->load_model( "tuxcopter.ac" ); fgd_obj->clrTraversalMaskBits( SSGTRAV_HOT ); new_ele->fgd_pos->addKid( fgd_obj ); new_ele->fgd_sel->addKid( new_ele->fgd_pos ); ssgFlatten( fgd_obj ); ssgStripify( new_ele->fgd_sel ); fgd_scene->addKid( new_ele->fgd_sel ); fgd_scene->addKid( fgd_obj ); --- Spotted differences, don't know what they mean yet: - olk : uses fgd_scene as root of the tree. - model : uses globals->get_scenery->... - olk : uses no path to load a model - model : uses a relative path to a model, error possible here. - olk : uses globals->get_model_loader()->load_model(...) - model : first adds model to _position, then _position to _selector. modelmgr takes care of adding model to the tree (so does my code) - olk : uses ssgFlattern, dont know what this is (yet) - olk : uses ssgStripify, dont know what this is (yet) Uhmmm, enough food for me to look into. Any other hints ? (I'm to bed now, time to process the info in deep sleep) Leon ===== My Flight Gear Multiplayer Stuff (work-in-progress): http://www.kbs.twi.tudelft.nl/People/Students/L.Otte/ OK, I admit it: My girlfriend's just an object to me. Unfortunately, there is some information hiding, but thankfully, she's fairly encapsulated, nicely modular, and has a very well defined interface! __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com _______________________________________________ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel