Commit c0de2043 authored by Will Schroeder's avatar Will Schroeder
Browse files

*** empty log message ***

parent bc76909d
......@@ -276,7 +276,7 @@ void vlCyberReader::Execute()
vlDebugMacro(<<"Reading Cyberware file: " << this->Filename);
vtx = (struct Vertex *)malloc(sizeof(struct Vertex));
vtx = (struct Vertex *)calloc(1,sizeof(struct Vertex));
vtx->ltresol = 1;
vtx->lgresol = 1;
//
......
......@@ -170,13 +170,13 @@ void vlRibbonFilter::Execute()
sFactor = 1.0 + ((this->WidthFactor - 1.0) *
(inScalars->GetScalar(j) - range[0]) / (range[1]-range[0]));
for (i=0; i<3; i++) w[i] = p[i] + w[i] * BevelAngle * sFactor;
ptId = newPts->InsertNextPoint(w);
for (i=0; i<3; i++) s[i] = p[i] + w[i] * BevelAngle * sFactor;
ptId = newPts->InsertNextPoint(s);
newNormals->InsertNormal(ptId,n);
this->PointData.CopyData(pd,pts[j],ptId);
for (i=0; i<3; i++) w[i] = p[i] - w[i] * BevelAngle * sFactor;
ptId = newPts->InsertNextPoint(w);
for (i=0; i<3; i++) s[i] = p[i] - w[i] * BevelAngle * sFactor;
ptId = newPts->InsertNextPoint(s);
newNormals->InsertNormal(ptId,n);
this->PointData.CopyData(pd,pts[j],ptId);
}
......
......@@ -35,21 +35,6 @@ vlTextureMapToPlane::vlTextureMapToPlane()
this->AutomaticPlaneGeneration = 1;
}
void vlTextureMapToPlane::PrintSelf(ostream& os, vlIndent indent)
{
vlDataSetToDataSetFilter::PrintSelf(os,indent);
os << indent << "S Range: (" << this->SRange[0] << ", "
<< this->SRange[1] << ")\n";
os << indent << "T Range: (" << this->TRange[0] << ", "
<< this->TRange[1] << ")\n";
os << indent << "Automatic Normal Generation: " <<
(this->AutomaticPlaneGeneration ? "On\n" : "Off\n");
os << indent << "Normal: (" << this->Normal[0] << ", "
<< this->Normal[1] << ", "
<< this->Normal[2] << ")\n";
}
void vlTextureMapToPlane::Execute()
{
vlMath math;
......@@ -183,6 +168,7 @@ void vlTextureMapToPlane::ComputeNormal()
// normal direction (dir), construct matrices appropriately.
//
// Compute 3x3 least squares matrix
v[0] = v[1] = v[2] = 0.0;
for (i=0; i<9; i++) m[i] = 0.0;
for (ptId=0; ptId < numPts; ptId++)
......@@ -218,3 +204,19 @@ void vlTextureMapToPlane::ComputeNormal()
return;
}
void vlTextureMapToPlane::PrintSelf(ostream& os, vlIndent indent)
{
vlDataSetToDataSetFilter::PrintSelf(os,indent);
os << indent << "S Range: (" << this->SRange[0] << ", "
<< this->SRange[1] << ")\n";
os << indent << "T Range: (" << this->TRange[0] << ", "
<< this->TRange[1] << ")\n";
os << indent << "Automatic Normal Generation: " <<
(this->AutomaticPlaneGeneration ? "On\n" : "Off\n");
os << indent << "Normal: (" << this->Normal[0] << ", "
<< this->Normal[1] << ", "
<< this->Normal[2] << ")\n";
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment