From: Jean-Christophe Lombardo (jean-christophe.lombardo++at++cstb.fr)
Date: 12/02/2005 02:17:20
It works !
Thanks a lot for your help
Still, there is a scary comment in libpfui.cxx pfiXformer::collide()
code. Once the collider has been updated and before the xFormer update
its internal parameters according to the collider it is written:
/* If collisions are enabled,
* get prev position back from collider (may be running in
* a separate asynch process but partial updates are probably ok).
*/
I'd really like to know what *partial updates are probably ok* truely
means....
Can someone form the pf team answer this ?
jcl
Donald Tidrow wrote:
>On Thu, 2005-12-01 at 11:00, Jean-Christophe Lombardo wrote:
>
>
>>I've tryed this and it works well to pass data from APP to ISECT.
>>But the array of results is empty when seen from the APP process (in
>>PostDraw) although it has been filled in ISECT...
>>
>>
>>
>>
>Okay, then in the isectData region passed to the isect process, set up a
>pointer to a region of memory that is allocated using pfMalloc -
>something like this:
>
>struct IsectReturnData
>{
> pfVec3 isectPoint;
> pfVec3 isectNormal;
> (etc...)
>};
>
>struct IsectData
>{
> int numSegs; // number of active segments
> // might also need to pass in the nodes to intersect against
> pfSeg* querySegs;
> isectReturnData* returnData;
> int* flag;
>};
>
>
>(in APP)
>
>void* arena = pfGetSharedArena();
>IsectData* isectData = (IsectData*) pfAllocIsectData(sizeof(IsectData));
>isectData->querySegs = pfMalloc(sizeof(pfSeg)*16, arena);
>isectData->returnData = pfMalloc(sizeof(IsectReturnData),arena);
>isectData->flag = pfMalloc(sizeof(int), arena);
>
>(later, in APP main loop)
>
>pfSync();
>
>(fill in the data for the segment array)
>
>pfPassIsectData();
>
>pfFrame();
>
>
>
>The way I understand it is that the data gets copied from the APP
>process to the ISECT process when pfPassIsectData() gets called, so what
>you need to do is pass a pointer to a chunk of memory allocated from the
>pfSharedArena. That way, both the APP and ISECT processes will see the
>same chunk of memory.
>
>It's been awhile since I worked with Performer, so my
>memory/understanding may be a bit rusty. :-)
>
>Don
>
>
>
-- Jean-Christophe Lombardo - Salle Immersive "Le Corbusier" http://salle-immersive.cstb.fr EVE / Centre Scientifique et Technique du Batiment 290 route des Lucioles - BP 209 - 06904 Sophia Antipolis - France
This archive was generated by hypermail 2b29 : Fri Dec 02 2005 - 02:15:15 PST