question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

when to call geometry. computeBoundingBox() ?

See original GitHub issue

Is there a rule on when to call geometry. computeBoundingBox()and other compute function ?

Issue Analytics

  • State:closed
  • Created 12 years ago
  • Comments:14 (13 by maintainers)

github_iconTop GitHub Comments

5reactions
Arnachecommented, Aug 18, 2017

I know it’s an old topic but the following comment by @alteredq really ought to be in the manual if it is still valid for the current version:

Bounding box is not used internally for anything, it’s there in case you need it somewhere at the application level. It’s not computed at all anywhere automatically, you need to compute it yourself.

Bounding sphere is used for frustum culling and with Ray / Projector. It’s computed automatically just on creation of objects. You need to recompute it manually if you change vertices (change positions, add / remove vertices)

1reaction
alteredqcommented, Jan 23, 2012

Bounding box is not used internally for anything, it’s there in case you need it somewhere at the application level. It’s not computed at all anywhere automatically, you need to compute it yourself.

Bounding sphere is used for frustum culling and with Ray / Projector. It’s computed automatically just on creation of objects. You need to recompute it manually if you change vertices (change positions, add / remove vertices).

Read more comments on GitHub >

github_iconTop Results From Across the Web

When should I call Geometry.computeBoundingBox() etc?
I always call the required compute methods just after I ended adding vertices, faces, etc and before creating the mesh with the geometry:...
Read more >
BufferGeometry#computeBoundingBox – three.js docs
A representation of mesh, line, or point geometry. ... You will have to call .dispose(), and create a new instance of BufferGeometry.
Read more >
Geometry.ComputeBoundingBox Method - Microsoft Learn
A Vector3 structure that describes the returned upper-right corner of the bounding box. Exceptions. Exception, Condition. InvalidCallException.
Read more >
Bounding volume collision detection with THREE.js
computeBoundingBox (); var knotBBox = new Box3( knot.geometry. ... rotation, scale, etc. we need to call the update() method so the BoxHelper ...
Read more >
Bounding volume collision detection with ... - API Manual
computeBoundingBox(); var knotBBox = new Box3( knot.geometry. ... etc. we need to call the update() method so the BoundingBoxHelper instance ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found