public void renderDynamic(CableBusContainer cableBusContainer, double x, double y, double z)
{
for (ForgeDirection s : ForgeDirection.values())
{
IPart part = cableBusContainer.getPart( s );
if ( part != null )
{
ForgeDirection ax, ay, az;
switch (s)
{
case DOWN:
ax = ForgeDirection.EAST;
ay = ForgeDirection.NORTH;
az = ForgeDirection.DOWN;
break;
case UP:
ax = ForgeDirection.EAST;
ay = ForgeDirection.SOUTH;
az = ForgeDirection.UP;
break;
case EAST:
ax = ForgeDirection.SOUTH;
ay = ForgeDirection.UP;
az = ForgeDirection.EAST;
break;
case WEST:
ax = ForgeDirection.NORTH;
ay = ForgeDirection.UP;
az = ForgeDirection.WEST;
break;
case NORTH:
ax = ForgeDirection.WEST;
ay = ForgeDirection.UP;
az = ForgeDirection.NORTH;
break;
case SOUTH:
ax = ForgeDirection.EAST;
ay = ForgeDirection.UP;
az = ForgeDirection.SOUTH;
break;
case UNKNOWN:
default:
ax = ForgeDirection.EAST;
ay = ForgeDirection.UP;
az = ForgeDirection.SOUTH;
break;
}
BusRenderHelper.instance.setOrientation( ax, ay, az );
part.renderDynamic( x, y, z, BusRenderHelper.instance, BusRenderer.instance.renderer );
}
}
}