21 #include <dtkCoreSupport/dtkGlobal.h>
27 class axlCylinderParametricPrivate {
41 d(new axlCylinderParametricPrivate) {
48 d->v =
new axlPoint(*(d->cylinder->secondPoint()) - (d->cylinder->firstPoint()));
56 d(new axlCylinderParametricPrivate) {
61 d->v =
new axlPoint(*(d->cylinder->secondPoint()) - (d->cylinder->firstPoint()));
71 d(new axlCylinderParametricPrivate) {
76 d->v =
new axlPoint(*(d->cylinder->secondPoint()) - (d->cylinder->firstPoint()));
86 d(new axlCylinderParametricPrivate) {
89 this->setParent(other.parent());
115 QString result =
"axlCylinderParametric";
116 result.append(
"\nCylinder :\n" + d->cylinder->description()
117 +
"\nv :\n" + d->v->description()
118 +
"\nr :\n" + d->r->description()
119 +
"\nw :\n" + d->w->description());
124 return "axlCylinderParametric";
139 *(d->cylinder) = *(other.d->cylinder);
140 *(d->v) = *(other.d->v);
141 *(d->r) = *(other.d->r);
142 *(d->w) = *(other.d->w);
148 d->r->coordinates()[0] = r[0];
149 d->r->coordinates()[1] = r[1];
150 d->r->coordinates()[2] = r[2];
158 *(d->cylinder) = cylinder;
166 return *(d->cylinder->firstPoint()) + *(d->v)*u + *(d->r)*d->cylinder->radius()*std::cos(v) + *(d->w)*d->cylinder->radius()*std::sin(v);
170 axlPoint p(*(d->cylinder->firstPoint()) + *(d->v)*u + *(d->r)*d->cylinder->radius()*std::cos(v) + *(d->w)*d->cylinder->radius()*std::sin(v));
175 axlPoint p(*(d->cylinder->firstPoint()) + *(d->v)*u + *(d->r)*d->cylinder->radius()*std::cos(v) + *(d->w)*d->cylinder->radius()*std::sin(v));
182 axlPoint* o = d->cylinder->firstPoint();
194 *(d->cylinder) = *cylinder;
Class axlPoint defines 3D points.
axlCylinderParametric & operator=(const axlCylinderParametric &other)
axlPoint * secondPoint(void) const
Returns second point of the cylinder.
Class axlCylinder defines 3D cylinders.
axlPoint * firstPoint(void) const
Returns first point of the cylinder.
virtual void parameterOf(const axlPoint &point, double &um, double &vm)
void onCylinderChanged(axlCylinder *cylinder)
axlCylinderParametric(axlAbstractSurfaceParametric *parent=0)
void onRChanged(axlPoint *r)
virtual QString identifier(void) const
static double dotProduct(const axlPoint &lhs, const axlPoint &rhs)
virtual axlPoint eval(double u, double v)
void setCylinder(axlCylinder *cylinder)
virtual QString description(void) const
static axlPoint crossProduct(const axlPoint &lhs, const axlPoint &rhs)
Returns the cross product between lhs (coords) and rhs (coords).
axlCylinder * getCylinder(void) const
virtual ~axlCylinderParametric(void)
void setCoordinates(double x, double y, double z)
Change coordinates of this point.
axlPoint * getR(void) const