public static BoundingBox calculateAxisAlignedBoundingBox(Object3D object) 
	{
		final Matrix matrix = new Matrix( object.getModelMatrix() );
		matrix.set( 3 , 0 , 0 ); // discard any translation that might be present
		matrix.set( 3 , 1 , 0 );
		matrix.set( 3 , 2 , 0 );
		matrix.set( 3 , 3 , 1 );
		
		final float[] transformed;
		if ( object.getOrientedBoundingBox() == null ) 
		{
			System.err.println("ERROR: Object "+object+" has no oriented BB , using all vertices for AABB calculation");
			transformed = matrix.multiply( object.getVertices() );
		} else {
			transformed = matrix.multiply( object.getOrientedBoundingBox().getVertices() );
		}
		
		float xMin = transformed[0];
		float xMax = xMin;

		float yMin = transformed[1];
		float yMax = yMin;

		float zMin = transformed[2];
		float zMax = zMin;

		for ( int i = 1 ; i < transformed.length ; i+=4 ) 
		{
			final float x = transformed[i];
			final float y = transformed[i+1];
			final float z = transformed[i+2];
			
			if ( x < xMin ) {
				xMin = x;
			}
			if ( y < yMin ) {
				yMin = y;
			}
			if ( z < zMin ) {
				zMin = z;
			}			
			if ( x > xMax ) {
				xMax = x;
			}		
			if ( y > yMax ) {
				yMax = y;
			}
			if ( z > zMax ) {
				zMax = z;
			}			
		}

		float width = xMax - xMin;
		float height = yMax - yMin;
		float depth = zMax - zMin;

		final Vector4 center = new Vector4( xMin + (width / 2) , yMin + ( height / 2 ) , zMin + (depth/2) );
		return new BoundingBox( center , X_AXIS , Y_AXIS , Z_AXIS , width, height , depth , true );			
	}