Re: Cloning vs Copying

New Message Reply Date view Thread view Subject view Author view

Lance R. Marrou (marrou++at++vsl.ist.ucf.edu)
Sat, 11 Mar 1995 16:23:42 -0500 (EST)


On Sat, 11 Mar 1995, Robert D. King wrote:

> a. discuss the advantages and disadvantages of using pfClone and pfCopy.

pfClone() does not duplicate the geometry (usually the big memory hog). Unless
you are actually modifying the geometry dynamically, use pfClone().

>
> b. provide a code example, if convenient, which clones or copies
> object(s) loaded via one of the file formats listed.

pfGroup *node;
pfDCS *clone;

// load the file(s)
node = (pfGroup *)LoadFile(filename,NULL);

...
// clone one of them and put in a DCS (or you can use SCS or pfFlatten())
clone = pfNewDCS();
pfAddChild(clone,pfClone(node,0));

______________________________________________________________________________
           /\ ______ /\____ ______ ______ E-mail: marrou++at++vsl.ist.ucf.edu
Visual / / / _ / / __ // ____// ____/ VSL: (407)658-5073
Systems / /__ / /_/ / / / / // /___ / __/_ R. Marrou Fax: (407)658-5059
Lab /____//____/\\/_/ /_//_____//_____/ http://www.vsl.ist.ucf.edu/~marrou
"Reap the whirlwind." "We don't need no thought control."


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2.0b2 on Mon Aug 10 1998 - 17:51:03 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.