Question about TriangleMesh

sandeep_slash
Posts: 48
Joined: Thu Jul 10, 2008 6:36 pm

Question about TriangleMesh

Post by sandeep_slash »

I got a few doubts in mind.

My tool generates vertices, indices, triangles info, etc everything required for constructing a btBvhTriangleMeshShape.
I've vehicle created at random position and I'm doing Vertical Raycast to find ground (Trimesh), so that the vehicle position is automatically adjusted.
Even by default, if the m_worldtransform is set to identity, the mesh would be transformed to Origin in Worldspace and this would change all the vertices position. As vertices already have position in worldspace, I do not want to apply transformation to TriMesh. How can I do this.

And one more thing, is to possible to use Collision Geometry (btCollisionShape) without creating a rigidbody for it?


Thanks,
Sandeep
sparkprime
Posts: 508
Joined: Fri May 30, 2008 2:51 am
Location: Ossining, New York

Re: Question about TriangleMesh

Post by sparkprime »

It was mentioned on another thread that you can just add the collision shape to the dynamics world, and I believe it will just sit there, getting in the way of the rigid bodies.

I take it you are worried about the overhead of applying the identity transformation all the time? Are you sure this overhead is significant?
sandeep_slash
Posts: 48
Joined: Thu Jul 10, 2008 6:36 pm

Re: Question about TriangleMesh

Post by sandeep_slash »

Sorry... I think I got you confused....

When I create a TriMesh, I don't want to apply any tranformation to it... Is it possible?
chunky
Posts: 145
Joined: Tue Oct 30, 2007 9:23 pm

Re: Question about TriangleMesh

Post by chunky »

Even by default, if the m_worldtransform is set to identity, the mesh would be transformed to Origin in Worldspace and this would change all the vertices position. As vertices already have position in worldspace, I do not want to apply transformation to TriMesh. How can I do this.
Translating the vertices by the identity leaves them unmoved. That's kinda the point of the identity. Can you show some code where it's not doing what you want?

Gary (-;
sandeep_slash
Posts: 48
Joined: Thu Jul 10, 2008 6:36 pm

Re: Question about TriangleMesh

Post by sandeep_slash »

Sry..... I'm such a noob... :(
sandeep_slash
Posts: 48
Joined: Thu Jul 10, 2008 6:36 pm

Re: Question about TriangleMesh

Post by sandeep_slash »

I would like to know one more thing....

I've a composite object (car...i.e. 1 rigid body with multiple geoms) in my application. I want to check collision between staticplane and one of the geoms (for e.g. wheels) of the composite object. Is it possible to do that?... I don't want to check collision between staticplane and the entire composite object?


Sandeep....