18 #include <dtkCoreSupport/dtkGlobal.h>
24 class axlConeParametricPrivate {
38 d(new axlConeParametricPrivate) {
45 d->v =
new axlPoint(*(d->cone->apex()) - (d->cone->basePoint()));
53 d(new axlConeParametricPrivate) {
58 d->v =
new axlPoint(*(d->cone->apex()) - (d->cone->basePoint()));
68 d(new axlConeParametricPrivate) {
73 d->v =
new axlPoint(*(d->cone->apex()) - *(d->cone->basePoint()));
83 d(new axlConeParametricPrivate) {
86 this->setParent(other.parent());
88 d->cone =
new axlCone(other.d->cone);
112 QString result =
"axlConeParametric";
113 result.append(
"\nCone :\n" + d->cone->description()
114 +
"\nv :\n" + d->v->description()
115 +
"\nr :\n" + d->r->description()
116 +
"\nw :\n" + d->w->description());
121 return "axlConeParametric";
136 *(d->cone) = *(other.d->cone);
137 *(d->v) = *(other.d->v);
138 *(d->r) = *(other.d->r);
139 *(d->w) = *(other.d->w);
145 d->r->coordinates()[0] = r[0];
146 d->r->coordinates()[1] = r[1];
147 d->r->coordinates()[2] = r[2];
164 return *(d->cone->basePoint()) + *(d->v)*(height - height*u/d->cone->radius())*std::cos(v) + *(d->r)*(height - height*u/d->cone->radius())*std::sin(v) + *(d->w)*u;
169 axlPoint p(*(d->cone->basePoint()) + *(d->v)*(height - height*u/d->cone->radius())*std::cos(v) + *(d->r)*(height - height*u/d->cone->radius())*std::sin(v) + *(d->w)*u);
175 axlPoint p(*(d->cone->basePoint()) + *(d->v)*(height - height*u/d->cone->radius())*std::cos(v) + *(d->r)*(height - height*u/d->cone->radius())*std::sin(v) + *(d->w)*u);
Class axlPoint defines 3D points.
void onConeChanged(axlCone *cone)
void onRChanged(axlPoint *r)
axlConeParametric & operator=(const axlConeParametric &other)
virtual QString identifier(void) const
axlCone * getCone(void) const
virtual axlPoint eval(double u, double v)
axlConeParametric(axlAbstractSurfaceParametric *parent=0)
static double dotProduct(const axlPoint &lhs, const axlPoint &rhs)
virtual void parameterOf(const axlPoint &point, double &um, double &vm)
axlPoint * getR(void) const
void setCone(axlCone *cone)
Class axlCone defines 3D cones.
static axlPoint crossProduct(const axlPoint &lhs, const axlPoint &rhs)
Returns the cross product between lhs (coords) and rhs (coords).
static double distance(const axlPoint &lhs, const axlPoint &rhs)
Returns the distance between lhs point and rhs point.
void setCoordinates(double x, double y, double z)
Change coordinates of this point.
virtual ~axlConeParametric(void)
virtual QString description(void) const