Also, could you please give me a very simple example of how to use
declares (or however) to open up an obect3D (maybe as a TriMesh?)
and read/edit vertex positions?
There's no example simpler than the "Mesh Deformation" article in RB
Developer. Check that out, it really is the best way to start. You
can download the sample project from the RBD web site right away,
and start poking at it while you wait for the back-issue to arrive.
Ok, it turned out that the part of the examples which was confusing
me was the memoryblocks, not the trimesh code, but I have sorted that
out thanks to Matt Neuburg's book and trimesh examples in "Mesh
Deformation" and on the RB CD.
That was the harder part of the problem; I coded the actual MorphMap
class without too much difficulty after figuring out how memoryblocks
work.
So now I have a functional class, MorphMap, which has two methods
(not including one which extracts a trimesh from an object 3D). The
first method, a constructor, asks for two object 3D's, and compares
their verticies, storing the differences in an array. The next
method, ApplyMorph, asks for an object3D and a percentage as an
integer. This method moves the verticies in the object3D a particular
distance according the stored offsets for each point and the
percentage.
This works well, and I have tested it a few times with a 3D model on
a timer. The animation is smooth and does what I would expect. I have
written some notes included in the class which tell how to use it and
give examples.
If anyone would like a copy of this class, contact me off list (I
haven't been able to get it on the internet yet).
-Joe Raffanti
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|