Commit d2db1157 authored by allens's avatar allens

added a flip option for the toroidal angle

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@16607 18c085ea-50e0-402c-830e-de6fd14e8384
parent 59b611be
......@@ -135,6 +135,9 @@
<Field name="toroidalAngle" label="Toroidal angle" type="double">
0.000000
</Field>
<Field name="flipToroidalAngle" label="Flip toroidal angle" type="bool">
false
</Field>
<Field name="viewGeometry" label="View geometry" type="enum" subtype="ViewGeometry">
Surfaces
</Field>
......
......@@ -640,6 +640,7 @@ void LineSamplerAttributes::Init()
poloialRTilt = 0;
poloialZTilt = 0;
toroidalAngle = 0;
flipToroidalAngle = false;
viewGeometry = Surfaces;
viewDimension = Three;
heightPlotScale = 1;
......@@ -717,6 +718,7 @@ void LineSamplerAttributes::Copy(const LineSamplerAttributes &obj)
poloialRTilt = obj.poloialRTilt;
poloialZTilt = obj.poloialZTilt;
toroidalAngle = obj.toroidalAngle;
flipToroidalAngle = obj.flipToroidalAngle;
viewGeometry = obj.viewGeometry;
viewDimension = obj.viewDimension;
heightPlotScale = obj.heightPlotScale;
......@@ -928,6 +930,7 @@ LineSamplerAttributes::operator == (const LineSamplerAttributes &obj) const
(poloialRTilt == obj.poloialRTilt) &&
(poloialZTilt == obj.poloialZTilt) &&
(toroidalAngle == obj.toroidalAngle) &&
(flipToroidalAngle == obj.flipToroidalAngle) &&
(viewGeometry == obj.viewGeometry) &&
(viewDimension == obj.viewDimension) &&
(heightPlotScale == obj.heightPlotScale) &&
......@@ -1120,6 +1123,7 @@ LineSamplerAttributes::SelectAll()
Select(ID_poloialRTilt, (void *)&poloialRTilt);
Select(ID_poloialZTilt, (void *)&poloialZTilt);
Select(ID_toroidalAngle, (void *)&toroidalAngle);
Select(ID_flipToroidalAngle, (void *)&flipToroidalAngle);
Select(ID_viewGeometry, (void *)&viewGeometry);
Select(ID_viewDimension, (void *)&viewDimension);
Select(ID_heightPlotScale, (void *)&heightPlotScale);
......@@ -1301,6 +1305,12 @@ LineSamplerAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool
node->AddNode(new DataNode("toroidalAngle", toroidalAngle));
}
if(completeSave || !FieldsEqual(ID_flipToroidalAngle, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("flipToroidalAngle", flipToroidalAngle));
}
if(completeSave || !FieldsEqual(ID_viewGeometry, &defaultObject))
{
addToParent = true;
......@@ -1635,6 +1645,8 @@ LineSamplerAttributes::SetFromNode(DataNode *parentNode)
SetPoloialZTilt(node->AsDouble());
if((node = searchNode->GetNode("toroidalAngle")) != 0)
SetToroidalAngle(node->AsDouble());
if((node = searchNode->GetNode("flipToroidalAngle")) != 0)
SetFlipToroidalAngle(node->AsBool());
if((node = searchNode->GetNode("viewGeometry")) != 0)
{
// Allow enums to be int or string in the config file
......@@ -1967,6 +1979,13 @@ LineSamplerAttributes::SetToroidalAngle(double toroidalAngle_)
Select(ID_toroidalAngle, (void *)&toroidalAngle);
}
void
LineSamplerAttributes::SetFlipToroidalAngle(bool flipToroidalAngle_)
{
flipToroidalAngle = flipToroidalAngle_;
Select(ID_flipToroidalAngle, (void *)&flipToroidalAngle);
}
void
LineSamplerAttributes::SetViewGeometry(LineSamplerAttributes::ViewGeometry viewGeometry_)
{
......@@ -2300,6 +2319,12 @@ LineSamplerAttributes::GetToroidalAngle() const
return toroidalAngle;
}
bool
LineSamplerAttributes::GetFlipToroidalAngle() const
{
return flipToroidalAngle;
}
LineSamplerAttributes::ViewGeometry
LineSamplerAttributes::GetViewGeometry() const
{
......@@ -2552,6 +2577,7 @@ LineSamplerAttributes::GetFieldName(int index) const
case ID_poloialRTilt: return "poloialRTilt";
case ID_poloialZTilt: return "poloialZTilt";
case ID_toroidalAngle: return "toroidalAngle";
case ID_flipToroidalAngle: return "flipToroidalAngle";
case ID_viewGeometry: return "viewGeometry";
case ID_viewDimension: return "viewDimension";
case ID_heightPlotScale: return "heightPlotScale";
......@@ -2625,6 +2651,7 @@ LineSamplerAttributes::GetFieldType(int index) const
case ID_poloialRTilt: return FieldType_double;
case ID_poloialZTilt: return FieldType_double;
case ID_toroidalAngle: return FieldType_double;
case ID_flipToroidalAngle: return FieldType_bool;
case ID_viewGeometry: return FieldType_enum;
case ID_viewDimension: return FieldType_enum;
case ID_heightPlotScale: return FieldType_double;
......@@ -2698,6 +2725,7 @@ LineSamplerAttributes::GetFieldTypeName(int index) const
case ID_poloialRTilt: return "double";
case ID_poloialZTilt: return "double";
case ID_toroidalAngle: return "double";
case ID_flipToroidalAngle: return "bool";
case ID_viewGeometry: return "enum";
case ID_viewDimension: return "enum";
case ID_heightPlotScale: return "double";
......@@ -2858,6 +2886,11 @@ LineSamplerAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const
retval = (toroidalAngle == obj.toroidalAngle);
}
break;
case ID_flipToroidalAngle:
{ // new scope
retval = (flipToroidalAngle == obj.flipToroidalAngle);
}
break;
case ID_viewGeometry:
{ // new scope
retval = (viewGeometry == obj.viewGeometry);
......
......@@ -194,6 +194,7 @@ public:
void SetPoloialRTilt(double poloialRTilt_);
void SetPoloialZTilt(double poloialZTilt_);
void SetToroidalAngle(double toroidalAngle_);
void SetFlipToroidalAngle(bool flipToroidalAngle_);
void SetViewGeometry(ViewGeometry viewGeometry_);
void SetViewDimension(ViewDimension viewDimension_);
void SetHeightPlotScale(double heightPlotScale_);
......@@ -246,6 +247,7 @@ public:
double GetPoloialRTilt() const;
double GetPoloialZTilt() const;
double GetToroidalAngle() const;
bool GetFlipToroidalAngle() const;
ViewGeometry GetViewGeometry() const;
ViewDimension GetViewDimension() const;
double GetHeightPlotScale() const;
......@@ -388,6 +390,7 @@ public:
ID_poloialRTilt,
ID_poloialZTilt,
ID_toroidalAngle,
ID_flipToroidalAngle,
ID_viewGeometry,
ID_viewDimension,
ID_heightPlotScale,
......@@ -441,6 +444,7 @@ private:
double poloialRTilt;
double poloialZTilt;
double toroidalAngle;
bool flipToroidalAngle;
int viewGeometry;
int viewDimension;
double heightPlotScale;
......@@ -475,6 +479,6 @@ private:
static const char *TypeMapFormatString;
static const private_tmfs_t TmfsStruct;
};
#define LINESAMPLERATTRIBUTES_TMFS "iiiidiiiddidDiddddddiidddiiddiddddiiidddiiiid*d*idd"
#define LINESAMPLERATTRIBUTES_TMFS "iiiidiiiddidDiddddddbiidddiiddiddddiiidddiiiid*d*idd"
#endif
......@@ -61,7 +61,7 @@ import java.util.Vector;
public class LineSamplerAttributes extends AttributeSubject implements Plugin
{
private static int LineSamplerAttributes_numAdditionalAtts = 49;
private static int LineSamplerAttributes_numAdditionalAtts = 50;
// Enum values
public final static int MESHGEOMETRY_CARTESIAN = 0;
......@@ -145,6 +145,7 @@ public class LineSamplerAttributes extends AttributeSubject implements Plugin
poloialRTilt = 0;
poloialZTilt = 0;
toroidalAngle = 0;
flipToroidalAngle = false;
viewGeometry = VIEWGEOMETRY_SURFACES;
viewDimension = VIEWDIMENSION_THREE;
heightPlotScale = 1;
......@@ -209,6 +210,7 @@ public class LineSamplerAttributes extends AttributeSubject implements Plugin
poloialRTilt = 0;
poloialZTilt = 0;
toroidalAngle = 0;
flipToroidalAngle = false;
viewGeometry = VIEWGEOMETRY_SURFACES;
viewDimension = VIEWDIMENSION_THREE;
heightPlotScale = 1;
......@@ -276,6 +278,7 @@ public class LineSamplerAttributes extends AttributeSubject implements Plugin
poloialRTilt = obj.poloialRTilt;
poloialZTilt = obj.poloialZTilt;
toroidalAngle = obj.toroidalAngle;
flipToroidalAngle = obj.flipToroidalAngle;
viewGeometry = obj.viewGeometry;
viewDimension = obj.viewDimension;
heightPlotScale = obj.heightPlotScale;
......@@ -379,6 +382,7 @@ public class LineSamplerAttributes extends AttributeSubject implements Plugin
(poloialRTilt == obj.poloialRTilt) &&
(poloialZTilt == obj.poloialZTilt) &&
(toroidalAngle == obj.toroidalAngle) &&
(flipToroidalAngle == obj.flipToroidalAngle) &&
(viewGeometry == obj.viewGeometry) &&
(viewDimension == obj.viewDimension) &&
(heightPlotScale == obj.heightPlotScale) &&
......@@ -544,178 +548,184 @@ public class LineSamplerAttributes extends AttributeSubject implements Plugin
Select(19);
}
public void SetFlipToroidalAngle(boolean flipToroidalAngle_)
{
flipToroidalAngle = flipToroidalAngle_;
Select(20);
}
public void SetViewGeometry(int viewGeometry_)
{
viewGeometry = viewGeometry_;
Select(20);
Select(21);
}
public void SetViewDimension(int viewDimension_)
{
viewDimension = viewDimension_;
Select(21);
Select(22);
}
public void SetHeightPlotScale(double heightPlotScale_)
{
heightPlotScale = heightPlotScale_;
Select(22);
Select(23);
}
public void SetChannelPlotOffset(double channelPlotOffset_)
{
channelPlotOffset = channelPlotOffset_;
Select(23);
Select(24);
}
public void SetArrayPlotOffset(double arrayPlotOffset_)
{
arrayPlotOffset = arrayPlotOffset_;
Select(24);
Select(25);
}
public void SetDisplayTime(int displayTime_)
{
displayTime = displayTime_;
Select(25);
Select(26);
}
public void SetChannelGeometry(int channelGeometry_)
{
channelGeometry = channelGeometry_;
Select(26);
Select(27);
}
public void SetRadius(double radius_)
{
radius = radius_;
Select(27);
Select(28);
}
public void SetDivergence(double divergence_)
{
divergence = divergence_;
Select(28);
Select(29);
}
public void SetChannelProfile(int channelProfile_)
{
channelProfile = channelProfile_;
Select(29);
Select(30);
}
public void SetStandardDeviation(double standardDeviation_)
{
standardDeviation = standardDeviation_;
Select(30);
Select(31);
}
public void SetSampleDistance(double sampleDistance_)
{
sampleDistance = sampleDistance_;
Select(31);
Select(32);
}
public void SetSampleVolume(double sampleVolume_)
{
sampleVolume = sampleVolume_;
Select(32);
Select(33);
}
public void SetSampleArc(double sampleArc_)
{
sampleArc = sampleArc_;
Select(33);
Select(34);
}
public void SetChannelIntegration(int channelIntegration_)
{
channelIntegration = channelIntegration_;
Select(34);
Select(35);
}
public void SetToroidalIntegration(int toroidalIntegration_)
{
toroidalIntegration = toroidalIntegration_;
Select(35);
Select(36);
}
public void SetToroidalAngleSampling(int toroidalAngleSampling_)
{
toroidalAngleSampling = toroidalAngleSampling_;
Select(36);
Select(37);
}
public void SetToroidalAngleStart(double toroidalAngleStart_)
{
toroidalAngleStart = toroidalAngleStart_;
Select(37);
Select(38);
}
public void SetToroidalAngleStop(double toroidalAngleStop_)
{
toroidalAngleStop = toroidalAngleStop_;
Select(38);
Select(39);
}
public void SetToroidalAngleStride(double toroidalAngleStride_)
{
toroidalAngleStride = toroidalAngleStride_;
Select(39);
Select(40);
}
public void SetTimeSampling(int timeSampling_)
{
timeSampling = timeSampling_;
Select(40);
Select(41);
}
public void SetTimeStepStart(int timeStepStart_)
{
timeStepStart = timeStepStart_;
Select(41);
Select(42);
}
public void SetTimeStepStop(int timeStepStop_)
{
timeStepStop = timeStepStop_;
Select(42);
Select(43);
}
public void SetTimeStepStride(int timeStepStride_)
{
timeStepStride = timeStepStride_;
Select(43);
Select(44);
}
public void SetChannelList(Vector channelList_)
{
channelList = channelList_;
Select(44);
Select(45);
}
public void SetWallList(Vector wallList_)
{
wallList = wallList_;
Select(45);
Select(46);
}
public void SetNChannelListArrays(int nChannelListArrays_)
{
nChannelListArrays = nChannelListArrays_;
Select(46);
Select(47);
}
public void SetChannelListToroidalArrayAngle(double channelListToroidalArrayAngle_)
{
channelListToroidalArrayAngle = channelListToroidalArrayAngle_;
Select(47);
Select(48);
}
public void SetChannelListToroidalAngle(double channelListToroidalAngle_)
{
channelListToroidalAngle = channelListToroidalAngle_;
Select(48);
Select(49);
}
// Property getting methods
......@@ -739,6 +749,7 @@ public class LineSamplerAttributes extends AttributeSubject implements Plugin
public double GetPoloialRTilt() { return poloialRTilt; }
public double GetPoloialZTilt() { return poloialZTilt; }
public double GetToroidalAngle() { return toroidalAngle; }
public boolean GetFlipToroidalAngle() { return flipToroidalAngle; }
public int GetViewGeometry() { return viewGeometry; }
public int GetViewDimension() { return viewDimension; }
public double GetHeightPlotScale() { return heightPlotScale; }
......@@ -813,62 +824,64 @@ public class LineSamplerAttributes extends AttributeSubject implements Plugin
if(WriteSelect(19, buf))
buf.WriteDouble(toroidalAngle);
if(WriteSelect(20, buf))
buf.WriteInt(viewGeometry);
buf.WriteBool(flipToroidalAngle);
if(WriteSelect(21, buf))
buf.WriteInt(viewDimension);
buf.WriteInt(viewGeometry);
if(WriteSelect(22, buf))
buf.WriteDouble(heightPlotScale);
buf.WriteInt(viewDimension);
if(WriteSelect(23, buf))
buf.WriteDouble(channelPlotOffset);
buf.WriteDouble(heightPlotScale);
if(WriteSelect(24, buf))
buf.WriteDouble(arrayPlotOffset);
buf.WriteDouble(channelPlotOffset);
if(WriteSelect(25, buf))
buf.WriteInt(displayTime);
buf.WriteDouble(arrayPlotOffset);
if(WriteSelect(26, buf))
buf.WriteInt(channelGeometry);
buf.WriteInt(displayTime);
if(WriteSelect(27, buf))
buf.WriteDouble(radius);
buf.WriteInt(channelGeometry);
if(WriteSelect(28, buf))
buf.WriteDouble(divergence);
buf.WriteDouble(radius);
if(WriteSelect(29, buf))
buf.WriteInt(channelProfile);
buf.WriteDouble(divergence);
if(WriteSelect(30, buf))
buf.WriteDouble(standardDeviation);
buf.WriteInt(channelProfile);
if(WriteSelect(31, buf))
buf.WriteDouble(sampleDistance);
buf.WriteDouble(standardDeviation);
if(WriteSelect(32, buf))
buf.WriteDouble(sampleVolume);
buf.WriteDouble(sampleDistance);
if(WriteSelect(33, buf))
buf.WriteDouble(sampleArc);
buf.WriteDouble(sampleVolume);
if(WriteSelect(34, buf))
buf.WriteInt(channelIntegration);
buf.WriteDouble(sampleArc);
if(WriteSelect(35, buf))
buf.WriteInt(toroidalIntegration);
buf.WriteInt(channelIntegration);
if(WriteSelect(36, buf))
buf.WriteInt(toroidalAngleSampling);
buf.WriteInt(toroidalIntegration);
if(WriteSelect(37, buf))
buf.WriteDouble(toroidalAngleStart);
buf.WriteInt(toroidalAngleSampling);
if(WriteSelect(38, buf))
buf.WriteDouble(toroidalAngleStop);
buf.WriteDouble(toroidalAngleStart);
if(WriteSelect(39, buf))
buf.WriteDouble(toroidalAngleStride);
buf.WriteDouble(toroidalAngleStop);
if(WriteSelect(40, buf))
buf.WriteInt(timeSampling);
buf.WriteDouble(toroidalAngleStride);
if(WriteSelect(41, buf))
buf.WriteInt(timeStepStart);
buf.WriteInt(timeSampling);
if(WriteSelect(42, buf))
buf.WriteInt(timeStepStop);
buf.WriteInt(timeStepStart);
if(WriteSelect(43, buf))
buf.WriteInt(timeStepStride);
buf.WriteInt(timeStepStop);
if(WriteSelect(44, buf))
buf.WriteDoubleVector(channelList);
buf.WriteInt(timeStepStride);
if(WriteSelect(45, buf))
buf.WriteDoubleVector(wallList);
buf.WriteDoubleVector(channelList);
if(WriteSelect(46, buf))
buf.WriteInt(nChannelListArrays);
buf.WriteDoubleVector(wallList);
if(WriteSelect(47, buf))
buf.WriteDouble(channelListToroidalArrayAngle);
buf.WriteInt(nChannelListArrays);
if(WriteSelect(48, buf))
buf.WriteDouble(channelListToroidalArrayAngle);
if(WriteSelect(49, buf))
buf.WriteDouble(channelListToroidalAngle);
}
......@@ -937,90 +950,93 @@ public class LineSamplerAttributes extends AttributeSubject implements Plugin
SetToroidalAngle(buf.ReadDouble());
break;
case 20:
SetViewGeometry(buf.ReadInt());
SetFlipToroidalAngle(buf.ReadBool());
break;
case 21:
SetViewDimension(buf.ReadInt());
SetViewGeometry(buf.ReadInt());
break;
case 22:
SetHeightPlotScale(buf.ReadDouble());
SetViewDimension(buf.ReadInt());
break;
case 23:
SetChannelPlotOffset(buf.ReadDouble());
SetHeightPlotScale(buf.ReadDouble());
break;
case 24:
SetArrayPlotOffset(buf.ReadDouble());
SetChannelPlotOffset(buf.ReadDouble());
break;
case 25:
SetDisplayTime(buf.ReadInt());
SetArrayPlotOffset(buf.ReadDouble());
break;
case 26:
SetChannelGeometry(buf.ReadInt());
SetDisplayTime(buf.ReadInt());
break;
case 27:
SetRadius(buf.ReadDouble());
SetChannelGeometry(buf.ReadInt());
break;
case 28:
SetDivergence(buf.ReadDouble());
SetRadius(buf.ReadDouble());
break;
case 29:
SetChannelProfile(buf.ReadInt());
SetDivergence(buf.ReadDouble());
break;
case 30:
SetStandardDeviation(buf.ReadDouble());
SetChannelProfile(buf.ReadInt());
break;
case 31:
SetSampleDistance(buf.ReadDouble());
SetStandardDeviation(buf.ReadDouble());
break;
case 32:
SetSampleVolume(buf.ReadDouble());
SetSampleDistance(buf.ReadDouble());
break;
case 33:
SetSampleArc(buf.ReadDouble());
SetSampleVolume(buf.ReadDouble());
break;
case 34:
SetChannelIntegration(buf.ReadInt());
SetSampleArc(buf.ReadDouble());
break;
case 35:
SetToroidalIntegration(buf.ReadInt());
SetChannelIntegration(buf.ReadInt());
break;
case 36:
SetToroidalAngleSampling(buf.ReadInt());
SetToroidalIntegration(buf.ReadInt());
break;
case 37:
SetToroidalAngleStart(buf.ReadDouble());
SetToroidalAngleSampling(buf.ReadInt());
break;
case 38:
SetToroidalAngleStop(buf.ReadDouble());
SetToroidalAngleStart(buf.ReadDouble());
break;
case 39:
SetToroidalAngleStride(buf.ReadDouble());
SetToroidalAngleStop(buf.ReadDouble());
break;
case 40:
SetTimeSampling(buf.ReadInt());
SetToroidalAngleStride(buf.ReadDouble());
break;
case 41:
SetTimeStepStart(buf.ReadInt());
SetTimeSampling(buf.ReadInt());