|
double angleOnPlane(
const AcGePlanarEnt& pln) const;
pln Input plane
Returns the angle between the orthogonal projection of this vector into the plane through the origin with the same normal as planar entity pln and the zeroth basis vector v0 of the planar entity pln provided by the function pln.getCoordSystem (p, v0, v1).
AcGeVector3d normal = AcGeVector3d::kYAxis;;
AcGePlane plane(AcGePoint3d::kOrigin, normal);//平面
AcGeVector3d vect = AcGeVector3d(3,1,1);//所给出的矢量
AcGeVector3d projVect = vect.orthoProject(normal); //垂直投影
double dAngle1 = vect.angleTo(projVect); //这就是所求的一个向量vector与一个平面plane的夹角AcGePoint3d ptOr;
AcGeVector3d vectU,vectV;
plane.getCoordSystem(ptOr, vectU, vectV);
double dAngle = vect.angleOnPlane(plane);
double dAngle2 = projVect.angleTo(vectU);
|
|