123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8" />
- <base href="../../../" />
- <script src="list.js"></script>
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- [page:Mesh] →
- <h1>[name]</h1>
- <div class="desc">A helper object to show the world-axis-aligned bounding box for an object.</div>
- <h2>Example</h2>
- <code>var hex = 0xff0000;
- var sphereMaterial = new THREE.MeshLambertMaterial( {color: 0x00ff00} );
- var sphere = new THREE.Mesh( new THREE.SphereGeometry( 30, 12, 12), sphereMaterial );
- scene.add( sphere );
- var bbox = new THREE.BoundingBoxHelper( sphere, hex );
- bbox.update();
- scene.add( bbox );
- </code>
- <div>Note that this helper will create a wireframe [page:Mesh] object with a [page:BoxGeometry]; the resulting bounding box object will therefore have face diagonals. You may want to use [page:BoxHelper], which generates a [page:Line] object without face diagonals.</div>
- <h2>Constructor</h2>
- <h3>[name]([page:Object3D object], [page:Number hex])</h3>
- <div>
- object -- Object3D -- the object3D to show the world-axis-aligned boundingbox.<br />
- hex -- hexadecimal value to define color ex:0x888888
- </div>
- <div>
- This creates an line object to the boundingbox.
- </div>
- <h2>Properties</h2>
- <h3>[property:Object3D object]</h3>
- <div>
- Contains the object3D to show the world-axis-aligned boundingbox.
- </div>
- <h3>[property:Box3 box]</h3>
- <div>
- Contains the bounding box of the object.
- </div>
- <h2>Methods</h2>
- <h3>[method:null update]()</h3>
- <div>
- Updates the BoundingBoxHelper based on the object property.
- </div>
- <h2>Source</h2>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </body>
- </html>
|