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

ERR: Fixed compilation problems.

parent bb1254fb
......@@ -16,7 +16,7 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
=========================================================================*/
//
// Create line centered at origin
// Computational class for lines.
//
#ifndef __vlLine_h
#define __vlLine_h
......
......@@ -22,25 +22,37 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
#include "PolySrc.hh"
#define MAX_RESOLUTION 8
#define MAX_RESOLUTION 512
class vlSphereSource : public vlPolySource
{
public:
vlSphereSource(int res=2);
vlSphereSource(int res=4);
char *GetClassName() {return "vlSphereSource";};
void PrintSelf(ostream& os, vlIndent indent);
vlSetClampMacro(Radius,float,0.0,LARGE_FLOAT)
vlSetClampMacro(Radius,float,0.0,LARGE_FLOAT);
vlGetMacro(Radius,float);
vlSetClampMacro(Resolution,int,0,MAX_RESOLUTION)
vlGetMacro(Resolution,int);
vlSetClampMacro(ThetaResolution,int,4,MAX_RESOLUTION);
vlGetMacro(ThetaResolution,int);
vlSetClampMacro(PhiResolution,int,4,MAX_RESOLUTION);
vlGetMacro(PhiResolution,int);
vlSetClampMacro(Theta,float,0.0,360.0);
vlGetMacro(Theta,int);
vlSetClampMacro(Phi,float,0.0,180.0);
vlGetMacro(Phi,int);
protected:
void Execute();
float Radius;
int Resolution;
float Theta;
float Phi;
int ThetaResolution;
int PhiResolution;
};
......
......@@ -21,9 +21,10 @@ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen 1993, 1994
vlSphereSource::vlSphereSource(int res)
{
res = (res < 0 ? 0 : res);
this->Resolution = res;
res = res < 4 ? 4 : res;
this->Radius = 0.5;
this->ThetaResolution = 4;
this->PhiResolution = 4;
}
void vlSphereSource::Execute()
......@@ -37,7 +38,8 @@ void vlSphereSource::PrintSelf(ostream& os, vlIndent indent)
{
vlPolySource::PrintSelf(os,indent);
os << indent << "Resolution: " << this->Resolution << "\n";
os << indent << "Theta Resolution: " << this->ThetaResolution << "\n";
os << indent << "Phi Resolution: " << this->PhiResolution << "\n";
os << indent << "Radius: " << this->Radius << "\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