How do I get the rotation (ie. amount of spin around the direction of the light) of a WorldRectangular light please?
I also need the length and width of the light source, but the LightObject.LightGeometry.Length (and Width) is a Vector3d rather than a single float. What do Length and Width actually contain please?
EDIT: What I really need is the transformation matrix of the area light (from a 1m x 1m plane).
They are two sides of the rectangular light from the light location. Since they are vectors you can call use their property Lengh to get a scalar out of them.
So you have a location (Point3d) and two vectors. You should be able to figure out the transformation matrix from that. For Raytraced I set up the area light like this:
Nathan - I have been able to get this working using your suggestion above. It is not a trivial solution, but seems to work.
I would suggest the Rhino Lights have an XForm property added (similar to InstanceObjects) so that the camera transform can be obtained in a consistent fashion with other parts of Rhino.
Thanks Nathan. It looks like the rotation transform helper is for rotations only, however a full transformation matrix (scale, rotation, translation) as is supplied with a block instance would be great.