24 #include <dtkCoreSupport/dtkGlobal.h>
92 this->setParent(other.parent());
93 d->point =
new axlPoint(other.d->point);
94 d->normal =
new axlPoint(other.d->normal);
123 *(d->point) = *(other.d->point);
124 *(d->normal) = *(other.d->normal);
154 *(d->point) = *point;
155 *(d->normal) = *normal;
165 *(d->point) = *point;
171 d->point->coordinates()[0] = p[0];
172 d->point->coordinates()[1] = p[1];
173 d->point->coordinates()[2] = p[2];
183 *(d->normal) = *normal;
189 d->normal->coordinates()[0] = normal[0];
190 d->normal->coordinates()[1] = normal[1];
191 d->normal->coordinates()[2] = normal[2];
197 d->point->setCoordinates(point.
x(),point.
y(),point.
z());
203 d->normal->setCoordinates(normal.
x(),normal.
y(),normal.
z());
234 QString result =
"axlPlane";
235 result.append(
"\nPoint : "+d->point->description() +
"\nNormal : "+d->normal->description());
260 QVariant
id = QVariant::fromValue(
identifier());
261 QVariantList
point = d->point->convertDataToQVariant();
262 QVariantList
normal = d->normal->convertDataToQVariant();
266 QVariant name = QVariant::fromValue(objectName());
274 point.append(data.at(1));
275 point.append(data.at(2));
276 point.append(data.at(3));
277 point.append(data.at(4));
278 point.append(data.at(5));
279 d->point->convertQVariantToData(point);
281 normal.append(data.at(6));
282 normal.append(data.at(7));
283 normal.append(data.at(8));
284 normal.append(data.at(9));
285 normal.append(data.at(10));
286 d->normal->convertQVariantToData(normal);
287 setObjectName(data.last().toString());
void setNormal(axlPoint *normal)
Change second point of this plane.
Class axlPoint defines 3D points.
Class axlPlane defines 3D planes.
void setValues(axlPoint *point, axlPoint *normal)
Change first point and second point of this plane.
axlPoint * point(void) const
Returns the point of the plane.
QDebug operator<<(QDebug dbg, axlPlane plane)
~axlPlane(void)
Destroys the axel plane.
void touchPoint(axlPoint point)
void setPoint(axlPoint *point)
Change first point of this plane.
axlPlane(QObject *parent=0)
Constructs a axel plane of with point and normal vector are NULL with parent parent of QObject type...
void touchNormal(axlPoint normal)
axlPoint * normal(void) const
Returns the normal of the plane.
virtual QString identifier(void) const
virtual QString description(void) const
int convertQVariantToData(const QVariantList &data)
Modify properties and geometry variables of the axlAbstractData. Return 1 if the modification was suc...
axlPlane & operator=(const axlPlane &other)
Assigns other to this plane and returns a reference to this plane.
QVariantList convertDataToQVariant(void) const
Convert an axlAbstractData into a QVariantList that specifies all properties of the axlAbstractData...
Class axlAbstractData defines an API for all type of axel data.
dtkAbstractData * createaxlPlane(void)