|
![](/i/fill.gif) |
SharkD schrieb:
> On 11/15/2009 5:51 AM, clipka wrote:
>> :-P
>
> OK, wow. That was easy!
>
> However, I still need to know how to apply the matrix to a coordinate or
> vector as opposed to an object.
#declare MyTransform = transform {
matrix < ... >
}
#declare MyInverseTransform = transform {
MyTransform // or directly specify the matrix here
inverse
}
#include "transforms.inc"
#declare V2 = vtransform(V1, MyInverseTransform)
// or:
// #declare V2 = vinv_transform(V1, MyTransform)
(When applying the matrix to a direction vector - as opposed to a
location vector, i.e. a point - make sure the matrix doesn't have a
translation component, unless you're perfectly sure what you're doing.)
Post a reply to this message
|
![](/i/fill.gif) |