Commit 8cd8377a authored by Will Schroeder's avatar Will Schroeder
Browse files

ERR: Fixed bug in the way abstract data passes data through.

parent e06fea47
......@@ -6,8 +6,6 @@
Date: $Date$
Version: $Revision$
Description:
---------------------------------------------------------------------------
This file is part of the Visualization Library. No part of this file
or its contents may be copied, reproduced or altered in any way
without the express written consent of the authors.
......@@ -15,9 +13,13 @@ without the express written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
//
// Class generates scalar data from position of points along some ray
//
// .NAME vlTextureMapToPlane - generate texture coordinates by mapping points to plane
// .SECTION Description
// vlTextureMapToPlane is a filter that generates 2D texture coordinates
// by mapping input dataset points onto a plane. The plane can either be
// user specified or generated automatically. (A least squares method is
// used to generate the plane).
#ifndef __vlTextureMapToPlane_h
#define __vlTextureMapToPlane_h
......@@ -30,15 +32,23 @@ public:
char *GetClassName() {return "vlTextureMapToPlane";};
void PrintSelf(ostream& os, vlIndent indent);
// Description:
// Specify plane normal.
vlSetVector3Macro(Normal,float);
vlGetVectorMacro(Normal,float);
// Description:
// Specify s-coordinate range for texture s-t coordinate pair.
vlSetVector2Macro(SRange,float);
vlGetVectorMacro(SRange,float);
// Description:
// Specify t-coordinate range for texture s-t coordinate pair.
vlSetVector2Macro(TRange,float);
vlGetVectorMacro(TRange,float);
// Description:
// Turn on/off automatic plane generation.
vlSetMacro(AutomaticNormalGeneration,int);
vlGetMacro(AutomaticNormalGeneration,int);
vlBooleanMacro(AutomaticNormalGeneration,int);
......
......@@ -6,8 +6,6 @@
Date: $Date$
Version: $Revision$
Description:
---------------------------------------------------------------------------
This file is part of the Visualization Library. No part of this file
or its contents may be copied, reproduced or altered in any way
without the express written consent of the authors.
......@@ -20,6 +18,8 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
#include "vlMath.hh"
#include "FTCoords.hh"
// Description:
// Construct with s,t range=(0,1) and automatic plane generation turned on.
vlTextureMapToPlane::vlTextureMapToPlane()
{
this->Normal[0] = 0.0;
......@@ -64,9 +64,8 @@ void vlTextureMapToPlane::Execute()
float proj, minProj, axis[3], sAxis[3], tAxis[3];
int dir;
float s, t, sSf, tSf, *p;
//
// get the data from display data
//
vlDebugMacro(<<"Generating texture coordinates!");
this->Initialize();
if ( numPts < 3 )
{
......@@ -141,6 +140,9 @@ void vlTextureMapToPlane::Execute()
//
// Update ourselves
//
this->PointData.CopyTCoordsOff();
this->PointData.PassData(this->Input->GetPointData());
this->PointData.SetTCoords(newTCoords);
}
......
......@@ -6,8 +6,6 @@
Date: $Date$
Version: $Revision$
Description:
---------------------------------------------------------------------------
This file is part of the Visualization Library. No part of this file
or its contents may be copied, reproduced or altered in any way
without the express written consent of the authors.
......@@ -34,11 +32,7 @@ void vlTransformFilter::Execute()
vlTransform trans;
vlDebugMacro(<<"Executing transformation");
//
// Initialize
//
this->Initialize();
//
// Check input
//
......@@ -82,6 +76,10 @@ void vlTransformFilter::Execute()
//
// Update ourselves
//
this->PointData.CopyVectorsOff();
this->PointData.CopyNormalsOff();
this->PointData.PassData(this->Input->GetPointData());
this->SetPoints(newPts);
this->PointData.SetNormals(newNormals);
this->PointData.SetVectors(newVectors);
......
......@@ -57,6 +57,9 @@ void vlWarpScalar::Execute()
//
// Update ourselves
//
this->PointData.CopyNormalsOff(); // distorted geometry - normals are bad
this->PointData.PassData(this->Input->GetPointData());
this->SetPoints(newPts);
}
......
......@@ -6,8 +6,6 @@
Date: $Date$
Version: $Revision$
Description:
---------------------------------------------------------------------------
This file is part of the Visualization Library. No part of this file
or its contents may be copied, reproduced or altered in any way
without the express written consent of the authors.
......@@ -25,10 +23,8 @@ void vlWarpVector::Execute()
vlVectors *inVectors;
int i, ptId;
float *x, *v, newX[3];
//
// Initialize
//
vlDebugMacro(<<"Warping data with vectors");
this->Initialize();
inPts = this->Input->GetPoints();
......@@ -58,6 +54,9 @@ void vlWarpVector::Execute()
//
// Update ourselves
//
this->PointData.CopyNormalsOff(); // distorted geometry - normals are bad
this->PointData.PassData(this->Input->GetPointData());
this->SetPoints(newPts);
}
......
Markdown is supported
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