<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[GMan's Mods & Stuff — easier way to "cast" into subtypes]]></title>
		<link>https://gprogs.com/viewtopic.php?id=10</link>
		<atom:link href="https://gprogs.com/extern.php?action=feed&amp;tid=10&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in easier way to "cast" into subtypes.]]></description>
		<lastBuildDate>Thu, 05 Jan 2006 13:20:53 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[easier way to "cast" into subtypes]]></title>
			<link>https://gprogs.com/viewtopic.php?pid=14#p14</link>
			<description><![CDATA[<p>since all type instances are essentially stored in &quot;C&quot;, the only way to cast into a subtype is a bit manual.&nbsp; for example, casting from T_irrIAnimatedMesh into T_irrIAnimatedMeshX would take the following code:<br /></p><div class="codebox"><pre><code>Local xmesh:T_irrIAnimatedMeshX=T_irrIAnimatedMeshX.createFromHandle(animmesh.handle,False)</code></pre></div><p>this would be much cleaner with something like:<br /></p><div class="codebox"><pre><code>Local xmesh:T_irrIAnimatedMeshX=T_irrIAnimatedMeshX.createFromMesh(animmesh)</code></pre></div><p>an alternative, which may actually be the best solution now that i think about it, would be to have the getMesh() method of T_irrISceneManager return the proper subtype cast as the base type.&nbsp; this way casting would work as it should so to cast would then simply become:<br /></p><div class="codebox"><pre><code>T_irrIAnimatedMeshX(animmesh).getJointName(&quot;hand&quot;)</code></pre></div><p>this is the cleanest and most understandable.&nbsp; need to look into where else this might need to be done.&nbsp; DO IT! <img src="https://gprogs.com/img/smilies/smile.png" width="15" height="15" alt="smile" /></p>]]></description>
			<author><![CDATA[null@example.com (gman)]]></author>
			<pubDate>Thu, 05 Jan 2006 13:20:53 +0000</pubDate>
			<guid>https://gprogs.com/viewtopic.php?pid=14#p14</guid>
		</item>
	</channel>
</rss>
