Commit 9782b19f authored by Will Schroeder's avatar Will Schroeder
Browse files

Made comments consistent with text

parent 0e2ee9d5
......@@ -51,7 +51,7 @@ float vtkAGraymap::GetScalar(int i)
}
// Description:
// Return a unsigned char rgba color value for a particular point id.
// Return an unsigned char rgba color value for a particular point id.
unsigned char *vtkAGraymap::GetColor(int id)
{
static unsigned char rgba[4];
......
......@@ -86,7 +86,7 @@ vtkActor::~vtkActor()
// Description:
// This causes the actor to be rendered. It in turn will render the actor's
// property, texture map and then mapper. If a property hasn't been
// assigned yet then the actor will create one by itself.
// assigned, then the actor will create one automatically.
void vtkActor::Render(vtkRenderer *ren)
{
// render the property
......@@ -147,7 +147,7 @@ void vtkActor::AddPosition (float deltaPosition[3])
// Description:
// Sets the orientation of the actor. Orientation is specified as
// X,Y and Z rotations in that order, but they are performed as
// RotateZ, RotateX and finally RotateY.
// RotateZ, RotateX, and finally RotateY.
void vtkActor::SetOrientation (float x,float y,float z)
{
// store the coordinates
......@@ -173,7 +173,7 @@ void vtkActor::SetOrientation(float a[3])
// Description:
// Returns the orientation of the actor as s vector of X,Y and Z rotation.
// The ordering in which these rotations must be done to generate the
// same matrix is RotateZ, RotateX and finally RotateY. See also
// same matrix is RotateZ, RotateX, and finally RotateY. See also
// SetOrientation.
float *vtkActor::GetOrientation ()
{
......@@ -193,8 +193,8 @@ float *vtkActor::GetOrientation ()
// Description:
// Add to the current orientation. See SetOrientation and GetOrientation for
// more details. This basically does a GetOrientation adds the passed in
// arguments and then calls SetOrientation.
// more details. This basically does a GetOrientation, adds the passed in
// arguments, and then calls SetOrientation.
void vtkActor::AddOrientation (float a1,float a2,float a3)
{
float *orient;
......@@ -363,7 +363,7 @@ float *vtkActor::GetBounds()
}
// Description:
// Get the center of the bounding box in world coordinates
// Get the center of the bounding box in world coordinates.
float *vtkActor::GetCenter()
{
this->GetBounds();
......@@ -375,7 +375,7 @@ float *vtkActor::GetCenter()
}
// Description:
// Get the actors x range in world coordinates.
// Get the actor's x range in world coordinates.
float *vtkActor::GetXRange()
{
this->GetBounds();
......@@ -383,7 +383,7 @@ float *vtkActor::GetXRange()
}
// Description:
// Get the actors y range in world coordinates.
// Get the actor's y range in world coordinates.
float *vtkActor::GetYRange()
{
this->GetBounds();
......@@ -391,7 +391,7 @@ float *vtkActor::GetYRange()
}
// Description:
// Get the actors z range in world coordinates.
// Get the actor's z range in world coordinates.
float *vtkActor::GetZRange()
{
this->GetBounds();
......
......@@ -89,10 +89,11 @@ void vtkBooleanStructuredPoints::Update()
unsigned long int mtime, dsMtime;
vtkDataSet *ds;
// make sure input is available
if ( this->InputList.GetNumberOfItems() < 1 )
// make sure input is available or output has been created
if ( this->InputList.GetNumberOfItems() < 1 &&
this->Output->GetPointData()->GetScalars() == NULL )
{
vtkErrorMacro(<< "No input...can't execute!");
vtkErrorMacro(<< "No input...or appended data...can't execute!");
return;
}
......@@ -203,7 +204,7 @@ void vtkBooleanStructuredPoints::InitializeBoolean()
newScalars->Delete();
}
// Perform Boolean operations on input volumes
// Perform boolean operations on input volumes.
void vtkBooleanStructuredPoints::Execute()
{
vtkStructuredPoints *sp;
......@@ -217,7 +218,7 @@ void vtkBooleanStructuredPoints::Execute()
}
// Description:
// Perform Boolean operations by appending to current output data.
// Perform boolean operations by appending to current output data.
void vtkBooleanStructuredPoints::Append(vtkStructuredPoints *sp)
{
vtkScalars *currentScalars, *inScalars;
......
......@@ -245,7 +245,7 @@ void vtkCamera::SetClippingRange(float a[2])
// Description:
// Set the distance between clipping planes. A side effect of this method is
// adjust the back clipping plane to be equal to the front clipping plane
// to adjust the back clipping plane to be equal to the front clipping plane
// plus the thickness.
void vtkCamera::SetThickness(float X)
{
......@@ -377,7 +377,7 @@ float vtkCamera::GetRoll()
}
// Description:
// Compute the camera distance which is the distance between the
// Compute the camera distance, which is the distance between the
// focal point and position.
void vtkCamera::CalcDistance ()
{
......@@ -421,8 +421,8 @@ void vtkCamera::CalcDistance ()
// Description:
// Returns the orientation of the camera. This is a vector of X,Y and Z
// rotations that when performed in the order RotateZ, RotateX and finally
// RotateY will yield the same 3x3 rotation matrix for the camera.
// rotations that when performed in the order RotateZ, RotateX, and finally
// RotateY, will yield the same 3x3 rotation matrix for the camera.
float *vtkCamera::GetOrientation ()
{
// calculate a new orientation
......@@ -761,7 +761,7 @@ void vtkCamera::Azimuth (float angle)
// Description:
// Rotate the camera about the cross product of the view plane normal and
// the view_up vector centered on the focal_point.
// the view up vector centered on the focal point.
void vtkCamera::Elevation (float angle)
{
double axis[3];
......@@ -812,7 +812,7 @@ void vtkCamera::Elevation (float angle)
}
// Description:
// Rotate the focal point about the view_up vector centered at the cameras
// Rotate the focal point about the view up vector centered at the camera's
// position.
void vtkCamera::Yaw (float angle)
{
......@@ -855,7 +855,7 @@ void vtkCamera::Yaw (float angle)
// Description:
// Rotate the focal point about the cross product of the view up vector
// and the view plane normal, centered at the cameras position.
// and the view plane normal, centered at the camera's position.
void vtkCamera::Pitch (float angle)
{
float axis[3];
......
......@@ -66,12 +66,11 @@ void vtkCell::Initialize(int npts, int *pts, vtkPoints *p)
// Description:
// Bounding box intersection modified from Graphics Gems Vol I.
// Note: the intersection ray is assumed normalized such that
// Note: the intersection ray is assumed normalized, such that
// valid intersections can only occur between [0,1]. Method returns non-zero
// value if bounding box is hit. Origin[3] starts the ray, dir[3] is the
// components of the ray in the x-y-z directions, coord[3] is the location
// of hit, and t is the parametric coordinate along line.
char vtkCell::HitBBox (float bounds[6], float origin[3], float dir[3],
float coord[3], float& t)
{
......@@ -194,7 +193,7 @@ void vtkCell::GetBounds(float bounds[6])
}
// Description:
// Compute Length squared of cell (i.e., bounding box diagonal squared)
// Compute Length squared of cell (i.e., bounding box diagonal squared).
float vtkCell::GetLength2 ()
{
float diff, l=0.0;
......
......@@ -54,7 +54,7 @@ vtkCellList::~vtkCellList()
}
// Description:
// Add a cell to structure
// Add a cell at specified id.
void vtkCellList::InsertCell(const int cellId, const unsigned char type, const int loc)
{
_vtkCell_s *cell;
......
......@@ -124,7 +124,7 @@ void vtkCollection::RemoveItem(vtkObject *a)
}
// Description:
// Remove all object from the list.
// Remove all objects from the list.
void vtkCollection::RemoveAllItems()
{
vtkCollectionElement *p, *next;
......
......@@ -42,17 +42,21 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "vtkLookupTable.hh"
// Description:
// Convert internal color representation into scalar value.
// Convert internal color representation into scalar value. Uses luminance
// equation (see text).
float vtkColorScalars::GetScalar(int i)
{
unsigned char *rgba;
float s;
rgba = this->GetColor(i);
return (float) ((rgba[0] > rgba[1] ? (rgba[0] > rgba[2] ? rgba[0] : rgba[2]) : (rgba[1] > rgba[2] ? rgba[1] : rgba[2])) / 255.0);
s = (rgba[3]/255.0) * (0.30*rgba[0] + 0.59*rgba[1] + 0.11*rgba[2]);
if ( s > 1.0 ) s = 1.0;
return s;
}
// Description:
// Map through lookup table to set the color
// Map through lookup table to set the color.
void vtkColorScalars::SetScalar(int i, float s)
{
if ( this->LookupTable == NULL ) this->CreateDefaultLookupTable();
......@@ -61,7 +65,7 @@ void vtkColorScalars::SetScalar(int i, float s)
}
// Description:
// Map through lookup table to set the color
// Map through lookup table to set the color.
void vtkColorScalars::InsertScalar(int i, float s)
{
if ( this->LookupTable == NULL ) this->CreateDefaultLookupTable();
......@@ -70,7 +74,7 @@ void vtkColorScalars::InsertScalar(int i, float s)
}
// Description:
// Map through lookup table to set the color
// Map through lookup table to set the color.
int vtkColorScalars::InsertNextScalar(float s)
{
if ( this->LookupTable == NULL ) this->CreateDefaultLookupTable();
......
......@@ -49,7 +49,7 @@ vtkCutter::vtkCutter(vtkImplicitFunction *cf)
// Description:
// Overload standard modified time function. If cut functions is modified,
// then we are modified as well.
// then this object is modified as well.
unsigned long vtkCutter::GetMTime()
{
unsigned long mTime=this->vtkDataSetFilter::GetMTime();
......
......@@ -61,7 +61,7 @@ char *vtkDataSetReader::GetFilename()
}
// Description:
// Get the type of file (ASCII or BINARY)
// Get the type of file (VTK_ASCII or VTK_BINARY).
int vtkDataSetReader::GetFileType()
{
return this->Reader.GetFileType();
......
......@@ -50,7 +50,7 @@ vtkExtractGeometry::vtkExtractGeometry(vtkImplicitFunction *f)
// Description:
// Overload standard modified time function. If implicit function is modified,
// then we are modified as well.
// then this object is modified as well.
unsigned long vtkExtractGeometry::GetMTime()
{
unsigned long mTime=this->MTime.GetMTime();
......
......@@ -49,7 +49,7 @@ vtkExtractVectorComponents::vtkExtractVectorComponents()
// Description:
// Get the output dataset representing velocity x-component. If output is NULL
// then input hasn't been set which is necessary for abstract objects.
// then input hasn't been set, which is necessary for abstract objects.
vtkDataSet *vtkExtractVectorComponents::GetVxComponent()
{
if ( this->VxComponent == NULL )
......@@ -61,7 +61,7 @@ vtkDataSet *vtkExtractVectorComponents::GetVxComponent()
// Description:
// Get the output dataset representing velocity y-component. If output is NULL
// then input hasn't been set which is necessary for abstract objects.
// then input hasn't been set, which is necessary for abstract objects.
vtkDataSet *vtkExtractVectorComponents::GetVyComponent()
{
if ( this->VyComponent == NULL )
......@@ -73,7 +73,7 @@ vtkDataSet *vtkExtractVectorComponents::GetVyComponent()
// Description:
// Get the output dataset representing velocity z-component. If output is NULL
// then input hasn't been set which is necessary for abstract objects.
// then input hasn't been set, which is necessary for abstract objects.
vtkDataSet *vtkExtractVectorComponents::GetVzComponent()
{
if ( this->VzComponent == NULL )
......
......@@ -55,7 +55,7 @@ vtkTensors *vtkFloatTensors::MakeObject(int sze, int d, int ext)
}
// Description:
// Deep copy of texture coordinates.
// Deep copy of tensors.
vtkFloatTensors& vtkFloatTensors::operator=(const vtkFloatTensors& ft)
{
this->T = ft.T;
......
......@@ -56,7 +56,7 @@ vtkFollower::~vtkFollower()
}
// Description:
// Copy the Follower's composite 4x4 matrix into the matrix provided.
// Copy the follower's composite 4x4 matrix into the matrix provided.
void vtkFollower::GetMatrix(vtkMatrix4x4& result)
{
float *pos;
......
......@@ -292,8 +292,8 @@ void vtkGlyph3D::Execute()
}
// Description:
// Override update method because execution can branch two ways (Input
// and Source)
// Override update method because execution can branch two ways (via Input
// and Source).
void vtkGlyph3D::Update()
{
// make sure input is available
......
......@@ -55,7 +55,7 @@ vtkGraymap& vtkGraymap::operator=(const vtkGraymap& fs)
// Description:
// Return a rgba color for a particular point id.
// (Note: gray value converted into full rgba).
// (Note: gray value converted into full rgba.)
unsigned char *vtkGraymap::GetColor(int id)
{
static unsigned char rgba[4];
......@@ -75,7 +75,7 @@ void vtkGraymap::GetColor(int id, unsigned char rgba[4])
// Description:
// Insert gray value into object. No range checking performed (fast!).
// (Note: rgba color value converted to grayscale).
// (Note: rgba color value converted to grayscale.)
void vtkGraymap::SetColor(int id, unsigned char rgba[4])
{
float g = 0.30*rgba[0] + 0.59*rgba[1] + 0.11*rgba[2];
......@@ -86,7 +86,8 @@ void vtkGraymap::SetColor(int id, unsigned char rgba[4])
// Description:
// Insert rgba color value into object. Range checking performed and memory
// allocated as necessary. (Note: rgba converted to gray value).
// allocated as necessary. (Note: rgba converted to gray value using luminance
// equation - see text.)
void vtkGraymap::InsertColor(int id, unsigned char rgba[4])
{
float g = 0.30*rgba[0] + 0.59*rgba[1] + 0.11*rgba[2];
......@@ -97,7 +98,7 @@ void vtkGraymap::InsertColor(int id, unsigned char rgba[4])
// Description:
// Insert rgba color value into next available slot. Returns point id of slot.
// (Note: rgba converted to gray value).
// (Note: rgba converted to gray value.)
int vtkGraymap::InsertNextColor(unsigned char rgba[4])
{
float g = 0.30*rgba[0] + 0.59*rgba[1] + 0.11*rgba[2];
......
......@@ -43,9 +43,9 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "vtkFloatScalars.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.
// Construct with sample dimensions=(50,50,50), and so that model bounds are
// automatically computed from the input. Capping is turned on with CapValue
// equal to a large positive number.
vtkImplicitModeller::vtkImplicitModeller()
{
this->MaximumDistance = 0.1;
......
......@@ -64,7 +64,7 @@ vtkLODActor::vtkLODActor()
}
// Description:
// This causes the actor to be rendered. It in turn will render the actor's
// This causes the actor to be rendered. It, in turn, will render the actor's
// property and then mapper.
void vtkLODActor::Render(vtkRenderer *ren)
{
......
......@@ -522,7 +522,7 @@ int vtkLocator::InitPointInsertion(vtkPoints *newPts, float bounds[6])
// pre-inserted point, pre-inserted point id is returned. Otherwise, new
// point id is returned. Before using this method you must make sure that
// newPts have been supplied, the bounds has been set properly, and that
// divs are properly set. (See InitPointInsertion()).
// divs are properly set. (See InitPointInsertion().)
int vtkLocator::InsertPoint(float x[3])
{
int i, j, ijk[3];
......
......@@ -42,7 +42,8 @@ MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
#include "vtkLogLookupTable.hh"
// Description:
// Construct with effective range 1->10 (based on logarithmic values.
// Construct with (minimum,maximum) range 1 to 10 (based on
// logarithmic values).
vtkLogLookupTable::vtkLogLookupTable(int sze, int ext):
vtkLookupTable(sze,ext)
{
......@@ -56,7 +57,7 @@ vtkLookupTable(sze,ext)
// less than minimum range value are clamped to minimum range value.
// Scalar values greater than maximum range value are clamped to maximum
// range value. (The log base 10 of these values is taken and mapping is
// performed in logarithmic space).
// performed in logarithmic space.)
void vtkLogLookupTable::SetTableRange(float min, float max)
{
if ( min >= max )
......
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