19 #include <dtkCoreSupport/dtkAbstractData.h>
20 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
38 return "axlFieldParametricSurfaceTangentVectorWriter";
43 return "axlFieldParametricSurfaceTangentVectorWriter";
48 return QStringList() <<
"axlFieldParametricSurfaceTangentVector";
67 return !this->
accept(data);
74 QDomElement fieldElement = doc->createElement(
"field");
77 fieldElement.setAttribute(
"type", field->
identifier());
80 for(
int i = 0; i < 2;i++){
82 QDomElement parameter = doc->createElement(
"parameter");
83 parameter.setAttribute(
"value", QString::number(field->
parameter(i)));
84 parameter.setAttribute(
"channel", QString::number(i));
85 parameter.setAttribute(
"type",
"double");
86 fieldElement.appendChild(parameter);
95 QDomElement axlFieldParametricSurfaceTangentVectorWriter::elementByWriter(
axlAbstractDataWriter *axl_writer, QDomDocument *doc, dtkAbstractData *data)
102 if(!axl_writer->
accept(data))
105 element = axl_writer->
write(doc, data);
double parameter(int channel)
Returns the direction parameter for the tangentVector, for the channel-th.
QStringList handled(void) const
virtual bool accept(dtkAbstractData *data)=0
axlFieldParametricSurfaceTangentVectorWriter(void)
QString identifier(void) const
Returns the identifier of the field "axlFieldParametricSurfaceTangentVector".
dtkAbstractDataWriter * createaxlFieldParametricSurfaceTangentVectorWriter(void)
QString identifier(void) const
Class axlFieldParametricSurfaceTangentVector defines an API for field which owns a BSpline Surface as...
static bool registered(void)
QString description(void) const
bool accept(dtkAbstractData *data)
virtual QDomElement write(QDomDocument *doc, dtkAbstractData *data)=0
bool reject(dtkAbstractData *data)
QDomElement write(QDomDocument *doc, dtkAbstractData *data)
~axlFieldParametricSurfaceTangentVectorWriter(void)