On Sunday 17 September 2006 06:26, Jorrit Tyberghein wrote:
> That's because CS usually manually flushes the output. You have to
> flush output yourselves for your own messages if you want to see the
> result immediatelly.
I assure you this is not the problem.
> > > > --- start
> > > > (0.000000, 0.000000, 0.000000)
> > > > (199.583313, 29.670748, -131.294876)
> > > > (198.192215, 29.574041, -132.562943)
> > > > (199.585190, 30.126381, -133.123779)
> > > > (192.149185, 30.269884, -135.707047)
> > > > (192.149185, 30.269884, -135.707047)
> > > > --- end
These lines constantly scroll through the screen (with the objects position
changing), none with CS_ENTITY_NOHITBEAM. Only *after* I press escape do I
see one set of lines like
> > > > --- start
> > > > (-18.680956, 1.526901, 0.117609) CS_ENTITY_NOHITBEAM
> > > > (0.000000, 0.000000, 0.000000)
> > > > --- end
that the whole output should have looked like.
> Greetings,
>
> On 9/16/06, Amir Taaki <[EMAIL PROTECTED]> wrote:
> > On Saturday 16 September 2006 17:53, David Bronke wrote:
> > > I can't really speculate on the first few questions, but as far as why
> > > the output doesn't appear until after you've exited, it's probably
> > > because the output buffers haven't been flushed. Try calling
> > > fflush(stdout); after every printf, and it should help with that.
> >
> > I'm sure thats not the problem, since the expected output (those 2 lines)
> > have lots of exiting output before them.
> >
> > > On 9/16/06, Amir Taaki <[EMAIL PROTECTED]> wrote:
> > > > Hi,
> > > >
> > > > I'm loading a player mesh in cel using:
> > > >
> > > > csRef<iDataBuffer> rpath = vfs->GetRealPath (config->GetStr (
> > > > cfgkey+"ModelPath", "/xd/models/ships/F2.zip"));
> > > > vfs->Mount ("/xd/ship", rpath->GetData ());
> > > > pcmesh->SetPath ("/xd/ship");
> > > > pcmesh->SetMesh ("craft", "world");
> > > >
> > > > Since its a library file theres no meshes there, and a new mesh is
> > > > created using the factory "craft".
> > > > Then I set the flag CS_ENTITY_NOHITBEAM on the iMeshWrapper.
> > > >
> > > > iMeshWrapper *meshw = pcmesh->GetMesh ();
> > > > if (!meshw)
> > > > return ReportError ("Error loading model!");
> > > > meshw->GetFlags ().Set (CS_ENTITY_NOHITBEAM);
> > > > if (meshw->GetFlags ().Check (CS_ENTITY_NOHITBEAM))
> > > > printf ("mesh has CS_ENTITY_NOHITBEAM\n");
> > > >
> > > > Eventhough I have this flag set, I've been having the problem that
> > > > iSector::HitBeam () still seems to be hitting the mesh. So inside
> > > >
> > > > int csSector::IntersectSegment (
> > > > const csVector3 &start,
> > > > const csVector3 &end,
> > > > csVector3 &isect,
> > > > float *pr,
> > > > bool only_portals,
> > > > iMeshWrapper **p_mesh)
> > > >
> > > > I added printf's inside the main loop so I can see whats happening.
> > > > So it ends up looking like:
> > > >
> > > > printf ("--- start\n");
> > > > while (visit->HasNext ())
> > > > {
> > > > iVisibilityObject* vo = visit->Next ();
> > > > iMeshWrapper* mesh = vo->GetMeshWrapper ();
> > > > if (!mesh) continue;
> > > >
> > > > csVector3 pos = mesh->GetMovable ()->GetFullPosition ();
> > > >
> > > > if (mesh->GetFlags ().Check (CS_ENTITY_NOHITBEAM))
> > > > printf ("(%f, %f, %f)\tCS_ENTITY_NOHITBEAM\n", pos.x, pos.y,
> > > > pos.z); else
> > > > printf ("(%f, %f, %f)\n", pos.x, pos.y, pos.z);
> > > >
> > > > if (!mesh || mesh->GetFlags ().Check (CS_ENTITY_NOHITBEAM))
> > > > continue;
> > > >
> > > > ...
> > > > }
> > > > printf ("--- end\n");
> > > >
> > > > So when I run the app and get the output, and move the main entity
> > > > about, I get these co-ordinates (sample).
> > > >
> > > > mesh has CS_ENTITY_NOHITBEAM
> > > > --- start
> > > > (0.000000, 0.000000, 0.000000)
> > > > (199.583313, 29.670748, -131.294876)
> > > > (198.192215, 29.574041, -132.562943)
> > > > (199.585190, 30.126381, -133.123779)
> > > > (192.149185, 30.269884, -135.707047)
> > > > (192.149185, 30.269884, -135.707047)
> > > > --- end
> > > > --- start
> > > > (0.000000, 0.000000, 0.000000)
> > > > (219.525986, 26.606274, -102.077812)
> > > > (218.774399, 26.668711, -103.805153)
> > > > (220.290756, 27.169477, -103.705826)
> > > > (216.687073, 28.965502, -110.654640)
> > > > (216.687073, 28.965502, -110.654640)
> > > > --- end
> > > > --- start
> > > > (0.000000, 0.000000, 0.000000)
> > > > (216.217819, 35.918373, -29.748653)
> > > > (216.803299, 34.868767, -31.200562)
> > > > (217.965302, 35.600403, -30.379297)
> > > > (220.037277, 34.756561, -37.301964)
> > > > (220.037277, 34.756561, -37.301964)
> > > > --- end
> > > > --- start
> > > > (0.000000, 0.000000, 0.000000)
> > > > (190.191803, 46.976715, -4.965292)
> > > > (191.637878, 46.804218, -6.161789)
> > > > (192.000626, 47.459938, -4.748124)
> > > > (198.257294, 47.722618, -8.967169)
> > > > (198.257294, 47.722618, -8.967169)
> > > > --- end
> > > >
> > > > // exit the app
> > > >
> > > > --- start
> > > > (-18.680956, 1.526901, 0.117609) CS_ENTITY_NOHITBEAM
> > > > (0.000000, 0.000000, 0.000000)
> > > > --- end
> > > >
> > > > Why are there 2 co-ordinates exactly in the same place for the ship??
> > > > Why are there 3 other co-ordinates always near the ship? Why is none
> > > > of those co-ordinates display CS_ENTITY_NOHITBEAM? Why does the
> > > > expected output only appear AFTER I exit the app?
> > > >
> > > > Thanks.
> > > >
> > > > ---------------------------------------------------------------------
> > > >---- Using Tomcat but need to do more? Need to support web services,
> > > > security? Get stuff done quickly with pre-integrated technology to
> > > > make your job easier Download IBM WebSphere Application Server
> > > > v.1.0.1 based on Apache Geronimo
> > > > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121
> > > >642 _______________________________________________
> > > > Cel-main mailing list
> > > > [EMAIL PROTECTED]
> > > > https://lists.sourceforge.net/lists/listinfo/cel-main
> >
> > -------------------------------------------------------------------------
> > Using Tomcat but need to do more? Need to support web services, security?
> > Get stuff done quickly with pre-integrated technology to make your job
> > easier Download IBM WebSphere Application Server v.1.0.1 based on Apache
> > Geronimo
> > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> > _______________________________________________
> > Cel-main mailing list
> > [EMAIL PROTECTED]
> > https://lists.sourceforge.net/lists/listinfo/cel-main
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Crystal-main mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/crystal-main
Unsubscribe: mailto:[EMAIL PROTECTED]