Using OBBoxRenderable to test interection...

A place for users of OGRE to discuss ideas and experiences of utilitising OGRE in their games / demos / applications.
Post Reply
Posts: 11
Joined: Sun Nov 25, 2007 12:23 pm

Using OBBoxRenderable to test interection...

Post by luckiejacky » Mon Oct 13, 2014 11:56 am

I would like to test two oriented bounding box intersect,
First step to go is to test whether a point is intersecting with the box.
I can't seem to get the orientation and position of a SimpleRenderable. object..
where it is derived from. And there seems to be nothing to call to work
with intersections intrinsically with OBBoxRenderables.
Any ideas?
Jack ... unding+Box

Code: Select all

bool OBBoxRenderable::Intersect(Ogre::Vector3& point) {
	// from position/orientation to matrix
	Matrix4 mat(this->getOrientation());
	mat = mat.inverse();
0 x

User avatar
OGRE Team Member
OGRE Team Member
Posts: 4116
Joined: Sat Jul 21, 2007 4:55 pm
Location: Buenos Aires, Argentina
x 243

Re: Using OBBoxRenderable to test interection...

Post by dark_sylinc » Mon Oct 13, 2014 11:17 pm

Get the SimpleRenderable's parent scene node and get the position and orientation from there.

If the scene node is a null pointer, the SimpleRenderable isn't part of the scene (because you didn't attach it to a node) and thus has no position or orientation.
0 x

Post Reply