Here is the code:
http://www.rpghorror.com/files/animationbuilder.zip
Let me know if it requires plugins or anything.
The actual modification of the memoryblock happens in the method:
Animation3D->ApplyMorpth
Scroll to this code (it was a for loop, but I changed it recently
for some reason):
if Normals=NIL or Normals1=NIL or Normals2=NIL then
//No normals to interpolate so interpolate just points
do
value1=Points1.singleValue(position)
points.singleValue(position) = value1+
(Points2.singleValue(position)-value1)*percent //apply % tweening
to points
position=position+4
value1=Points1.singleValue(position)
points.singleValue(position) = value1+
(Points2.singleValue(position)-value1)*percent
position=position+4
value1=Points1.singleValue(position)
points.singleValue(position) = value1+
(Points2.singleValue(position)-value1)*percent
position=position+4
loop until position>c2
else
//interpolate points and normals
do
//apply % tweening to points
value1=Points1.singleValue(position)
points.singleValue(position) = value1+
(Points2.singleValue(position)-value1)*percent
//apply % tweening to Normals
value1=Normals1.singleValue(position)
Normals.singleValue(position) = value1+
(Normals2.singleValue(position)-value1)*percent
position=position+4
//apply % tweening to points
value1=Points1.singleValue(position)
points.singleValue(position) = value1+
(Points2.singleValue(position)-value1)*percent
//apply % tweening to Normals
value1=Normals1.singleValue(position)
Normals.singleValue(position) = value1+
(Normals2.singleValue(position)-value1)*percent
position=position+4
//apply % tweening to points
value1=Points1.singleValue(position)
points.singleValue(position) = value1+
(Points2.singleValue(position)-value1)*percent
//apply % tweening to Normals
value1=Normals1.singleValue(position)
Normals.singleValue(position) = value1+
(Normals2.singleValue(position)-value1)*percent
position=position+4
loop until position>c2
On Mar 25, 2006, at 2:57 PM, Mike Woodworth wrote:
On Mar 25, 2006, at 5:49 PM, Frank Condello wrote:
On 25-Mar-06, at 5:26 PM, Mike Woodworth wrote:
On Mar 25, 2006, at 5:06 PM, Frank Condello wrote:
...
VecAdd, VecSub, and VecMult (vec*scalar) methods would be
enough to be useful, but more exotic combinations
(VecAddMult) and Matrix methods (VecMultMat4x4) plus Double
precision versions (VecAddD) would help flesh it out ;)
...
well, i've done exactly this for mac osx.
Awesome! Payware? Freeware? Open source?
as industrious a capitalist as i am... even i cant justify
charging for single line declares that wrap apple's hard
work :) besides, showing up those people who bitch about how
slow RB is compared to C will be payment enough.
does anyone have a simple test doing this the old scalar way
that they can send me? i'll shoe horn my vdsp classes in, and
we can get some quantifiable numbers. prefereably some simple
example where we can compare fps between the two methods.
(i'm not up enough on rb3d to do this, otherwise i might take
a crack at it, but i'd love to show you guys what i've been
doing with veclib).
Lo's animation builder may be a good test app, but I can't seem
to find a link anywhere (I'm sure he'll chime in later).
Frank.
great. lemme know Lo, and if you can point me to the methods
that are doing this, that'll make the switch even easier. I was
actually talkign to asher @ RW about how some judicious miss use
of vectorized vImage calls might speed this kinda stuff up leaps
and bounds. and there's nothing i love more than staring at
shark profiles (i wish that was sarcastic, but alas i am that
geeky)
mike
--
Mike Woodworth
mike at divergentmedia dot com
_______________________________________________
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>
_______________________________________________
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>