I am studying TIG’s TextureTools code trying to understand how his extension works.
class Shunt, method process contains this:
vx=Geom::Vector3d.new(u,0,0)
vy=Geom::Vector3d.new(0,v,0)
tt=Geom::Transformation.new(pts[0], face.normal)
vx.transform!(tt)
vy.transform!(tt)
tx=Geom::Transformation.translation(vx)
ty=Geom::Transformation.translation(vy)
tr=tx * ty
Can you explain what is difference? What the exclamation means? Is it something with multiplication or power? Aslo what is the tr.
I continues like this:
tpts=[]
(0..3).each{|i|
tpts << pts[i].transform(tr)
tpts << uvs[i]
}
there the transform is used again with the tr argument. It is not clear to me what the argument is, because this looks like the transform method needs the count of pixels in the target image. How does the transform exactly work in this case?
Also is the * operator overloaded function / method for Geom::Transformation.translation? What exactly does it do?