package com.akjava.gwt.three.client.extras;

import com.akjava.gwt.three.client.core.Geometry;
import com.akjava.gwt.three.client.objects.Mesh;

public class GeometryUtils {

	public static native final void center(Geometry geo)/*-{
	return $wnd.THREE.GeometryUtils.center(geo);
	}-*/;
	
	/**
	 * @deprecated use Geometry.clone();
	 * @param geo
	 * @return
	 */
	public static native final Geometry clone(Geometry geo)/*-{
	return geo.clone();
	}-*/;

	public static native final void merge(Geometry geo,Geometry geo2)/*-{
	return $wnd.THREE.GeometryUtils.merge(geo,geo2);
	}-*/;
	
	public static native final void merge(Geometry geo,Mesh mesh)/*-{
	return $wnd.THREE.GeometryUtils.merge(geo,mesh);
	}-*/;
}

@@ -130,20 +130,127 @@
 ent.
-objects.Mesh
+math.Vector3;%0D%0Aimport com.akjava.gwt.three.client.objects.Mesh;%0D%0Aimport com.google.gwt.user.client.ui.CustomButton.Face
 ;%0D%0A%0D
@@ -569,24 +569,202 @@
 %0D%0A%09%7D-*/;%0D%0A%0D%0A
+%09public static native final void merge(Geometry geo,Geometry geo2,int materialIndexOffset)/*-%7B%0D%0A%09return $wnd.THREE.GeometryUtils.merge(geo,geo2,materialIndexOffset);%0D%0A%09%7D-*/;%0D%0A%09%0D%0A
 %09public stat
@@ -946,16 +946,40 @@
 esh mesh
+,int materialIndexOffset
 )/*-%7B%0D%0A%09
@@ -1024,16 +1024,1087 @@
 geo,mesh
+,materialIndexOffset);%0D%0A%09%7D-*/;%0D%0A%09%0D%0A%09public static native final void merge(Geometry geo,Mesh mesh)/*-%7B%0D%0A%09return $wnd.THREE.GeometryUtils.merge(geo,mesh);%0D%0A%09%7D-*/;%0D%0A%09%0D%0A%09public static final native Vector3 randomPointInTriangle(Vector3 vectorA, Vector3 vectorB, Vector3 vectorC )/*-%7B%0D%0A%09return $wnd.THREE.GeometryUtils.randomPointInTriangle(vectorA, vectorB, vectorC );%0D%0A%09%7D-*/;%0D%0A%09%0D%0A%09public static final native Vector3 randomPointInFace(Face face,Geometry geometry,boolean useCachedAreas)/*-%7B%0D%0A%09return $wnd.THREE.GeometryUtils.randomPointInFace(face,geometry,useCachedAreas);%0D%0A%09%7D-*/;%0D%0A%09%0D%0A%09public static final native Vector3 randomPointsInGeometry(Geometry geometry,int n)/*-%7B%0D%0A%09return $wnd.THREE.GeometryUtils.randomPointsInGeometry(geometry,n);%0D%0A%09%7D-*/;%0D%0A%09%0D%0A%09public static final native double triangleArea(Vector3 vectorA, Vector3 vectorB, Vector3 vectorC )/*-%7B%0D%0A%09return $wnd.THREE.GeometryUtils.triangleArea(vectorA, vectorB, vectorC );%0D%0A%09%7D-*/;%0D%0A%09%0D%0A%09%0D%0A%09public static final native void triangulateQuads(Geometry geometry)/*-%7B%0D%0A%09$wnd.THREE.GeometryUtils.triangulateQuads(geometry
 );%0D%0A%09%7D-*

update geometryutils