Assemblies – What are they ? What are theeeeeeey!!??

An assembly object in Nytro terms, is a scene node that holds a hierarchy of scene nodes or slots for scene nodes. So for example you have a tank with wheels attached to a body, a turret that can rotate, and a gun attached on that turret. Also for the muzzle flash particle system you have a slot on the gun, at its end. All this complex hierarchy is defined in a *.assembly.xml file format. Here we have a video example:

<assembly>
	<slots>
		<slot class="Model" name="body" file="models/body/body.model.xml" translation="1.870190,0.018445,-0.069976" pivot="0.000000,0.000000,0.000000" rotation="0.000000,0.000000,0.000000,0.000000" scale="1.000000,1.000000,1.000000" >
			<slots>
				<slot class="Model" name="turret" file="models/turret/turret.model.xml" translation="5.246300,14.022100,0.408924" pivot="0.000000,0.000000,0.000000" rotation="4.111712,0.000000,1.000000,0.000000" scale="1.000000,1.000000,1.000000" >
					<slots>
						<slot class="Model" name="gun" file="models/gun/gun.model.xml" translation="-10.754400,5.583590,-0.214642" pivot="-10.926900,-1.618770,-0.000000" rotation="90.000000,1.000000,0.000000,0.000000" scale="1.000000,1.000000,1.000000" />
					</slots>
				</slot>
				<slot class="Model" name="wheel_front_l" file="models/wheel_front_l/wheel_front_l.model.xml" translation="-18.369900,6.254620,22.929800" pivot="0.000000,-2.952030,0.000000" rotation="90.047203,0.999177,0.028690,0.028690" scale="1.000000,1.000000,1.000000" />
				<slot class="Model" name="wheel_front_r" file="models/wheel_front_r/wheel_front_r.model.xml" translation="-18.369900,6.254620,-22.176701" pivot="0.000000,-2.952030,0.000000" rotation="90.000000,1.000000,0.000000,0.000000" scale="1.000000,1.000000,1.000000" />
				<slot class="Model" name="wheel_back_r" file="models/wheel_back_r/wheel_back_r.model.xml" translation="19.323000,6.254620,-22.176701" pivot="0.000000,-2.952030,0.000000" rotation="90.000000,1.000000,0.000000,0.000000" scale="1.000000,1.000000,1.000000" />
				<slot class="Model" name="wheel_back_l" file="models/wheel_back_l/wheel_back_l.model.xml" translation="19.323000,6.254620,22.929800" pivot="0.000000,-2.952030,0.000000" rotation="90.000000,1.000000,0.000000,0.000000" scale="1.000000,1.000000,1.000000" />
			</slots>
		</slot>
	</slots>
</assembly>

Leave a Reply

You must be logged in to post a comment.