Topic: a couple TForm functions
could someone give these a whirl please and see if the result is what you would expect? it would be very much appreciated.
Function TFormPoint:Vector3df(x:Float,y:Float,z:Float,source:ISceneNode,dest:ISceneNode)
Local lastTForm:Vector3df=_VECTOR3DF(x,y,z)
' first convert to world from the source
If source Then source.getAbsoluteTransformation().transformVect(lastTForm)
' now from world to local
If dest Then dest.getRelativeTransformation().transformVect(lastTForm)
Return lastTForm
EndFunction
Function TFormVector:Vector3df(x:Float,y:Float,z:Float,source:ISceneNode,dest:ISceneNode)
Local v:Vector3df=_VECTOR3DF(x,y,z)
If source Then
source.getRelativeTransformation().transformVect(v)
v=v.Minus(source.getPosition())
EndIf
If dest Then dest.getAbsoluteTransformation().transformVect(v)
Return v
EndFunction