19 #include <dtkCoreSupport/dtkAbstractProcessFactory.h>
25 class axlTorusCreatorPrivate{
31 double crossSectionRadius;
44 d->crossSectionRadius = 0.2;
67 if(process->output()){
68 d->output =
dynamic_cast<axlTorus *
>(process->output());
86 if(dynamic_cast<axlPoint *>(newData)){
90 }
else if(channel == 1){
99 }
else if (channel==1){
100 d->crossSectionRadius = data;
106 if(d->output == NULL){
107 if(d->point1 && d->point2 && (d->ringRadius > d->crossSectionRadius) &&(d->ringRadius > 0.0)){
108 d->output =
new axlTorus(d->point1, d->point2, d->ringRadius, d->crossSectionRadius);
114 if(d->point1 && d->point2 && (d->ringRadius > d->crossSectionRadius) &&(d->ringRadius > 0.0)){
115 d->output->setValues(d->point1, d->point2, d->ringRadius, d->crossSectionRadius);
126 return "create a torus with two points : \n its center and another one to determine its normal \n and two values :\n the ringRadius and the crossSectionRadius";
131 return "axlTorusCreator";
virtual void setInput(dtkAbstractData *newData, int channel)
Class axlPoint defines 3D points.
virtual QString description(void) const
void copyProcess(axlAbstractProcess *process)
virtual QString identifier(void) const
virtual axlAbstractData * getInput(int channel) const
virtual void setParameter(double data, int channel)
virtual ~axlTorusCreator(void)
dtkAbstractProcess * createaxlTorusCreator(void)
Class axlAbstractData defines an API for all type of axel data.
virtual dtkAbstractData * output(void)
axlTorusCreator(QObject *parent=0)