Thanks Robert. Quick as always. I'll probably have a followup question
tomorrow.
-Henrik
Robert Osfield wrote:
> Hi Henrik,
>
> On 8/7/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>> I'll skip to the collision detection part. I have a hand which have five
>> fingers each with three joints and a palm with a wrist transform in a
>> hierarchical structure. The hand is controlled by a cyberglove, so the
>> internal collision is acceptable. However, I want to register when the
>> hand reaches an object or multiple objects (in this case, just a
>> cylinder
>> in 3ds-format for testing). I have used NodeVistor and generalized the
>> method for getting the world matrix for a Node, much like the osg
>> tutorial
>> example. Now I want to turn the BoundingBox coordinates into world
>> coordinates and from my very limited math knowledge, I think the right
>> way
>> to do it is:
>>
>> pointWorld = pointLocal * localToWorldMatrix
>>
>> My questions are:
>> 1) Does this seem correct?
>
> Yep.
>
>> 2) Is this the best way/only way to do the collision detection in this
>> case?
>
> Let are lots and lots and losts of ways to collision detection, I
> certainly wouldn't won't to pick a best...
>
> But, if its easy and it works ok go do it, if doesn't perform well
> enough go search for a better solution.
>
>> 3) Apparently Vec3 = Vec3*Matrix is not implemented as operator*. How is
>> this normally done (assuming that my calc. above is correct)?
>
> They exist, they are just hidden away below the Matrixd/f classes:
>
> inline Vec3f operator* (const Vec3f& v, const Matrixd& m )
> {
> return m.preMult(v);
> }
>
> inline Vec3d operator* (const Vec3d& v, const Matrixd& m )
> {
> return m.preMult(v);
> }
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://openscenegraph.net/mailman/listinfo/osg-users
> http://www.openscenegraph.org/
>
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/