I was wondering if there's anyone that can help me with the following idea. I am currently working on a CSG library. I made a function to import models. The models get converted to planes, and later on rebuild to vertices. For material editing I am using texture matrices per plane. I would like to continue this, but I am facing a problem/idea:
When reading an existing model, I can get the position, normal and texture coordinates for a given vertex/triangle. Since I can get the three vertices and texture coordinates of a triangle, I was wondering if there is a way to construct a Matrix from those parameters to recreate the texture coordinates after the CSG process.
This would mean that the matrix would be able to calculate texture coordinates by transforming the vertex position.
The reason I would like for this to work, is that I can reuse the texture coordinates in the models, making the initial model look much better.
I would prefer examples in C# if I have a choice, but any language will do :-) Idea's are very welcome as well. Any clarification can be provided also.