Commit 9a898bd4 authored by hrchilds's avatar hrchilds
Browse files

Update from April 7, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@215 18c085ea-50e0-402c-830e-de6fd14e8384
parent 33cc5137
......@@ -10,13 +10,13 @@
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
// ****************************************************************************
GlobalAttributes::GlobalAttributes() : AttributeSubject("s*i*ibbbbbibbb")
GlobalAttributes::GlobalAttributes() : AttributeSubject("s*i*ibbbbbibbbb")
{
activeWindow = 1;
iconifiedFlag = false;
......@@ -28,6 +28,7 @@ GlobalAttributes::GlobalAttributes() : AttributeSubject("s*i*ibbbbbibbb")
makeDefaultConfirm = true;
cloneWindowOnFirstRef = false;
maintainView = false;
maintainData = false;
}
// ****************************************************************************
......@@ -39,13 +40,13 @@ GlobalAttributes::GlobalAttributes() : AttributeSubject("s*i*ibbbbbibbb")
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
// ****************************************************************************
GlobalAttributes::GlobalAttributes(const GlobalAttributes &obj) : AttributeSubject("s*i*ibbbbbibbb")
GlobalAttributes::GlobalAttributes(const GlobalAttributes &obj) : AttributeSubject("s*i*ibbbbbibbbb")
{
sources = obj.sources;
windows = obj.windows;
......@@ -59,6 +60,7 @@ GlobalAttributes::GlobalAttributes(const GlobalAttributes &obj) : AttributeSubje
makeDefaultConfirm = obj.makeDefaultConfirm;
cloneWindowOnFirstRef = obj.cloneWindowOnFirstRef;
maintainView = obj.maintainView;
maintainData = obj.maintainData;
SelectAll();
}
......@@ -72,7 +74,7 @@ GlobalAttributes::GlobalAttributes(const GlobalAttributes &obj) : AttributeSubje
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -92,7 +94,7 @@ GlobalAttributes::~GlobalAttributes()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -113,6 +115,7 @@ GlobalAttributes::operator = (const GlobalAttributes &obj)
makeDefaultConfirm = obj.makeDefaultConfirm;
cloneWindowOnFirstRef = obj.cloneWindowOnFirstRef;
maintainView = obj.maintainView;
maintainData = obj.maintainData;
SelectAll();
}
......@@ -126,7 +129,7 @@ GlobalAttributes::operator = (const GlobalAttributes &obj)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -147,7 +150,8 @@ GlobalAttributes::operator == (const GlobalAttributes &obj) const
(windowLayout == obj.windowLayout) &&
(makeDefaultConfirm == obj.makeDefaultConfirm) &&
(cloneWindowOnFirstRef == obj.cloneWindowOnFirstRef) &&
(maintainView == obj.maintainView));
(maintainView == obj.maintainView) &&
(maintainData == obj.maintainData));
}
// ****************************************************************************
......@@ -159,7 +163,7 @@ GlobalAttributes::operator == (const GlobalAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -180,7 +184,7 @@ GlobalAttributes::operator != (const GlobalAttributes &obj) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -201,7 +205,7 @@ GlobalAttributes::TypeName() const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -229,7 +233,7 @@ GlobalAttributes::CopyAttributes(const AttributeGroup *atts)
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -255,7 +259,7 @@ GlobalAttributes::CreateCompatible(const std::string &tname) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -282,7 +286,7 @@ GlobalAttributes::NewInstance(bool copy) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -303,6 +307,7 @@ GlobalAttributes::SelectAll()
Select(9, (void *)&makeDefaultConfirm);
Select(10, (void *)&cloneWindowOnFirstRef);
Select(11, (void *)&maintainView);
Select(12, (void *)&maintainData);
}
///////////////////////////////////////////////////////////////////////////////
......@@ -356,6 +361,9 @@ GlobalAttributes::SelectAll()
// Brad Whitlock, Fri Jan 23 16:16:02 PST 2004
// I changed the numbering due to a change in attribute ordering.
//
// Eric Brugger, Tue Mar 30 08:39:07 PST 2004
// I added maintainData.
//
// ****************************************************************************
bool
......@@ -413,6 +421,12 @@ GlobalAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool force
node->AddNode(new DataNode("maintainView", maintainView));
}
if(completeSave || !FieldsEqual(12, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("maintainData", maintainData));
}
// Add the node to the parent node.
if(addToParent || forceAdd)
parentNode->AddNode(node);
......@@ -457,6 +471,9 @@ GlobalAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool force
// Eric Brugger, Fri Apr 18 10:27:53 PDT 2003
// I added maintainView.
//
// Eric Brugger, Tue Mar 30 08:39:07 PST 2004
// I added maintainData.
//
// ****************************************************************************
void
......@@ -484,6 +501,8 @@ GlobalAttributes::SetFromNode(DataNode *parentNode)
SetCloneWindowOnFirstRef(node->AsBool());
if((node = searchNode->GetNode("maintainView")) != 0)
SetMaintainView(node->AsBool());
if((node = searchNode->GetNode("maintainData")) != 0)
SetMaintainData(node->AsBool());
}
///////////////////////////////////////////////////////////////////////////////
// Set property methods
......@@ -573,6 +592,13 @@ GlobalAttributes::SetMaintainView(bool maintainView_)
Select(11, (void *)&maintainView);
}
void
GlobalAttributes::SetMaintainData(bool maintainData_)
{
maintainData = maintainData_;
Select(12, (void *)&maintainData);
}
///////////////////////////////////////////////////////////////////////////////
// Get property methods
///////////////////////////////////////////////////////////////////////////////
......@@ -661,6 +687,12 @@ GlobalAttributes::GetMaintainView() const
return maintainView;
}
bool
GlobalAttributes::GetMaintainData() const
{
return maintainData;
}
///////////////////////////////////////////////////////////////////////////////
// Select property methods
///////////////////////////////////////////////////////////////////////////////
......@@ -690,7 +722,7 @@ GlobalAttributes::SelectWindows()
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -713,6 +745,7 @@ GlobalAttributes::GetFieldName(int index) const
case 9: return "makeDefaultConfirm";
case 10: return "cloneWindowOnFirstRef";
case 11: return "maintainView";
case 12: return "maintainData";
default: return "invalid index";
}
}
......@@ -726,7 +759,7 @@ GlobalAttributes::GetFieldName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -749,6 +782,7 @@ GlobalAttributes::GetFieldType(int index) const
case 9: return FieldType_bool;
case 10: return FieldType_bool;
case 11: return FieldType_bool;
case 12: return FieldType_bool;
default: return FieldType_unknown;
}
}
......@@ -762,7 +796,7 @@ GlobalAttributes::GetFieldType(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -785,6 +819,7 @@ GlobalAttributes::GetFieldTypeName(int index) const
case 9: return "bool";
case 10: return "bool";
case 11: return "bool";
case 12: return "bool";
default: return "invalid index";
}
}
......@@ -798,7 +833,7 @@ GlobalAttributes::GetFieldTypeName(int index) const
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -871,6 +906,11 @@ GlobalAttributes::FieldsEqual(int index_, const AttributeGroup *rhs) const
retval = (maintainView == obj.maintainView);
}
break;
case 12:
{ // new scope
retval = (maintainData == obj.maintainData);
}
break;
default: retval = false;
}
......
......@@ -48,6 +48,9 @@ Definition:
// Brad Whitlock, Fri Jan 23 16:16:02 PST 2004
// I changed the numbering due to a change in attribute ordering.
//
// Eric Brugger, Tue Mar 30 08:39:07 PST 2004
// I added maintainData.
//
// ****************************************************************************
bool
......@@ -105,6 +108,12 @@ GlobalAttributes::CreateNode(DataNode *parentNode, bool completeSave, bool force
node->AddNode(new DataNode("maintainView", maintainView));
}
if(completeSave || !FieldsEqual(12, &defaultObject))
{
addToParent = true;
node->AddNode(new DataNode("maintainData", maintainData));
}
// Add the node to the parent node.
if(addToParent || forceAdd)
parentNode->AddNode(node);
......@@ -153,6 +162,9 @@ Definition:
// Eric Brugger, Fri Apr 18 10:27:53 PDT 2003
// I added maintainView.
//
// Eric Brugger, Tue Mar 30 08:39:07 PST 2004
// I added maintainData.
//
// ****************************************************************************
void
......@@ -180,5 +192,7 @@ GlobalAttributes::SetFromNode(DataNode *parentNode)
SetCloneWindowOnFirstRef(node->AsBool());
if((node = searchNode->GetNode("maintainView")) != 0)
SetMaintainView(node->AsBool());
if((node = searchNode->GetNode("maintainData")) != 0)
SetMaintainData(node->AsBool());
}
......@@ -13,7 +13,7 @@
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Fri Jan 23 16:16:30 PST 2004
// Creation: Tue Mar 30 09:27:59 PDT 2004
//
// Modifications:
//
......@@ -53,6 +53,7 @@ public:
void SetMakeDefaultConfirm(bool makeDefaultConfirm_);
void SetCloneWindowOnFirstRef(bool cloneWindowOnFirstRef_);
void SetMaintainView(bool maintainView_);
void SetMaintainData(bool maintainData_);
// Property getting methods
const stringVector &GetSources() const;
......@@ -69,6 +70,7 @@ public:
bool GetMakeDefaultConfirm() const;
bool GetCloneWindowOnFirstRef() const;
bool GetMaintainView() const;
bool GetMaintainData() const;
// Persistence methods
virtual bool CreateNode(DataNode *node, bool completeSave, bool forceAdd);
......@@ -94,6 +96,7 @@ private:
bool makeDefaultConfirm;
bool cloneWindowOnFirstRef;
bool maintainView;
bool maintainData;
};
#endif
......@@ -34,6 +34,9 @@
<Field name="maintainView" label="maintainView" type="bool">
false
</Field>
<Field name="maintainData" label="maintainData" type="bool">
false
</Field>
<Function name="CreateNode" user="false" member="true">
</Function>
<Function name="SetFromNode" user="false" member="true">
......
......@@ -6,6 +6,7 @@
#include <SaveWindowAttributes.h>
#include <avtCallback.h>
#include <ImproperUseException.h>
// ****************************************************************************
......@@ -188,6 +189,9 @@ avtFileWriter::IsImageFormat(void)
// Kathleen Bonnell, Wed Nov 12 16:59:24 PST 2003
// Added argument 'compression'.
//
// Hank Childs, Tue Apr 6 16:48:58 PDT 2004
// Do not assume the input is valid.
//
// ****************************************************************************
void
......@@ -196,13 +200,30 @@ avtFileWriter::Write(const char *filename, avtDataObject_p dob, int quality,
{
if (IsImageFormat())
{
imgWriter->SetInput(dob);
imgWriter->Write(imgFormat, filename, quality, progressive, compression);
if (*dob == NULL)
{
avtCallback::IssueWarning("The file writer was not able to save "
"out a NULL image.");
}
else
{
imgWriter->SetInput(dob);
imgWriter->Write(imgFormat, filename, quality, progressive,
compression);
}
}
else
{
dsWriter->SetInput(dob);
dsWriter->Write(dsFormat, filename, binary);
if (*dob == NULL)
{
avtCallback::IssueWarning("The file writer was not able to save "
"out a NULL surface.");
}
else
{
dsWriter->SetInput(dob);
dsWriter->Write(dsFormat, filename, binary);
}
}
}
......
......@@ -785,6 +785,10 @@ avtContourFilter::CreatePercentValues(double mn, double mx)
// Kathleen Bonnell, Tue Jan 20 17:38:37 PST 2004
// Fix problem with delta when lo > hi.
//
// Eric Brugger, Mon Apr 5 15:35:27 PDT 2004
// Change the way the levels are set when the user specifies the number
// of levels and the minimum and maximum.
//
// ****************************************************************************
void
......@@ -823,19 +827,15 @@ avtContourFilter::CreateNIsoValues(double min, double max)
//
// If we have to generate the isolevels, then we want them to be offset
// at the extrema. This offset is arbitrary and mimicks what MeshTV did.
// at the extrema. This offset is arbitrary and mimicks what MeshTV did,
// except in the case where the minimum and maximum are specified. In
// MeshTV, the offsets weren't applied if the minimum or maximum were
// specified, whereas here we always apply the offsets.
//
extremaOffset = (hi - lo) / (nLevels + 1.);
if (!atts.GetMinFlag())
{
lo += extremaOffset;
}
if (!atts.GetMaxFlag())
{
hi -= extremaOffset;
}
lo += extremaOffset;
hi -= extremaOffset;
if (nLevels <= 1)
{
......
......@@ -93,13 +93,18 @@ avtActor::SetBehavior(avtBehavior_p b)
// Programmer: Hank Childs
// Creation: December 28, 2000
//
// Modifications:
//
// Hank Childs, Wed Apr 7 08:03:14 PDT 2004
// Check to make sure the drawable input is not NULL as well.
//
// ****************************************************************************
void
avtActor::SetDrawable(avtDrawable_p d)
{
drawable = d;
if (renderer != NULL)
if ((renderer != NULL) && (*drawable != NULL))
{
drawable->Add(renderer);
}
......
......@@ -169,6 +169,42 @@ avtPlot::~avtPlot()
}
// ****************************************************************************
// Method: avtPlot::SetDataExtents
//
// Purpose:
// Set the data extents for the plot to use.
//
// Programmer: Eric Brugger
// Creation: March 19, 2004
//
// ****************************************************************************
void
avtPlot::SetDataExtents(const vector<double> &extents)
{
dataExtents = extents;
}
// ****************************************************************************
// Method: avtPlot::GetDataExtents
//
// Purpose:
// Get the data extents that the plot used.
//
// Programmer: Eric Brugger
// Creation: March 19, 2004
//
// ****************************************************************************
void
avtPlot::GetDataExtents(vector<double> &extents)
{
extents = dataExtents;
}
// ****************************************************************************
// Method: avtPlot::SetVarName
//
......
......@@ -20,6 +20,8 @@
#include <avtTheater.h>
#include <avtBehavior.h>
#include <vector>
class avtDatasetToDatasetFilter;
class avtSmoothPolyDataFilter;
class avtVertexNormalsFilter;
......@@ -128,9 +130,12 @@ class AttributeSubject;
// Kathleen Bonnell, Wed Aug 27 15:45:45 PDT 2003
// Added SetOpaqueMeshIsAppropriate.
//
// Eric Brugger, Fri Mar 19 15:46:52 PST 2004
// Added Set/GetDataExtents.
//
// Mark C. Miller, Wed Mar 24 19:23:21 PST 2004
// Added AttributesDependOnDatabaseMetaData
//
//
// ****************************************************************************
class PLOTTER_API avtPlot
......@@ -157,6 +162,9 @@ class PLOTTER_API avtPlot
virtual void SetAtts(const AttributeGroup*) = 0;
void SetDataExtents(const std::vector<double> &);
virtual void GetDataExtents(std::vector<double> &);
void SetVarName(const char *name);
bool NeedsRecalculation(void);
......@@ -196,6 +204,7 @@ class PLOTTER_API avtPlot
avtSmoothPolyDataFilter *smooth;
avtSILRestriction_p silr;
char *varname;
vector<double> dataExtents;
avtDataObjectWriter_p Execute(avtDataObject_p,
avtPipelineSpecification_p,
......
......@@ -381,6 +381,9 @@ RPCExecutor<PreparePlotRPC>::Execute(PreparePlotRPC *rpc)
// Added a call to cancel the current network in case of an error.
// That way future calls do not fail due to a failed pre-existing network.
//
// Eric Brugger, Fri Mar 19 15:19:13 PST 2004
// Modified the rpc to pass the data extents to the engine.
//
// ****************************************************************************
template<>
void
......@@ -392,7 +395,8 @@ RPCExecutor<MakePlotRPC>::Execute(MakePlotRPC *rpc)
debug2 << "Executing MakePlotRPC: " << rpc->GetID().c_str() << endl;
TRY
{
netmgr->MakePlot(rpc->GetID().c_str(), rpc->GetAtts());
netmgr->MakePlot(rpc->GetID().c_str(), rpc->GetAtts(),
rpc->GetDataExtents());
MakePlotRPC::NetworkID id(netmgr->EndNetwork());
rpc->SendReply(&id);
}
......
......@@ -804,11 +804,14 @@ NetworkManager::AddFilter(const string &filtertype,
// Made sure the total number of filters was the same when matching
// networks (since when a plot is applied, no more filter can be).
//
// Eric Brugger, Fri Mar 19 15:25:20 PST 2004
// Modified the rpc to set the data extents in the engine.
//
// ****************************************************************************
void
NetworkManager::MakePlot(const string &id, const AttributeGroup *atts)
NetworkManager::MakePlot(const string &id, const AttributeGroup *atts,
const vector<double> &dataExtents)
{
//cerr << "NetworkManager::MakePlot()" << endl;
if (workingNet == NULL)
{
debug1 << "Adding a plot to a non-existent network." << endl;
......@@ -831,6 +834,8 @@ NetworkManager::MakePlot(const string &id, const AttributeGroup *atts)
avtPlot *p = PlotPluginManager::Instance()->
GetEnginePluginInfo(id)->AllocAvtPlot();
p->SetDataExtents(dataExtents);
workingNet->SetPlot(p);
workingNet->GetPlot()->SetAtts(atts);
workingNet->SetPlottype(id);
......
......@@ -129,6 +129,9 @@ class VisWindow;
// Keep track of what plots are in the vis window in SR mode, so we don't
// have to clear out the vis window with every render.
//
// Eric Brugger, Fri Mar 19 15:21:24 PST 2004
// Modified the MakePlot rpc to pass the data extents to the engine.
//
// Hank Childs, Mon Mar 22 11:10:43 PST 2004
// Allow for the database's file format type to be specified explicitly.
//
......@@ -163,7 +166,8 @@ class NetworkManager
void AddFilter(const std::string&,
const AttributeGroup* = NULL,
const unsigned int ninputs = 1);
void MakePlot(const std::string&, const AttributeGroup* = NULL);
void MakePlot(const std::string&, const AttributeGroup*,
const std::vector<double> &);
int EndNetwork(void);
void CancelNetwork();
......