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

BUG:Fixed warnings

parent 367d1504
......@@ -25,7 +25,7 @@
#include "vtkObjectFactory.h"
#include "vtkMath.h"
vtkCxxRevisionMacro(vtkLeaderActor2D, "1.3");
vtkCxxRevisionMacro(vtkLeaderActor2D, "1.4");
vtkStandardNewMacro(vtkLeaderActor2D);
vtkCxxSetObjectMacro(vtkLeaderActor2D,LabelTextProperty,vtkTextProperty);
......@@ -523,7 +523,7 @@ void vtkLeaderActor2D::BuildCurvedLeader(double p1[3], double p2[3], double ray[
// Build the polyline for the leader. Start by generating the points.
double x[3]; x[2]=0.0;
double length = radius*phi;
int numDivs = (length / 3.0) + 1; //every three pixels
int numDivs = static_cast<int>((length / 3.0) + 1); //every three pixels
for (i=0; i<=numDivs; i++)
{
theta = theta1 + (static_cast<double>(i)/numDivs)*(theta2-theta1);
......
......@@ -36,7 +36,7 @@
#include "vtkWindow.h"
vtkCxxRevisionMacro(vtkAffineRepresentation2D, "1.2");
vtkCxxRevisionMacro(vtkAffineRepresentation2D, "1.3");
vtkStandardNewMacro(vtkAffineRepresentation2D);
vtkCxxSetObjectMacro(vtkAffineRepresentation2D,Property,vtkProperty2D);
......@@ -57,8 +57,8 @@ vtkAffineRepresentation2D::vtkAffineRepresentation2D()
// The width of the widget
this->DisplayText = 1;
this->BoxWidth = 100;
this->CircleWidth = 0.75 * this->BoxWidth;
this->AxesWidth = 0.60 * this->BoxWidth;
this->CircleWidth = static_cast<int>(0.75 * this->BoxWidth);
this->AxesWidth = static_cast<int>(0.60 * this->BoxWidth);
this->CurrentWidth = 0.0;
this->CurrentRadius = 0.0;
this->CurrentAxesWidth = 0.0;
......
......@@ -19,7 +19,7 @@
#include "vtkObjectFactory.h"
#include "vtkRenderer.h"
vtkCxxRevisionMacro(vtkBezierContourLineInterpolator, "1.2");
vtkCxxRevisionMacro(vtkBezierContourLineInterpolator, "1.3");
vtkStandardNewMacro(vtkBezierContourLineInterpolator);
//----------------------------------------------------------------------
......@@ -88,7 +88,7 @@ int vtkBezierContourLineInterpolator::InterpolateLine( vtkRenderer *vtkNotUsed(r
while ( stackCount )
{
//process last point on stack
int recursionLevel = controlPointsStack[13*(stackCount-1)];
int recursionLevel = static_cast<int>(controlPointsStack[13*(stackCount-1)]);
p1 = controlPointsStack + 13*(stackCount-1)+1;
p2 = controlPointsStack + 13*(stackCount-1)+4;
......
......@@ -20,7 +20,7 @@
#include "vtkPlaneCollection.h"
#include "vtkRenderer.h"
vtkCxxRevisionMacro(vtkBoundedPlanePointPlacer, "1.2");
vtkCxxRevisionMacro(vtkBoundedPlanePointPlacer, "1.3");
vtkStandardNewMacro(vtkBoundedPlanePointPlacer);
vtkCxxSetObjectMacro(vtkBoundedPlanePointPlacer, ObliquePlane, vtkPlane);
......@@ -120,7 +120,7 @@ void vtkBoundedPlanePointPlacer::SetBoundingPlanes(vtkPlanes *planes)
//----------------------------------------------------------------------
int vtkBoundedPlanePointPlacer::ComputeWorldPosition( vtkRenderer *ren,
double displayPos[2],
double refWorldPos[3],
double* vtkNotUsed(refWorldPos),
double worldPos[3],
double worldOrient[9] )
{
......@@ -170,7 +170,7 @@ int vtkBoundedPlanePointPlacer::ComputeWorldPosition( vtkRenderer *ren,
this->BoundingPlanes->InitTraversal();
while ( p = this->BoundingPlanes->GetNextItem() )
while ( (p = this->BoundingPlanes->GetNextItem()) )
{
if ( p->EvaluateFunction( position ) < this->WorldTolerance )
{
......@@ -193,7 +193,7 @@ int vtkBoundedPlanePointPlacer::ComputeWorldPosition( vtkRenderer *ren,
//----------------------------------------------------------------------
int vtkBoundedPlanePointPlacer::ValidateWorldPosition( double worldPos[3],
double worldOrient[9] )
double* vtkNotUsed(worldOrient) )
{
return this->ValidateWorldPosition( worldPos );
}
......@@ -208,7 +208,7 @@ int vtkBoundedPlanePointPlacer::ValidateWorldPosition( double worldPos[3] )
this->BoundingPlanes->InitTraversal();
while ( p = this->BoundingPlanes->GetNextItem() )
while ( (p = this->BoundingPlanes->GetNextItem()) )
{
if ( p->EvaluateFunction( worldPos ) < this->WorldTolerance )
{
......
......@@ -20,7 +20,7 @@
#include "vtkCommand.h"
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro(vtkCheckerboardRepresentation, "1.2");
vtkCxxRevisionMacro(vtkCheckerboardRepresentation, "1.3");
vtkStandardNewMacro(vtkCheckerboardRepresentation);
vtkCxxSetObjectMacro(vtkCheckerboardRepresentation,Checkerboard,vtkImageCheckerboard);
......@@ -118,25 +118,25 @@ void vtkCheckerboardRepresentation::SliderValueChanged(int sliderNum)
int value;
if ( sliderNum == vtkCheckerboardRepresentation::TopSlider )
{
value = this->TopRepresentation->GetValue();
value = static_cast<int>(this->TopRepresentation->GetValue());
this->BottomRepresentation->SetValue(value);
this->Checkerboard->SetNumberOfDivisions(value,numDivisions[1],1);
}
else if ( sliderNum == vtkCheckerboardRepresentation::RightSlider )
{
value = this->RightRepresentation->GetValue();
value = static_cast<int>(this->RightRepresentation->GetValue());
this->LeftRepresentation->SetValue(value);
this->Checkerboard->SetNumberOfDivisions(numDivisions[0],value,1);
}
else if ( sliderNum == vtkCheckerboardRepresentation::BottomSlider )
{
value = this->BottomRepresentation->GetValue();
value = static_cast<int>(this->BottomRepresentation->GetValue());
this->TopRepresentation->SetValue(value);
this->Checkerboard->SetNumberOfDivisions(value,numDivisions[1],1);
}
else if ( sliderNum == vtkCheckerboardRepresentation::LeftSlider )
{
value = this->LeftRepresentation->GetValue();
value = static_cast<int>(this->LeftRepresentation->GetValue());
this->RightRepresentation->SetValue(value);
this->Checkerboard->SetNumberOfDivisions(numDivisions[0],value,1);
}
......
......@@ -22,7 +22,7 @@
#include "vtkRenderer.h"
#include "vtkSliderWidget.h"
vtkCxxRevisionMacro(vtkCheckerboardWidget, "1.2");
vtkCxxRevisionMacro(vtkCheckerboardWidget, "1.3");
vtkStandardNewMacro(vtkCheckerboardWidget);
......@@ -49,7 +49,7 @@ public:
break;
}
}
vtkCWCallback():CheckerboardWidget(0),SliderNumber(0) {}
vtkCWCallback():SliderNumber(0),CheckerboardWidget(0) {}
int SliderNumber; //the number of the currently active slider
vtkCheckerboardWidget *CheckerboardWidget;
};
......
......@@ -39,7 +39,7 @@
#include "vtkTransform.h"
#include "vtkCamera.h"
vtkCxxRevisionMacro(vtkConstrainedPointHandleRepresentation, "1.2");
vtkCxxRevisionMacro(vtkConstrainedPointHandleRepresentation, "1.3");
vtkStandardNewMacro(vtkConstrainedPointHandleRepresentation);
vtkCxxSetObjectMacro(vtkConstrainedPointHandleRepresentation, ObliquePlane, vtkPlane);
......@@ -463,7 +463,7 @@ int vtkConstrainedPointHandleRepresentation::GetIntersectionPosition(double even
this->BoundingPlanes->InitTraversal();
while ( p = this->BoundingPlanes->GetNextItem() )
while ( (p = this->BoundingPlanes->GetNextItem()) )
{
if ( p->EvaluateFunction( position ) < tolerance )
{
......
......@@ -41,7 +41,7 @@ public:
// Description:
// Standard VTK methods.
vtkTypeRevisionMacro(vtkDistanceRepresentation2D,vtkWidgetRepresentation);
vtkTypeRevisionMacro(vtkDistanceRepresentation2D,vtkDistanceRepresentation);
void PrintSelf(ostream& os, vtkIndent indent);
// Description:
......
......@@ -22,7 +22,7 @@
#include "vtkPlaneCollection.h"
#include "vtkRenderer.h"
vtkCxxRevisionMacro(vtkFocalPlanePointPlacer, "1.2");
vtkCxxRevisionMacro(vtkFocalPlanePointPlacer, "1.3");
vtkStandardNewMacro(vtkFocalPlanePointPlacer);
......@@ -99,14 +99,14 @@ int vtkFocalPlanePointPlacer::ComputeWorldPosition( vtkRenderer *ren,
}
//----------------------------------------------------------------------
int vtkFocalPlanePointPlacer::ValidateWorldPosition( double worldPos[3] )
int vtkFocalPlanePointPlacer::ValidateWorldPosition( double* vtkNotUsed(worldPos) )
{
return 1;
}
//----------------------------------------------------------------------
int vtkFocalPlanePointPlacer::ValidateWorldPosition( double worldPos[3],
double worldOrient[9] )
int vtkFocalPlanePointPlacer::ValidateWorldPosition( double* vtkNotUsed(worldPos),
double* vtkNotUsed(worldOrient) )
{
return 1;
}
......
......@@ -26,7 +26,7 @@
#define __vtkPointHandleRepresentation3D_h
#include "vtkHandleRepresentation.h"
#include "vtkCursor3D.h"
#include "vtkCursor3D.h" // Needed for delegation to cursor3D
class vtkCursor3D;
class vtkProperty;
......
......@@ -31,7 +31,7 @@
#include "vtkObjectFactory.h"
vtkCxxRevisionMacro(vtkRectilinearWipeRepresentation, "1.2");
vtkCxxRevisionMacro(vtkRectilinearWipeRepresentation, "1.3");
vtkStandardNewMacro(vtkRectilinearWipeRepresentation);
vtkCxxSetObjectMacro(vtkRectilinearWipeRepresentation,RectilinearWipe,vtkImageRectilinearWipe);
......@@ -196,20 +196,20 @@ void vtkRectilinearWipeRepresentation::WidgetInteraction(double newEventPos[2])
v46[1]*(newEventPos[1] - this->StartEventPosition[1])) / l46;
int newPosition[2];
newPosition[0] = this->StartWipePosition[0];
newPosition[1] = this->StartWipePosition[1];
newPosition[0] = static_cast<int>(this->StartWipePosition[0]);
newPosition[1] = static_cast<int>(this->StartWipePosition[1]);
switch ( this->InteractionState )
{
case MovingVPane:
newPosition[0] += xPixels + 0.5;
newPosition[0] += static_cast<int>(xPixels + 0.5);
break;
case MovingHPane:
newPosition[1] += yPixels + 0.5;
newPosition[1] += static_cast<int>(yPixels + 0.5);
break;
case MovingCenter:
newPosition[0] += xPixels + 0.5;
newPosition[1] += yPixels + 0.5;
newPosition[0] += static_cast<int>(xPixels + 0.5);
newPosition[1] += static_cast<int>(yPixels + 0.5);
}
newPosition[0] = (newPosition[0] < 0 ? 0 : newPosition[0] );
......
......@@ -25,7 +25,7 @@
#include "vtkTextProperty.h"
#include <vtkstd/vector>
vtkCxxRevisionMacro(vtkSeedRepresentation, "1.2");
vtkCxxRevisionMacro(vtkSeedRepresentation, "1.3");
vtkCxxSetObjectMacro(vtkSeedRepresentation,HandleRepresentation,vtkHandleRepresentation);
vtkStandardNewMacro(vtkSeedRepresentation);
......@@ -68,24 +68,17 @@ vtkSeedRepresentation::~vtkSeedRepresentation()
//----------------------------------------------------------------------
vtkHandleRepresentation *vtkSeedRepresentation::GetHandleRepresentation(unsigned int num)
{
if ( num < 0 )
if ( num < this->Handles->size() )
{
return NULL;
return (*this->Handles)[num];
}
else
else //create one
{
if ( num < this->Handles->size() )
{
return (*this->Handles)[num];
}
else //create one
{
vtkHandleRepresentation *rep = this->HandleRepresentation->NewInstance();
rep->ShallowCopy(this->HandleRepresentation);
this->Handles->resize(num+1,NULL);
(*this->Handles)[num] = rep;
return rep;
}
vtkHandleRepresentation *rep = this->HandleRepresentation->NewInstance();
rep->ShallowCopy(this->HandleRepresentation);
this->Handles->resize(num+1,NULL);
(*this->Handles)[num] = rep;
return rep;
}
}
......
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