<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[GMan's Mods & Stuff — a couple TForm functions]]></title>
	<link rel="self" href="https://gprogs.com/extern.php?action=feed&amp;tid=139&amp;type=atom" />
	<updated>2009-03-10T12:49:49Z</updated>
	<generator>PunBB</generator>
	<id>https://gprogs.com/viewtopic.php?id=139</id>
		<entry>
			<title type="html"><![CDATA[Re: a couple TForm functions]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=1398#p1398" />
			<content type="html"><![CDATA[<p>I tried Tformpoint and it works</p>]]></content>
			<author>
				<name><![CDATA[Slenkar]]></name>
				<uri>https://gprogs.com/profile.php?id=40</uri>
			</author>
			<updated>2009-03-10T12:49:49Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=1398#p1398</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: a couple TForm functions]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=586#p586" />
			<content type="html"><![CDATA[<p>lol.<br />If I knew what it was supposed to do I could have a go at telling you if it worked.</p><p>Does TFormVector work like this,<br />X,Y,Z is a vector form source, (Lets say where the spacestation is from my spaceship)<br />and it returns a vector to the same place from somewhere else? (Say where the station is from my escape capsole)</p><p>Im afraid I cannot see what TFormPoint is doing</p><p>(You&nbsp; probably need people who have used B3d to test it dont you?)</p>]]></content>
			<author>
				<name><![CDATA[H&K]]></name>
				<uri>https://gprogs.com/profile.php?id=36</uri>
			</author>
			<updated>2006-12-31T17:33:10Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=586#p586</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[a couple TForm functions]]></title>
			<link rel="alternate" href="https://gprogs.com/viewtopic.php?pid=585#p585" />
			<content type="html"><![CDATA[<p>could someone give these a whirl please and see if the result is what you would expect?&nbsp; it would be very much appreciated.<br /></p><div class="codebox"><pre><code>Function TFormPoint:Vector3df(x:Float,y:Float,z:Float,source:ISceneNode,dest:ISceneNode)
    Local lastTForm:Vector3df=_VECTOR3DF(x,y,z)

    &#039; first convert to world from the source
    If source Then source.getAbsoluteTransformation().transformVect(lastTForm)

    &#039; 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</code></pre></div>]]></content>
			<author>
				<name><![CDATA[gman]]></name>
				<uri>https://gprogs.com/profile.php?id=2</uri>
			</author>
			<updated>2006-12-31T15:13:14Z</updated>
			<id>https://gprogs.com/viewtopic.php?pid=585#p585</id>
		</entry>
</feed>
