ocs->wcs transformations
ocs->wcs transformations
is there a class and method that performs ocs-to-wcs transformations (for points).
it seems somewhat laborious for everyone to have to write their own (arbitrary axis algorithm, etc.)
in general it seems the problem is:
given:
a normal vector (3d)
an ocs elevation
a point in ocs (3d)
calculate:
the wcs point (3d)
odgematrix3d seems like a logical place to look, but i can't see a way to specify the normal vector and ocs elevation....
thanks,
-allan
odgematrix3d has methods:
worldtoplane(normal) and planetoworld() returning transforms ocs<->wcs.
elevation can be taken into account for example in the following manner:
code:
odgevector3d normal;
odgepoint2d ocspoint;
odgepoint3d wcspoint;
odgematrix3d trans;
trans.settotranslation(odgevector3d(0., 0., elevation()));
trans.settoproduct(odgematrix3d:

lanetoworld(normal), trans);
wcspoint.x = ocspoint.x;
wcspoint.y = ocspoint.y;
wcspoint.z = 0;
wcspoint.transformby(trans);
// or another variant
trans = odgematrix3d:

lanetoworld(normal) ;
wcspoint.x = ocspoint.x;
wcspoint.y = ocspoint.y;
wcspoint.z = elevation;
wcspoint.transformby(trans);
sergey slezkin
thanks
thanks, sergey.
i will give it a try.
-allan