Frustum: request add function
See original GitHub issueRequest add Frustum function named containsSphere.code like this
function (sphere) {
var planes = this.planes;
for (var i = 0; i < 6; i++) {
if (planes[i].distanceToPoint(sphere.center) < sphere.radius) {
return false;
}
}
return true;
}
It will be useful to judge whether or not to see a whole object.
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
three.Frustum JavaScript and Node.js code examples - Tabnine
Simplified HTTP request client. cheerio. Tiny, fast, and elegant implementation of core jQuery designed specifically for the server. qs. A querystring parser ...
Read more >Add p5.Camera.frustum documentation on reference page
To: Sets thing. Accepts the same parameters as the global thing. More information on this function can be found there. For example, the ......
Read more >vtkExtractSelectedFrustum Class Reference - VTK
VTK: vtkExtractSelectedFrustum Class Reference. Returns the portion of the input dataset that lies within a selection frustum. More...
Read more >[Feature Request] visibility results access, frustum check
I cant find a way to ask UE4 if a actor/component was rendered last frame, aka was/is visible for a specific camera.
Read more >Surface areas of revolution - Ximera - The Ohio State University
We compute surface area of a frustrum then use the method of “Slice, Approximate, Integrate” to find areas of surface areas of revolution....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I agree that everything that’s needed is available but just for some more context OP is probably trying to calculate what is in view of a camera by the hierarchical bounds to the camera frustum – basically doing manual frustum culling so you know which objects need to be processed further for that frame. The existing
Frustum.intersectsSphere
should be enough here, though.Shameless plug but OP if you’re interested I am also working on a 3d tiles implementation for three.js that you can check out here if you’re interested:
https://github.com/NASA-AMMOS/3DTilesRendererJS
In order to determine if an object’s bounding volume is inside a specific cell of a Octree or other spatial structures like BVH, I would use
Box3.intersectsSphere()
orBox3.containsBox()
(just derive the AABB from your sphere). Not sure why you use an instance ofFrustum
🤔.It seems the existing interface is sufficient for your use case. Closing.