Quantcast
Channel: GameDev.net
Viewing all articles
Browse latest Browse all 17560

Performing a Ray Testing against a transformed ID3DXMesh?

$
0
0

The mesh I load from file is stored into a container and is a untransformed version,

each time it gets instanced out, I add a transform to it.

I don't really store a transformed version in my container.

Now a ray is cast, the ray does not hit the mesh because it is untransformed.

In case I really want to, I need to break down the vertex buffer and apply the world transformation at runtime

to each vertex, which I think not very effective.

Because the mesh is coming out of a MeshManager,

If I store a transformed version in it, then it won't make sense anymore

Because 2 instances coming from the meshmanager refer to the same mesh,

the 2 instances point to 2 different places but only one copy for both.

What is your opinion?

Thanks

Jack


Viewing all articles
Browse latest Browse all 17560

Trending Articles