24 #include <dtkCoreSupport/dtkAbstractDataFactory.h>
26 class axlSurfaceParametricOffsetConverterPrivate
46 return "Converter from axlSurfaceParametricOffsetConverter to axlMesh";
51 return "axlSurfaceParametricOffsetConverter";
56 return QStringList() <<
"axlSurfaceParametricOffsetConverter" <<
"axlSurfaceParametricOffset";
75 double uMin = d->data->surfaceParam()->startParam_u();
76 double uMax = d->data->surfaceParam()->endParam_u();
77 double vMin = d->data->surfaceParam()->startParam_v();
78 double vMax = d->data->surfaceParam()->endParam_v();
79 double stepu = (uMax-uMin)/40;
80 double stepv = (vMax-vMin)/40;
82 for(
double u=uMin ;u < uMax ;u+=stepu ){
83 for(
double v=vMin ;v < vMax ;v+=stepv){
86 d->data->surfaceParam()->normal(currentNormal, u, v);
87 d->data->surfaceParam()->eval(currentEval, u,v);
89 axlPoint *currentResult =
new axlPoint(*currentEval + *currentNormal * d->data->offset());
103 for(
int j = 0; j < n_v - 1; j++) {
105 for(
int i= 0; i <n_u - 1; i++) {
110 QVector<int> firstTriangle;
111 QVector<int> secondTriamgle;
113 firstTriangle.push_back(ind1);
114 firstTriangle.push_back(ind1 + 1);
115 firstTriangle.push_back(ind2);
117 secondTriamgle.push_back(ind2);
118 secondTriamgle.push_back(ind1 + 1);
119 secondTriamgle.push_back(ind2 + 1);
Class axlPoint defines 3D points.
QString identifier(void) const
void setShader(const QString &shader)
QString description(void) const
Class axlSurfaceParametricOffset defines offset of axlAbstractSurfaceParametric.
~axlSurfaceParametricOffsetConverter(void)
QStringList fromTypes(void) const
dtkAbstractDataConverter * createaxlSurfaceParametricOffsetConverter(void)
void push_back_face(const Face &face)
void setOpacity(const double &opacity)
void setColor(double r, double g, double b)
void setData(dtkAbstractData *data)
QString toType(void) const
static bool registered(void)
axlSurfaceParametricOffsetConverter(void)
Class axlMesh defines a piecewise-linear 3D object.
void push_back_vertex(const double &x, const double &y, const double &z)
Add a new vertex to the mesh.