[name]
Contains handy functions geometry manipulations.
Methods
.merge( [page:Geometry geometry1] , [page:Geometry geometry2], [page:Integer materialIndexOffset] )
geometry1 — Parent geomentry element
geometry2 — Geometry that need to be added in parent
materialIndexOffset — Offset applied to the materialIndex of all the new faces in the merged geometry. Default : 0
.removeMaterials( [page:Geometry geometry1] , [page:Material materialIndexArray] )
geometry — Geometry that need to remove material
materialIndex — Material index
.randomPointInTriangle( [page:Vector VectorA] , [page:Vector VectorB] , [page:Vector VectorC])
VectorA — Vector
VectorB — Vector
VectorC — Vector
returns [page:Int Point]
.randomPointInFace( [page:face Face] , [page:geometry Geometry] , [page:Boolean useCachedAreas])
Face — Face id
Geometry — Geometry that contains the Face
useCachedAreas — Flag to use cached areas. Default : False
returns [page:Int Point]
.randomPointsInGeometry( [page:geometry Geometry] , [page:Integer Points])
Geometry — Geometry
returns [page:Int Point]
.triangleArea ( [page:Vector VectorA] , [page:Vector VectorB] , [page:Vector VectorC])
VectorA — Vector
VectorB — Vector
VectorC — Vector
returns [page:Int Area]
.center ( [page:geometry Geometry] )
Geometry — Geometry to Center position
.normalizeUVs ( [page:geometry Geometry] )
Geometry — Geometry to normalize UVS
.triangulateQuads ( [page:geometry Geometry] )
Geometry — Geometry to triangulate Quads
.setMaterialIndex ( [page:geometry Geometry] , [page:Integer index], [page:Face startFace], [page:Face endFace])
Geometry — Geometry
Index — New index value for the material
startFace — Starting range of Face
endFace — Final range of Face
.random() [page:todo]
todo
Source
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]