Commit b9c34a68 authored by ghweber's avatar ghweber

Added material boundary interface operator.

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@1858 18c085ea-50e0-402c-830e-de6fd14e8384
parent 071155b6
<?xml version="1.0"?>
<Plugin name="Boundary" type="operator" label="Boundary" version="1.0" enabled="true" mdspecificcode="false" engspecificcode="false" onlyengine="false" noengine="false" iconFile="Boundary.xpm">
<Attribute name="BoundaryOpAttributes" purpose="Attributes for Boundary Operator" persistent="true" keyframe="true" exportAPI="" exportInclude="">
<Field name="smoothingLevel" label="Smoothing level" type="int">
0
</Field>
</Attribute>
</Plugin>
/* XPM */
static const char * Boundary_xpm[] = {
"32 32 4 1",
" c None",
". c #00FF00",
"+ c #0000FF",
"@ c #FF0000",
" ",
" ",
" ",
" ..... ",
" . ........ ",
" . .....+++ ",
" . .+++++++ ",
" . .+ ++++++ ",
" . .+ +++++++ ",
" .. ..+ +++ ",
" .. ..+ + ",
" . .++ + ",
" . .+ + ",
" . ..+ ++ ",
" . ........+ ++ ",
" ......@@@@@@++ + ",
" @@@@@@@ @@++ + ",
" @@ @@++ ++ ",
" @@ @@++ + ",
" @ @@++ + ",
" @ @@++ ++ ",
" @ @@++ + ",
" @ @@++++ ",
" @@ @@++ ",
" @@ @@ ",
" @ @@@ ",
" @@ @@@ ",
" @@ @@@@ ",
" @@ @@@@ ",
" @@@@@@@@ ",
" ",
" "};
/*****************************************************************************
*
* Copyright (c) 2000 - 2007, The Regents of the University of California
* Produced at the Lawrence Livermore National Laboratory
* All rights reserved.
*
* This file is part of VisIt. For details, see http://www.llnl.gov/visit/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or materials provided with the distribution.
* - Neither the name of the UC/LLNL nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF THE UNIVERSITY OF
* CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
// ************************************************************************* //
// File: BoundaryCommonPluginInfo.C
// ************************************************************************* //
#include <BoundaryPluginInfo.h>
#include <BoundaryOpAttributes.h>
// ****************************************************************************
// Method: BoundaryCommonPluginInfo::AllocAttributes
//
// Purpose:
// Return a pointer to a newly allocated attribute subject.
//
// Returns: A pointer to the newly allocated attribute subject.
//
// Programmer: ghweber -- generated by xml2info
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// ****************************************************************************
AttributeSubject *
BoundaryCommonPluginInfo::AllocAttributes()
{
return new BoundaryOpAttributes;
}
// ****************************************************************************
// Method: BoundaryCommonPluginInfo::CopyAttributes
//
// Purpose:
// Copy a Boundary attribute subject.
//
// Arguments:
// to The destination attribute subject.
// from The source attribute subject.
//
// Programmer: ghweber -- generated by xml2info
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// ****************************************************************************
void
BoundaryCommonPluginInfo::CopyAttributes(AttributeSubject *to,
AttributeSubject *from)
{
*((BoundaryOpAttributes *) to) = *((BoundaryOpAttributes *) from);
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2007, The Regents of the University of California
* Produced at the Lawrence Livermore National Laboratory
* All rights reserved.
*
* This file is part of VisIt. For details, see http://www.llnl.gov/visit/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or materials provided with the distribution.
* - Neither the name of the UC/LLNL nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF THE UNIVERSITY OF
* CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
// ************************************************************************* //
// File: BoundaryEnginePluginInfo.C
// ************************************************************************* //
#include <BoundaryPluginInfo.h>
#include <avtBoundaryFilter.h>
#if defined(__APPLE__)
#define GetEngineInfo Boundary_GetEngineInfo
#endif
// ****************************************************************************
// Function: GetEngineInfo
//
// Purpose:
// Return a new EnginePluginInfo for the Boundary operator.
//
// Programmer: ghweber -- generated by xml2info
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// ****************************************************************************
extern "C" EngineOperatorPluginInfo* GetEngineInfo()
{
return new BoundaryEnginePluginInfo;
}
// ****************************************************************************
// Method: BoundaryEnginePluginInfo::AllocAvtPluginFilter
//
// Purpose:
// Return a pointer to a newly allocated avtPluginFilter.
//
// Returns: A pointer to the newly allocated avtPluginFilter.
//
// Programmer: ghweber -- generated by xml2info
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// ****************************************************************************
avtPluginFilter *
BoundaryEnginePluginInfo::AllocAvtPluginFilter()
{
return new avtBoundaryFilter;
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2007, The Regents of the University of California
* Produced at the Lawrence Livermore National Laboratory
* All rights reserved.
*
* This file is part of VisIt. For details, see http://www.llnl.gov/visit/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or materials provided with the distribution.
* - Neither the name of the UC/LLNL nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF THE UNIVERSITY OF
* CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
// ************************************************************************* //
// File: BoundaryGUIPluginInfo.C
// ************************************************************************* //
#include <BoundaryPluginInfo.h>
#include <BoundaryOpAttributes.h>
#include <QvisBoundaryWindow.h>
#if defined(__APPLE__)
#define GetGUIInfo Boundary_GetGUIInfo
#endif
// ****************************************************************************
// Function: GetGUIInfo
//
// Purpose:
// Return a new GUIPluginInfo for the Boundary operator.
//
// Programmer: ghweber -- generated by xml2info
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// ****************************************************************************
extern "C" GUIOperatorPluginInfo* GetGUIInfo()
{
return new BoundaryGUIPluginInfo;
}
// ****************************************************************************
// Method: BoundaryGUIPluginInfo::GetMenuName
//
// Purpose:
// Return a pointer to the name to use in the GUI menu.
//
// Returns: A pointer to the name to use in the GUI menu.
//
// Programmer: ghweber -- generated by xml2info
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// ****************************************************************************
const char *
BoundaryGUIPluginInfo::GetMenuName() const
{
return "Boundary";
}
// ****************************************************************************
// Method: BoundaryGUIPluginInfo::CreatePluginWindow
//
// Purpose:
// Return a pointer to an operator's attribute window.
//
// Arguments:
// type The type of the operator.
// attr The attribute subject for the operator.
// notepad The notepad to use for posting the window.
//
// Returns: A pointer to the operator's attribute window.
//
// Programmer: ghweber -- generated by xml2info
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// ****************************************************************************
QvisPostableWindowObserver *
BoundaryGUIPluginInfo::CreatePluginWindow(int type, AttributeSubject *attr,
QvisNotepadArea *notepad)
{
return new QvisBoundaryWindow(type, (BoundaryOpAttributes *)attr,
"Boundary operator attributes", "Boundary operator", notepad);
}
// ****************************************************************************
// Method: BoundaryGUIPluginInfo::XPMIconData
//
// Purpose:
// Return a pointer to the icon data.
//
// Returns: A pointer to the icon data.
//
// Programmer: ghweber -- generated by xml2info
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// ****************************************************************************
#include <Boundary.xpm>
const char **
BoundaryGUIPluginInfo::XPMIconData() const
{
return Boundary_xpm;
}
/*****************************************************************************
*
* Copyright (c) 2000 - 2007, The Regents of the University of California
* Produced at the Lawrence Livermore National Laboratory
* All rights reserved.
*
* This file is part of VisIt. For details, see http://www.llnl.gov/visit/. The
* full copyright notice is contained in the file COPYRIGHT located at the root
* of the VisIt distribution or at http://www.llnl.gov/visit/copyright.html.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the disclaimer below.
* - Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the disclaimer (as noted below) in the
* documentation and/or materials provided with the distribution.
* - Neither the name of the UC/LLNL nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OF THE UNIVERSITY OF
* CALIFORNIA, THE U.S. DEPARTMENT OF ENERGY OR CONTRIBUTORS BE LIABLE FOR
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
* DAMAGE.
*
*****************************************************************************/
#include <BoundaryOpAttributes.h>
#include <DataNode.h>
// Type map format string
const char *BoundaryOpAttributes::TypeMapFormatString = "i";
// ****************************************************************************
// Method: BoundaryOpAttributes::BoundaryOpAttributes
//
// Purpose:
// Constructor for the BoundaryOpAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// Modifications:
//
// ****************************************************************************
BoundaryOpAttributes::BoundaryOpAttributes() :
AttributeSubject(BoundaryOpAttributes::TypeMapFormatString)
{
smoothingLevel = 0;
}
// ****************************************************************************
// Method: BoundaryOpAttributes::BoundaryOpAttributes
//
// Purpose:
// Copy constructor for the BoundaryOpAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// Modifications:
//
// ****************************************************************************
BoundaryOpAttributes::BoundaryOpAttributes(const BoundaryOpAttributes &obj) :
AttributeSubject(BoundaryOpAttributes::TypeMapFormatString)
{
smoothingLevel = obj.smoothingLevel;
SelectAll();
}
// ****************************************************************************
// Method: BoundaryOpAttributes::~BoundaryOpAttributes
//
// Purpose:
// Destructor for the BoundaryOpAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// Modifications:
//
// ****************************************************************************
BoundaryOpAttributes::~BoundaryOpAttributes()
{
// nothing here
}
// ****************************************************************************
// Method: BoundaryOpAttributes::operator =
//
// Purpose:
// Assignment operator for the BoundaryOpAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// Modifications:
//
// ****************************************************************************
BoundaryOpAttributes&
BoundaryOpAttributes::operator = (const BoundaryOpAttributes &obj)
{
if (this == &obj) return *this;
smoothingLevel = obj.smoothingLevel;
SelectAll();
return *this;
}
// ****************************************************************************
// Method: BoundaryOpAttributes::operator ==
//
// Purpose:
// Comparison operator == for the BoundaryOpAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// Modifications:
//
// ****************************************************************************
bool
BoundaryOpAttributes::operator == (const BoundaryOpAttributes &obj) const
{
// Create the return value
return ((smoothingLevel == obj.smoothingLevel));
}
// ****************************************************************************
// Method: BoundaryOpAttributes::operator !=
//
// Purpose:
// Comparison operator != for the BoundaryOpAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// Modifications:
//
// ****************************************************************************
bool
BoundaryOpAttributes::operator != (const BoundaryOpAttributes &obj) const
{
return !(this->operator == (obj));
}
// ****************************************************************************
// Method: BoundaryOpAttributes::TypeName
//
// Purpose:
// Type name method for the BoundaryOpAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// Modifications:
//
// ****************************************************************************
const std::string
BoundaryOpAttributes::TypeName() const
{
return "BoundaryOpAttributes";
}
// ****************************************************************************
// Method: BoundaryOpAttributes::CopyAttributes
//
// Purpose:
// CopyAttributes method for the BoundaryOpAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// Modifications:
//
// ****************************************************************************
bool
BoundaryOpAttributes::CopyAttributes(const AttributeGroup *atts)
{
if(TypeName() != atts->TypeName())
return false;
// Call assignment operator.
const BoundaryOpAttributes *tmp = (const BoundaryOpAttributes *)atts;
*this = *tmp;
return true;
}
// ****************************************************************************
// Method: BoundaryOpAttributes::CreateCompatible
//
// Purpose:
// CreateCompatible method for the BoundaryOpAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// Modifications:
//
// ****************************************************************************
AttributeSubject *
BoundaryOpAttributes::CreateCompatible(const std::string &tname) const
{
AttributeSubject *retval = 0;
if(TypeName() == tname)
retval = new BoundaryOpAttributes(*this);
// Other cases could go here too.
return retval;
}
// ****************************************************************************
// Method: BoundaryOpAttributes::NewInstance
//
// Purpose:
// NewInstance method for the BoundaryOpAttributes class.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// Modifications:
//
// ****************************************************************************
AttributeSubject *
BoundaryOpAttributes::NewInstance(bool copy) const
{
AttributeSubject *retval = 0;
if(copy)
retval = new BoundaryOpAttributes(*this);
else
retval = new BoundaryOpAttributes;
return retval;
}
// ****************************************************************************
// Method: BoundaryOpAttributes::SelectAll
//
// Purpose:
// Selects all attributes.
//
// Note: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue Aug 14 10:29:40 PDT 2007
//
// Modifications:
//
// ****************************************************************************
void
BoundaryOpAttributes::SelectAll()
{
Select(0, (void *)&smoothingLevel);
}
///////////////////////////////////////////////////////////////////////////////
// Persistence methods
///////////////////////////////////////////////////////////////////////////////