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

ENH: Added documentation.

parent ce293855
......@@ -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,6 +13,13 @@ without the express written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
// .NAME vlBooleanStructuredPoints - combine two or more structured point sets
// .SECTION Description
// vlBooleanStructuredPoints is a filter that performs boolean combinations on
// two or more input structured point sets. Operations supported include union,
// intersection, and difference. A special method is provided that allows
// incremental appending of data to the filter output.
#ifndef __vlBooleanStructuredPoints_h
#define __vlBooleanStructuredPoints_h
......@@ -44,7 +49,8 @@ public:
// alternative method to boolean data
void Append(vlStructuredPoints *);
// Various operations
// Description:
// Specify the type of boolean operation.
vlSetClampMacro(OperationType,int,UNION_OPERATOR,DIFFERENCE_OPERATOR);
vlGetMacro(OperationType,int);
......
......@@ -13,10 +13,13 @@ written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
//
// DataSetToDataSetFilter takes any dataset as input and copies it through,
// changing the point attributes along the way.
//
// .NAME vlDataSetToDataSetFilter - abstract filter class
// .SECTION Description
// vlDataSetToDataSetFilter is an abstract filter class. Subclasses of
// vlDataSetToDataSetFilter take a dataset as input and create a dataset
// as output. The form of the input geometry is not changed in these
// filters, only the point attributes (e,g,, scalars, vectors, etc.).
#ifndef __vlDataSetToDataSetFilter_h
#define __vlDataSetToDataSetFilter_h
......@@ -40,12 +43,9 @@ public:
vlCell *GetCell(int cellId) {return this->DataSet->GetCell(cellId);}
int GetCellType(int cellId) {return this->DataSet->GetCellType(cellId);}
void Initialize();
void GetCellPoints(int cellId, vlIdList& ptIds)
{this->DataSet->GetCellPoints(cellId, ptIds);};
void GetPointCells(int ptId, vlIdList& cellIds)
{this->DataSet->GetPointCells(ptId, cellIds);};
int FindCell(float x[3], vlCell *cell, float tol2, int& subId, float pc[3])
{return this->DataSet->FindCell(x,cell,tol2,subId,pc);};
void GetCellPoints(int cellId, vlIdList& ptIds) {this->DataSet->GetCellPoints(cellId, ptIds);};
void GetPointCells(int ptId, vlIdList& cellIds) {this->DataSet->GetPointCells(ptId, cellIds);};
int FindCell(float x[3], vlCell *cell, float tol2, int& subId, float pc[3]) {return this->DataSet->FindCell(x,cell,tol2,subId,pc);};
void ComputeBounds();
void Update();
......
......@@ -13,9 +13,11 @@ written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
//
// DataSetToPolyFilter are filters that take DataSets in and generate PolyData
//
// .NAME vlDataSetToPolyFilter - abstract filter class
// .SECTION Description
// vlDataSetToPolyFilter is an abstract filter class whose subclasses
// take as input any dataset and generate polygonal data on output.
#ifndef __vlDataSetToPolyFilter_h
#define __vlDataSetToPolyFilter_h
......
......@@ -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,10 +13,12 @@ without the express written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
//
// DataSetToStructuredPointsFilter are filters that take DataSets in and
// generate StructuredPoints data
//
// .NAME vlDataSetToStructuredPointsFilter - abstract filter class
// .SECTION Description
// vlDataSetToStructuredPointsFilter is an abstract filter class whose
// subclasses take as input any dataset and generate structured points
// data on output.
#ifndef __vlDataSetToStructuredPointsFilter_h
#define __vlDataSetToStructuredPointsFilter_h
......
......@@ -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,10 +13,12 @@ without the express written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
//
// DataSetToUnstructuredGridFilter are filters that take DataSets in
// and generate UnstructuredGrid data as output.
//
// .NAME vlDataSetToUnstructuredGridFilter - abstract filter class
// .SECTION Description
// vlDataSetToUnstructuredGridFilter is an abstract filter class whose
// subclasses take as input any dataset and generate an unstructured
// grid on output.
#ifndef __vlDataSetToUnstructuredGridFilter_h
#define __vlDataSetToUnstructuredGridFilter_h
......
......@@ -33,12 +33,18 @@ public:
char *GetClassName() {return "vlElevationFilter";};
void PrintSelf(ostream& os, vlIndent indent);
// Description:
// Define one end of the line (small scalar values).
vlSetVector3Macro(LowPoint,float);
vlGetVectorMacro(LowPoint,float);
// Description:
// Define other end of the line (large scalar values).
vlSetVector3Macro(HighPoint,float);
vlGetVectorMacro(HighPoint,float);
// Description:
// Specify range to map scalars into.
vlSetVector2Macro(ScalarRange,float);
vlGetVectorMacro(ScalarRange,float);
......
......@@ -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.
......@@ -17,10 +15,11 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
// .NAME vlGlyph3D - copy oriented and scaled geometry to every input point
// .SECTION Description
// vlGlyph3D is a filter that copies a geometry representation (in
// vlPolyData form) to every input point. The geometry may be oriented
// vlGlyph3D is a filter that copies a geometric representation (specified
// as polygonal data) to every input point. The geometry may be oriented
// along the input vectors or normals, and it may be scaled according
// to scalar data or vector magnitude.
// to scalar data or vector magnitude. The geometry is supplied via the
// Source instance variable; the points come from the Input.
#ifndef __vlGlyph3D_h
#define __vlGlyph3D_h
......@@ -42,28 +41,42 @@ public:
void Update();
// Description:
// Specify the geometry to copy to each point.
vlSetObjectMacro(Source,vlPolyData);
vlGetObjectMacro(Source,vlPolyData);
vlBooleanMacro(Scaling,int);
// Description:
// Turn on/off scaling of input geometry.
vlSetMacro(Scaling,int);
vlBooleanMacro(Scaling,int);
vlGetMacro(Scaling,int);
// Description:
// Either scale by scalar or by vector/normal magnitude.
vlSetMacro(ScaleMode,int);
vlGetMacro(ScaleMode,int);
void ScaleByScalar() {this->SetScaleMode(SCALE_BY_SCALAR);};
void ScaleByVector() {this->SetScaleMode(SCALE_BY_VECTOR);};
// Description:
// Specify scale factor to scale object by.
vlSetMacro(ScaleFactor,float);
vlGetMacro(ScaleFactor,float);
// Description:
// Specify range to map scalar values into.
vlSetVector2Macro(Range,float);
vlGetVectorMacro(Range,float);
vlBooleanMacro(Orient,int);
// Description:
// Turn on/off orienting of input geometry along vector/normal.
vlSetMacro(Orient,int);
vlBooleanMacro(Orient,int);
vlGetMacro(Orient,int);
// Description:
// Specify whether to use vector or normal to perform vector operations.
vlSetMacro(VectorMode,int);
vlGetMacro(VectorMode,int);
void UseVector() {this->SetVectorMode(USE_VECTOR);};
......
......@@ -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,6 +32,8 @@ public:
char *GetClassName() {return "vlHedgeHog";};
void PrintSelf(ostream& os, vlIndent indent);
// Description:
// Set scale factor to control size of oriented lines.
vlSetMacro(ScaleFactor,float);
vlGetMacro(ScaleFactor,float);
......
......@@ -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,12 @@ without the express written consent of the authors.
Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
//
// Generate implicit volume model from PolyData
//
// .NAME vlImplicitModeller - compute distance from input geometry on structured point set
// .SECTION Description
// vlImplicitModeller is a filter that computes the distance from the input
// geometry on a structured point set. This distance function can then be
// "contoured" to generate new, offset surfaces from the original geometry.
#ifndef __vlImplicitModeller_h
#define __vlImplicitModeller_h
......@@ -33,21 +34,32 @@ public:
float ComputeModelBounds();
// Description:
// Specify i-j-k dimensions on which to sample distance function.
void SetSampleDimensions(int i, int j, int k);
void SetSampleDimensions(int dim[3]);
vlGetVectorMacro(SampleDimensions,int);
// Description:
// Specify distance away from surface of input geometry to sample. Smaller
// values make large increases in performance.
vlSetClampMacro(MaximumDistance,float,0.0,1.0);
vlGetMacro(MaximumDistance,float);
// Specify the position in space to perform the sampling.
void SetModelBounds(float *bounds);
void SetModelBounds(float xmin, float xmax, float ymin, float ymax, float zmin, float zmax);
vlGetVectorMacro(ModelBounds,float);
// Description:
// The outer boundary of the structured point set can be assigned a
// particular value. This can be used to close or "cap" all surfaces.
vlSetMacro(Capping,int);
vlGetMacro(Capping,int);
vlBooleanMacro(Capping,int);
// Description:
// Specify the capping value to use.
vlSetMacro(CapValue,float);
vlGetMacro(CapValue,float);
......
......@@ -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.
......@@ -17,8 +15,22 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
#include "BoolSPts.hh"
// Description:
// Construct with sample resolution of (50,50,50) and automatic
// computation of sample bounds. Initial boolean operation is union.
vlBooleanStructuredPoints::vlBooleanStructuredPoints()
{
this->SampleDimensions[0] = 50;
this->SampleDimensions[1] = 50;
this->SampleDimensions[2] = 50;
this->ModelBounds[0] = 0.0;
this->ModelBounds[1] = 0.0;
this->ModelBounds[2] = 0.0;
this->ModelBounds[3] = 0.0;
this->ModelBounds[4] = 0.0;
this->ModelBounds[5] = 0.0;
this->OperationType = UNION_OPERATOR;
// this->Operator = this->Union;
}
......@@ -34,6 +46,8 @@ vlBooleanStructuredPoints::~vlBooleanStructuredPoints()
}
}
// Description:
// Add another structured point set to the list of objects to boolean.
void vlBooleanStructuredPoints::AddInput(vlStructuredPoints *sp)
{
if ( ! this->Input.IsItemPresent(sp) )
......@@ -44,6 +58,8 @@ void vlBooleanStructuredPoints::AddInput(vlStructuredPoints *sp)
}
}
// Description:
// Remove an object from the list of objects to boolean.
void vlBooleanStructuredPoints::RemoveInput(vlStructuredPoints *sp)
{
if ( this->Input.IsItemPresent(sp) )
......@@ -174,7 +190,8 @@ void vlBooleanStructuredPoints::Execute()
}
}
// Perform Boolean operations by appending to current data
// Description:
// Perform Boolean operations by appending to current output data.
void vlBooleanStructuredPoints::Append(vlStructuredPoints *sp)
{
vlScalars *currentScalars, *inScalars;
......@@ -260,6 +277,8 @@ void vlBooleanStructuredPoints::PrintSelf(ostream& os, vlIndent indent)
}
}
// Description:
// Set the i-j-k dimensions on which to perform boolean operation.
void vlBooleanStructuredPoints::SetSampleDimensions(int i, int j, int k)
{
int dim[3];
......@@ -292,6 +311,8 @@ void vlBooleanStructuredPoints::SetSampleDimensions(int dim[3])
}
}
// Description:
// Set the size of the volume oon which to perform the sampling.
void vlBooleanStructuredPoints::SetModelBounds(float *bounds)
{
vlBooleanStructuredPoints::SetModelBounds(bounds[0], bounds[1], bounds[2], bounds[3], bounds[4], bounds[5]);
......
......@@ -20,6 +20,9 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
#include "vlMath.hh"
#include "FScalars.hh"
// Description:
// Construct object with LowPoint=(0,0,0) and HighPoint=(0,0,1). Scalar
// range is (0,1).
vlElevationFilter::vlElevationFilter()
{
this->LowPoint[0] = 0.0;
......
......@@ -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.
......
......@@ -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.
......@@ -19,6 +17,10 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
#include "ImpMod.hh"
#include "FScalars.hh"
// Description:
// Construct with sample dimensions=(50,50,50) and so that model bounds are
// automatically computer from input. Capping is turned on with CapValue equal
// to a large positive number.
vlImplicitModeller::vlImplicitModeller()
{
this->MaximumDistance = 0.1;
......@@ -180,6 +182,8 @@ void vlImplicitModeller::Execute()
}
// Description:
// Compute ModelBounds from input geometry.
float vlImplicitModeller::ComputeModelBounds()
{
float *bounds, maxDist;
......@@ -225,6 +229,8 @@ float vlImplicitModeller::ComputeModelBounds()
return maxDist;
}
// Description:
// Set the i-j-k dimensions on which to sample the distance function.
void vlImplicitModeller::SetSampleDimensions(int i, int j, int k)
{
int dim[3];
......
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