Interface TrolleySkin

public interface TrolleySkin

Implementations of this interface are used for the geometry and appearance of the Trolley in Zplax! The trolley travels on the rail around the island and holds the gun. The gun is at position (0.0,4.0,0.0) relative to the trolley. You should take care to allow space for the gun to elevate and depress. Whatever geometry you create it should be placed in a transform group that is returned in the getTrolley method. You are free to apply any transform you want to the transform group as it is not altered further. Rather it is added to a seperate transform group in the main application.

Method Summary
 com.xith3d.scenegraph.TransformGroup getTrolley()
          This method is called once when the skin is loaded.
 void gunFired(long currentTime)
          Called when the gun is fired.
 void update(long currentTime, com.xith3d.scenegraph.Transform3D baseTrans)
          This method is called once each frame.

Method Detail


public com.xith3d.scenegraph.TransformGroup getTrolley()
This method is called once when the skin is loaded. The returned TransformGroup is added to the scene via a second transform group that places the gun in the right location.

A TransformGroup containing the trolley.


public void update(long currentTime,
                   com.xith3d.scenegraph.Transform3D baseTrans)
This method is called once each frame.

currentTime - The time in nanoseconds. Note that this is not some absolute time, rather it is relative to previous currentTime's passed
baseTrans - The base transform of the trolley. You should not alter this but you may use it to do stuff like update something like a CubeMap.


public void gunFired(long currentTime)
Called when the gun is fired.

currentTime - The time the gun was fired in nanoseconds

Copyright © 2005 Alistair Dickie. All Rights Reserved.

Alistair Dickie - See http://zplax.alistairdickie.com for contact details and more information.