[Bf-committers] Help with Matrix problem

Alexander Ewering blender at instinctive.de
Sat Dec 11 17:33:49 CET 2004


On Sat, 11 Dec 2004, Matthew H Plough (mplough at Princeton.EDU) wrote:

> I'm glad that you got your matrix problem solved!  Would you mind spending a few minutes explaining your final reasoning?  I'm having a couple of annoying matrix problems that I can't seem to solve, and your insight might help me a lot.
>
> The semester is over!  I now have three weeks that I can spend on things other than problem sets!

I now took a different approach altogether, but this time it even works :-)

I first calculate the total boundbox of all objects by doing minmax_object
on each object seperately, and feeding that into another minmax, which gives
the total minmax of all objects (in world space).

I then construct the boundbox cube as 8 vertices (standard Blender BoundBox),
and then take those coordinates and transform them into the group object's
local space by multiplying each vertex with the object's inverse matrix.

This then still gives the problem that rotating the group object will not
rotate the boundbox (it will just change shape to accomodate the changed
positions/rotations of the group's member's), but this way selection
works.

Before, I drew the boundbox directly in global space (by using
persp(PERSP_VIEW)), but then Blender got confused when rightmouse-selecting
group objects, as it seems it expects stuff to be drawn in objects' local
spaces always.

This is pretty weird stuff. But I like the object grouping feature a lot,
and it seems quite stable and works in all situations i've tried.

Docs are here: http://blender.instinctive.de/downloads/release/docs/groups.txt

Next instinctive-blender release (in a couple of days)..

Then maybe also someone can approve some of the functionality for the
official tree... it's badly requested :)

| alexander ewering              instinctive mediaworks
| ae[@]instinctive[.]de   http://www[.]instinctive[.]de


More information about the Bf-committers mailing list