ON_Plane::ON_Plane( const ON_3dPoint& P, // point on the plane const ON_3dVector& X, // non-zero vector in plane const ON_3dVector& Y // another vector in the plane not parallel to X ) { CreateFromFrame(P,X,Y); }
bool ON_Plane::Transform( const ON_Xform& xform ) { ON_3dPoint origin_pt = xform*origin; // use care tranforming vectors ON_3dVector xaxis_vec = (xform*(origin+xaxis)) - origin_pt; ON_3dVector yaxis_vec = (xform*(origin+yaxis)) - origin_pt; return CreateFromFrame( origin_pt, xaxis_vec, yaxis_vec ); }
bool ON_Plane::Transform( const ON_Xform& xform ) { if ( xform.IsIdentity() ) { // 27 October 2011 Dale Lear // If the plane is valid and the transformation // is the identity, then NO changes should be // made to the plane's values. In particular // calling CreateFromFrame() can introduce // slight fuzz. // // Please discuss any changes with me. return IsValid(); } ON_3dPoint origin_pt = xform*origin; // use care tranforming vectors ON_3dVector xaxis_vec = (xform*(origin+xaxis)) - origin_pt; ON_3dVector yaxis_vec = (xform*(origin+yaxis)) - origin_pt; return CreateFromFrame( origin_pt, xaxis_vec, yaxis_vec ); }