Lance Marrou (marrou++at++vsl.ist.ucf.edu)
Sat, 21 May 1994 21:15:51 -0700
I am not sure if someone as already responded to this, but here is my
solution for this problem. As a new object is cloned, the top-level
DCS (or whatever the top-level node is) is named specifically. That is,
the "clone" is attached to a specific name which is then thrown on the
scene graph. You can then use pfGetNodeName for the current clone
name and attach the names of the DCSes to this top-level. pfFindDCS does
take an argument, which is the path of the DCS. I hope this makes sense,
if not let me know. The following is an example (part of my code) which
finds the fulcrum DCS of an articulated AVLB using the top-level DCS
entity_dcs:
// note that overhead and entity_dcs are class variables of type pfDCS
char path[100];
char name[100];
strcpy(path, "/");
if (pfGetNodeName(entity_dcs))
{
strcat(path, pfGetNodeName(entity_dcs));
strcat(path, "/");
}
strcpy(name,path);
overhead = pfFindDCS(strcat(name, "Fulcrum"));
if (overhead == NULL)
{
fprintf(stdout,"Could not find overhead (Fulcrum) DCS.\n");
fprintf(stdout,"\tlooking for: %s\n",name);
fflush(stdout);
}
_______________________________________________________
IST __ E-mail: marrou++at++vsl.ist.ucf.edu
Visual / / ______ /\____ ______ ______
Systems / / / _ / / __ // ____// ____/
Lab / /__ / /_/ / / / / // /___ / __/_ R. Marrou
________/____//____/\\/_/ /_//_____//_____/____________
This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:50:17 PDT