bigjhnny
01-10-2006 15:33:25
I was reading a tutorial about how to do Object Text Display by xavier. I needed to access all 8 corners of a bounding box.
The trouble is: when iterating thru this, python will automatically iterate thru the x,y,z of the first corner, but not iterate thru the 8 vectors. I guess it makes no difference to python whether it be a pointer to one vector or a pointer to an array of vectors. How would I have access to all the corners? Maybe there shouldn't be an automatic iterator over a vector?
Any ideas? I'm using the pyogre 1.2 binaries.
The trouble is: when iterating thru this, python will automatically iterate thru the x,y,z of the first corner, but not iterate thru the 8 vectors. I guess it makes no difference to python whether it be a pointer to one vector or a pointer to an array of vectors. How would I have access to all the corners? Maybe there shouldn't be an automatic iterator over a vector?
for c in node.worldAABB.corners:
# c should be a vector3, but it is x,y,z of the first corner
print c
Any ideas? I'm using the pyogre 1.2 binaries.