Dwight Meglan (dwight++at++ht.com)
Wed, 17 Apr 1996 16:20:37 -0400
Has anyone used pfdSpatialize and could you point out what I am doing wrong
in the following code snippet ?
--snip-- --snip-- --snip-- --snip-- --snip-- --snip-- --snip-- --snip--
--snip-- --snip-- --snip--
#include <stdio.h>
#include <stdlib.h>
#include <Performer/pf.h>
#include <Performer/pfdu.h>
#include <Performer/pf/pfGroup.h>
#include <Performer/pf/pfNode.h>
#include <Performer/pf/pfScene.h>
int main (int argc, char *argv[])
{
pfInit();
pfMultiprocess(PFMP_APPCULLDRAW);
pfdInitConverter(argv[1]);
pfConfig();
pfNotifyLevel(PFNFY_FATAL | PFNFY_DEBUG);
pfScene *scene = new pfScene();
scene->addChild(pfdLoadFile(argv[1]));
int ndiv= 100;
if (argc > 3) ndiv= atoi(argv[3]);
int ngset= 2;
if (argc > 4) ngset= atoi(argv[4]);
pfSphere bsphere;
scene->getBound(&bsphere);
float tol= bsphere.radius/ndiv;
fprintf(stderr,"Spatializing with max Geode size of %f and max
numGeosets/Geode of %d into %s\n",
tol,ngset,argv[2]);
pfGroup* newScene= pfdSpatialize((pfGroup*)scene,tol,ngset);
pfdStoreFile(newScene,argv[2]);
pfExit();
return 0;
}
--snip-- --snip-- --snip-- --snip-- --snip-- --snip-- --snip-- --snip--
--snip-- --snip-- --snip--
I have tried the above with many permutations including the following which
should generate a minimal octree:
breakup biggeoset.iv lotsogeosets.iv 2 10
I still get the process being killed -- usually by all the swap space being
consumed which makes me suspect that pfdSpatialize is recursing to
oblivion.
Thanks in advance for advice on this,
--dwight
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dwight Meglan, PhD | Developers of complete surgery simulation
Engineering Coordinator | training systems and surgery simulation
High Techsplanations, Inc. | creation software tools
6001 Montrose Rd., Suite 902 |
Rockville, MD 20852-4874 | "Witty, yet erudite saying goes here..."
301 984 3706 x38 |
301 984 2104 : FAX |
dwight++at++ht.com | http://www.ht.com
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:52:44 PDT