--- 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::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 );
---
=====
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