24 #include <dtkCoreSupport/dtkGlobal.h>
89 this->setParent(other.parent());
118 *(d->p1) = *(other.d->p1);
119 *(d->p2) = *(other.d->p2);
204 d->p1->coordinates()[0] = p1[0];
205 d->p1->coordinates()[1] = p1[1];
206 d->p1->coordinates()[2] = p1[2];
216 d->p2->coordinates()[0] = p2[0];
217 d->p2->coordinates()[1] = p2[1];
218 d->p2->coordinates()[2] = p2[2];
243 d->p1->transformAsPoint(matrix);
244 d->p2->transformAsPoint(matrix);
295 QString result =
"axlLine";
296 result.append(
"\nfirstPoint : "+d->p1->description() +
"\nsecondPoint : "+d->p2->description());
321 QVariant
id = QVariant::fromValue(
identifier());
322 QVariantList
point1 = d->p1->convertDataToQVariant();
323 QVariantList
point2 = d->p2->convertDataToQVariant();
327 QVariant name = QVariant::fromValue(objectName());
335 point1.append(data.at(1));
336 point1.append(data.at(2));
337 point1.append(data.at(3));
338 point1.append(data.at(4));
339 point1.append(data.at(5));
340 d->p1->convertQVariantToData(point1);
342 point2.append(data.at(6));
343 point2.append(data.at(7));
344 point2.append(data.at(8));
345 point2.append(data.at(9));
346 point2.append(data.at(10));
347 d->p2->convertQVariantToData(point2);
348 setObjectName(data.last().toString());
Class axlPoint defines 3D points.
int convertQVariantToData(const QVariantList &data)
Modify properties and geometry variables of the axlAbstractData. Return 1 if the modification was suc...
Class axlLine defines 3D lines.
double * coordinates(void) const
Returns coordinates of this point.
QVariantList convertDataToQVariant(void) const
Convert an axlAbstractData into a QVariantList that specifies all properties of the axlAbstractData...
~axlLine(void)
Destroys the axel line.
axlPoint * secondPoint(void) const
Returns second point of the line.
axlPoint * getMiddlePoint(void)
Returns the center point of the line.
void touchFirstPoint(const axlPoint &point)
Change first point of this line and emit using touchGeometry.
virtual QString description(void) const
axlPoint * getBarycenterPoint(double coeff)
Returns a barycenter point of the line.
void onFirstPointChanged(axlPoint *p1)
void applyMatrix(double *matrix)
Generic interface for parametric curve.
axlPoint * firstPoint(void) const
Returns first point of the line.
double planeDirection(void)
compute the direction value of the line ie a in y = ax + b.
axlLine & operator=(const axlLine &other)
Assigns other to this line and returns a reference to this line.
void setSecondPoint(axlPoint *p2)
Change second point of this line.
void touchSecondPoint(const axlPoint &point)
Change second point of this line and emit using touchGeometry.
void setFirstPoint(axlPoint *p1)
Change first point of this line.
virtual QString identifier(void) const
void onSecondPointChanged(axlPoint *p2)
axlLine(QObject *parent=0)
Constructs a axel line of with firstPoint and second point are NULL with parent parent of QObject typ...
dtkAbstractData * createaxlLine(void)
double planeOrigineOrdinate(void)
compute the b value of the line y = ax + b.
void setValues(axlPoint *p1, axlPoint *p2)
Change first point and second point of this line.
QDebug operator<<(QDebug dbg, axlLine line)