4 axlPoint *
rotatePoint(
double a,
double b,
double c,
double x,
double y,
double z,
double u,
double v,
double w,
double alpha)
7 qreal a1 = (a*(qPow(v,2)+qPow(w,2))-u*(b*v+c*w-u*x-v*y-w*z))*(1-qCos(alpha))+x*qCos(alpha)+(-c*v+b*w-w*y+v*z)*qSin(alpha);
8 qreal a2 = (b*(qPow(u,2)+qPow(w,2))-v*(a*u+c*w-u*x-v*y-w*z))*(1-qCos(alpha))+y*qCos(alpha)+(c*u-a*w+w*x-u*z)*qSin(alpha);
9 qreal a3 = (c*(qPow(u,2)+qPow(v,2))-w*(a*u+b*v-u*x-v*y-w*z))*(1-qCos(alpha))+z*qCos(alpha)+(-b*u+a*v-v*x+u*y)*qSin(alpha);
10 res->setValues(a1,a2,a3);
28 double n = point.
norm();
31 point.setValues(point.
x()/n,point.
y()/n,point.
z()/n);
83 QList<axlPoint *> result;
85 if(
axlLine *line = dynamic_cast<axlLine *>(curve))
87 result.append(line->firstPoint());
88 result.append(line->secondPoint());
90 else if(
axlCircleArc *ca = dynamic_cast<axlCircleArc *>(curve))
102 for(
int i = 0; i<=40;i++)
109 double step = (curvepara->endParam()-curvepara->startParam())/40;
110 for(
int i = 0;i<41;i++)
112 result.append(
new axlPoint(curvepara->eval(curvepara->startParam()+i*step)));
bool isDirect(void) const
Class axlPoint defines 3D points.
Class axlLine defines 3D lines.
axlPoint point1(void) const
axlPoint * secondPoint(void) const
Returns second point of the line.
axlPoint center(void) const
axlPoint * RotatePoint(axlPoint a, axlPoint x, axlPoint u, double alpha)
axlPoint * firstPoint(void) const
Returns first point of the line.
axlPoint point2(void) const
double angle(axlPoint vCompute, axlPoint vRef, axlPoint normal)
QList< axlPoint * > Sampling(axlAbstractCurve *curve)
static double dotProduct(const axlPoint &lhs, const axlPoint &rhs)
axlPoint normalCCWArc(const axlCircleArc &arc)
void normalize(axlPoint &point)
axlPoint calculateNormal(void) const
axlPoint * rotatePoint(double a, double b, double c, double x, double y, double z, double u, double v, double w, double alpha)
axlPoint normal(void) const
static axlPoint crossProduct(const axlPoint &lhs, const axlPoint &rhs)
Returns the cross product between lhs (coords) and rhs (coords).
double angleOfArc(const axlCircleArc *arc)