bounding-box

How to compute bounding box/sphere across multiple meshes (C#)

I load multiple meshs from .x files in different mesh variables. Now I would like to calculate the bounding sphere across all the meshes I have loaded (and which are being displayed) Please guide me how this could be achieved. Can VertexBuffers be appended togather in one variable and the boundingSphere be computed using that? (if yes h...

What is the proper way to get bounding box for HTML elements relative to the Window?

I'm writing a Firefox extension. I'm trying to limit it to just XUL+Javascript (no XPCOM). When I get a mouseover event for an HTML element, I need to get its bounding box in the windows coordinate system (that is the built-in XUL document browser.xul). The obvious place to start is to put something like this in the mouseover event ...

Getting the bounds of a polyine in Google Maps API v3

Is there any easy ways to find the bounding box of a polyline using Google Maps API v3? I'm working on a project where I need to update the bounds as data is added and removed from the map. This is pretty easy by just doing bd.extend(point) where bd is the bound object and point is a LatLng object. The problem is when I start removing da...

How to obtain bounding box of transformed text(java)?

Currently I have a text object that I need to determine its bounds. I used to use the graphics object to obtain the font metrics of the text I am trying to draw, but since I added functionality to rotating the object(and possibly more) I need a better way to get the bounds of this object. I have looked multiple places and nothing has rea...

Pseudocode for Swept AABB Collision

I think swept means determining if objects will collide at some point, not just whether they are currently colliding, but if I'm wrong tell me. I have objects with bounded boxes that are aligned on an axis. The boxes of objects can be different sizes, but they are always rectangular. I've tried and tried to figure out an algorithm to ...

Actionscript getBounds : what if the targetCoOrdinateSpace is not added to stage

I have two display objects dispObj1, dispObj2. dispObj2.stage is null. (i.e. it is not added to stage anyhow) What should be the output of dispObj1.getBounds(dispObj2)? Is it well defined, or could it be arbitrary? Once I got x of boundingRectangle close to 6710785, which I guess is a symptom of an integer overflow somewhere. But othe...

Calculate the bounding box of a GDI+ drawing for bitmap export

I have a .NET Windows.Forms diagram editor that can export its diagrams as bitmaps. It also comes with a command line utility that just converts diagrams to bitmap images. I don't want to scale the diagram to a given bitmap size; instead, I want to size the bitmap based on the diagram's bounding box. I can easily determine it after dra...

How to get string width on Android?

I would like to get height too if possible. ...

2D Bounding box collission

Hi, i'm having some problems with collission in a small 2D game i'm writing. I'm currently working on a function that i want to find if the player character collides with a block, and which side of the block he collided with. Currently i have something like (psuedo-code): if(PLAYER_BOX IS WITHIN THE BLOCKS Y_RANGE) { if(PLAYER_BOX_...

Find best fit axis aligned bounding box (AABB) INSIDE of a orientend bounding box (OBB)?

Hi, I can't figure out a simple solution for the following problem: I start with rotating, scaling and translating a AABB (lets call X) which will result in a OBB (lets call Y) Now I want to figure out a new AABB (lets call Z) inside of the OBB (called Y) which fits best. How can I solve this? BTW: I know that there may exists mult...

Python: how to know how many colors in a bounding box in PIL?

Hey, I've got so many PIL bounding box(x,y, x1,y1) I just want to know how many colors are there in the bounding box, is there any fast way to do? ...