Hi !
I'm trying to mapping the UV coordinates of a mesh with both surface panel
texturing
parameters and texture reference object.
All the stuff works fine, but the source code is somenthing like this :
(Example for a planar mapping)
---WithOut RefObject :
vertex -= texture center;
vertex.x = axis / texture center * .5
vertex.y = axis / texture center * .5
(ok... I don't remember exactly the code :-))) )
--- With RefObj
vertex -= (texture center + refObj.translate);
vertex.rotate(refObj.rotation);
vertex.x = axis / texture center*refObj.scaling * .5;
vertex.y = axis / texture center*refObj.scaling * .5;
(Hmmmmmm...Ok... I don't remember exactly the code :-))) ) (Again....)
:-))))
Well... I world like to know is there is a matrix version of the stuff
above.
Somenthing like this : MappedVertex = VertexCoordinates * MatrixOfMapping;
Davide Pirola
www.prograph.it
www.protonic.net
|