[page:Geometry] →

[name]

[name] can be used to generate a convex hull for a given array of 3D points. The average time complexity for this task is considered to be O(nlog(n)).

Example

[example:webgl_geometry_convex geometry / convex ]

var geometry = new THREE.ConvexGeometry( points ); var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} ); var mesh = new THREE.Mesh( geometry, material ); scene.add( mesh );

Constructor

[name]( [param:Array points] )

points — Array of [page:Vector3 Vector3s] that the resulting convex hull will contain.

Source

[link:https://github.com/mrdoob/three.js/blob/master/examples/js/geometries/ConvexGeometry.js examples/js/geometries/ConvexGeometry.js]