Commit 654fef4f authored by hrchilds's avatar hrchilds

Update from September 6, 2004

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@317 18c085ea-50e0-402c-830e-de6fd14e8384
parent 008dfbab
......@@ -151,6 +151,9 @@
# Hank Childs, Thu May 6 09:59:30 PDT 2004
# Make the displace operator be required.
#
# Jeremy Meredith, Fri Sep 3 09:47:23 PDT 2004
# Added project operator.
#
##############################################################################
@SET_MAKE@
......@@ -162,8 +165,8 @@ OPTIONAL=Context ConnCompReduce Decimate ExternalSurface \
MetricThreshold RemoveCells Revolve SiloDump SurfCompPrep Tube
REQUIRED=Box Clip Cone Cylinder Displace IndexSelect InverseGhostZone \
Isosurface Isovolume Lineout OnionPeel Reflect Slice SphereSlice \
ThreeSlice Threshold Transform
Isosurface Isovolume Lineout OnionPeel Project Reflect Slice \
SphereSlice ThreeSlice Threshold Transform
SUBDIRS=$(REQUIRED) @OPERATOR_OPTIONAL_DIRS@
ALLSUBDIRS=$(REQUIRED) $(OPTIONAL)
......
<?xml version="1.0"?>
<Plugin name="Project" type="operator" label="Project" version="1.0" enabled="true" iconFile="Project.xpm">
<Attribute name="ProjectAttributes" purpose="Project data from three to two dimensions" persistent="false" exportAPI="" exportInclude="">
<Enum name="ProjectionType">
XYCartesian
ZRCylindrical
</Enum>
<Field name="projectionType" label="projectionType" type="enum" subtype="ProjectionType">
XYCartesian
</Field>
</Attribute>
</Plugin>
/* XPM */
static const char * Project_xpm[] = {
"32 32 76 1",
" c None",
". c #4C4CFF",
"+ c #6565FF",
"@ c #3030FF",
"# c #0000FF",
"$ c #7777FF",
"% c #0000C9",
"& c #0000AA",
"* c #CFF500",
"= c #D9FE0B",
"- c #BEE100",
"; c #A0BE00",
"> c #DBFE19",
", c #FE4BD2",
"' c #FE65D8",
") c #7D9400",
"! c #00B900",
"~ c #FE2FCB",
"{ c #FE00BF",
"] c #FE77DD",
"^ c #6A7E00",
"/ c #C70096",
"( c #A9007F",
"_ c #05BF05",
": c #04BE04",
"< c #02BC02",
"[ c #01BB01",
"} c #10C910",
"| c #0EC70E",
"1 c #0DC60D",
"2 c #0BC50B",
"3 c #1AD21A",
"4 c #18D118",
"5 c #17D017",
"6 c #15CE15",
"7 c #24DC24",
"8 c #23DB23",
"9 c #21D921",
"0 c #20D820",
"a c #2EE62E",
"b c #2DE42D",
"c c #2BE32B",
"d c #2AE22A",
"e c #1ED61E",
"f c #1DD51D",
"g c #1BD41B",
"h c #0AC30A",
"i c #08C208",
"j c #07C007",
"k c #38EF38",
"l c #37EE37",
"m c #36ED36",
"n c #34EB34",
"o c #28E028",
"p c #27DF27",
"q c #25DD25",
"r c #14CD14",
"s c #12CB12",
"t c #11CA11",
"u c #43F943",
"v c #41F841",
"w c #40F640",
"x c #3EF53E",
"y c #33EA33",
"z c #31E831",
"A c #30E730",
"B c #007F00",
"C c #00AA00",
"D c #00D300",
"E c #48FF48",
"F c #63FF63",
"G c #96FF96",
"H c #3BF23B",
"I c #3AF13A",
"J c #46FC46",
"K c #000000",
" ..++ ",
" @##$$+ ",
"#####$$+ ",
"%######. ",
"&######. ",
"&%#####@ **== ",
" &%#### -;;>>= ",
" &&&% ;;;;;>>=",
" ,,'' );;;;;;*",
" !!!! ~{{]]' ^;;;;;;*",
" !!!! {{{{{]]' ^);;;;;-",
" !!!! /{{{{{{, ^);;;; ",
" !!!! ({{{{{{, ^^^) ",
" _:<[ (/{{{{{~ ",
" }|12 (/{{{{ !!!! ",
" 3456 (((/ !!!! ",
" 7890 [!!! ",
" abcd 0efg 2hij ",
" klmn dopq 6rst ",
" uvwx nyzA 0efg ",
"BCCDEEFG BCCDHIFG BCCDpqFG",
" BCDEFG BCDJFG BCDzFG ",
" BCDG BCDG BCDG ",
" BD BD BD ",
" ..++ ,,'' **== ",
" @##$$+ ~{{]]' -;;>>= ",
"#####$$+ {{{{{]]' ;;;;;>>=",
"%######. /{{{{{{, );;;;;;*",
"KK#KK#KK KK{KK{KK,KK KK KK;KK;KK",
"&%#####@ (/{{{{{~ ^);;;;;-",
" &%#### (/{{{{ ^);;;; ",
" &&&% (((/ ^^^) "};
This diff is collapsed.
#ifndef PROJECTATTRIBUTES_H
#define PROJECTATTRIBUTES_H
#include <string>
#include <AttributeSubject.h>
// ****************************************************************************
// Class: ProjectAttributes
//
// Purpose:
// Project data from three to two dimensions
//
// Notes: Autogenerated by xml2atts.
//
// Programmer: xml2atts
// Creation: Tue May 18 14:35:36 PST 2004
//
// Modifications:
//
// ****************************************************************************
class ProjectAttributes : public AttributeSubject
{
public:
enum ProjectionType
{
XYCartesian,
ZRCylindrical
};
ProjectAttributes();
ProjectAttributes(const ProjectAttributes &obj);
virtual ~ProjectAttributes();
virtual void operator = (const ProjectAttributes &obj);
virtual bool operator == (const ProjectAttributes &obj) const;
virtual bool operator != (const ProjectAttributes &obj) const;
virtual const std::string TypeName() const;
virtual bool CopyAttributes(const AttributeGroup *);
virtual AttributeSubject *CreateCompatible(const std::string &) const;
virtual AttributeSubject *NewInstance(bool) const;
// Property selection methods
virtual void SelectAll();
// Property setting methods
void SetProjectionType(ProjectionType projectionType_);
// Property getting methods
ProjectionType GetProjectionType() const;
// Enum conversion functions
static std::string ProjectionType_ToString(ProjectionType);
static bool ProjectionType_FromString(const std::string &, ProjectionType &);
protected:
static std::string ProjectionType_ToString(int);
public:
// Keyframing methods
virtual std::string GetFieldName(int index) const;
virtual AttributeGroup::FieldType GetFieldType(int index) const;
virtual std::string GetFieldTypeName(int index) const;
virtual bool FieldsEqual(int index, const AttributeGroup *rhs) const;
private:
int projectionType;
};
#endif
package llnl.visit.operators;
import llnl.visit.AttributeSubject;
import llnl.visit.CommunicationBuffer;
import llnl.visit.Plugin;
// ****************************************************************************
// Class: ProjectAttributes
//
// Purpose:
// Project data from three to two dimensions
//
// Notes: Autogenerated by xml2java.
//
// Programmer: xml2java
// Creation: Tue May 18 14:35:42 PST 2004
//
// Modifications:
//
// ****************************************************************************
public class ProjectAttributes extends AttributeSubject implements Plugin
{
// Constants
public final static int PROJECTIONTYPE_XYCARTESIAN = 0;
public final static int PROJECTIONTYPE_ZRCYLINDRICAL = 1;
public ProjectAttributes()
{
super(1);
projectionType = PROJECTIONTYPE_XYCARTESIAN;
}
public ProjectAttributes(ProjectAttributes obj)
{
super(1);
projectionType = obj.projectionType;
SelectAll();
}
public boolean equals(ProjectAttributes obj)
{
// Create the return value
return ((projectionType == obj.projectionType));
}
public String GetName() { return "Project"; }
public String GetVersion() { return "1.0"; }
// Property setting methods
public void SetProjectionType(int projectionType_)
{
projectionType = projectionType_;
Select(0);
}
// Property getting methods
public int GetProjectionType() { return projectionType; }
// Write and read methods.
public void WriteAtts(CommunicationBuffer buf)
{
if(WriteSelect(0, buf))
buf.WriteInt(projectionType);
}
public void ReadAtts(int n, CommunicationBuffer buf)
{
buf.ReadByte();
SetProjectionType(buf.ReadInt());
}
// Attributes
private int projectionType;
}
// ************************************************************************* //
// File: ProjectCommonPluginInfo.C
// ************************************************************************* //
#include <ProjectPluginInfo.h>
#include <ProjectAttributes.h>
// ****************************************************************************
// Method: ProjectCommonPluginInfo::AllocAttributes
//
// Purpose:
// Return a pointer to a newly allocated attribute subject.
//
// Returns: A pointer to the newly allocated attribute subject.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
AttributeSubject *
ProjectCommonPluginInfo::AllocAttributes()
{
return new ProjectAttributes;
}
// ****************************************************************************
// Method: ProjectCommonPluginInfo::CopyAttributes
//
// Purpose:
// Copy a Project attribute subject.
//
// Arguments:
// to The destination attribute subject.
// from The source attribute subject.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
void
ProjectCommonPluginInfo::CopyAttributes(AttributeSubject *to,
AttributeSubject *from)
{
*((ProjectAttributes *) to) = *((ProjectAttributes *) from);
}
// ************************************************************************* //
// File: ProjectEnginePluginInfo.C
// ************************************************************************* //
#include <ProjectPluginInfo.h>
#include <avtProjectFilter.h>
#if defined(__APPLE__)
#define GetEngineInfo Project_GetEngineInfo
#endif
// ****************************************************************************
// Function: GetEngineInfo
//
// Purpose:
// Return a new EnginePluginInfo for the Project operator.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
extern "C" EngineOperatorPluginInfo* GetEngineInfo()
{
return new ProjectEnginePluginInfo;
}
// ****************************************************************************
// Method: ProjectEnginePluginInfo::AllocAvtPluginFilter
//
// Purpose:
// Return a pointer to a newly allocated avtPluginFilter.
//
// Returns: A pointer to the newly allocated avtPluginFilter.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
avtPluginFilter *
ProjectEnginePluginInfo::AllocAvtPluginFilter()
{
return new avtProjectFilter;
}
// ************************************************************************* //
// File: ProjectGUIPluginInfo.C
// ************************************************************************* //
#include <ProjectPluginInfo.h>
#include <ProjectAttributes.h>
#include <QvisProjectWindow.h>
#if defined(__APPLE__)
#define GetGUIInfo Project_GetGUIInfo
#endif
// ****************************************************************************
// Function: GetGUIInfo
//
// Purpose:
// Return a new GUIPluginInfo for the Project operator.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
extern "C" GUIOperatorPluginInfo* GetGUIInfo()
{
return new ProjectGUIPluginInfo;
}
// ****************************************************************************
// Method: ProjectGUIPluginInfo::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: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
const char *
ProjectGUIPluginInfo::GetMenuName() const
{
return "Project";
}
// ****************************************************************************
// Method: ProjectGUIPluginInfo::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: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
QvisPostableWindowObserver *
ProjectGUIPluginInfo::CreatePluginWindow(int type, AttributeSubject *attr,
QvisNotepadArea *notepad)
{
return new QvisProjectWindow(type, (ProjectAttributes *)attr,
"Project operator attributes", "Project operator", notepad);
}
// ****************************************************************************
// Method: ProjectGUIPluginInfo::XPMIconData
//
// Purpose:
// Return a pointer to the icon data.
//
// Returns: A pointer to the icon data.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
#include <Project.xpm>
const char **
ProjectGUIPluginInfo::XPMIconData() const
{
return Project_xpm;
}
// ************************************************************************* //
// File: ProjectPluginInfo.C
// ************************************************************************* //
#include <ProjectPluginInfo.h>
#include <ProjectAttributes.h>
#if defined(__APPLE__)
#define GetGeneralInfo Project_GetGeneralInfo
#endif
// ****************************************************************************
// Function: GetGeneralInfo
//
// Purpose:
// Return a new GeneralPluginInfo for the Project operator.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
extern "C" GeneralOperatorPluginInfo* GetGeneralInfo()
{
return new ProjectGeneralPluginInfo;
}
// ****************************************************************************
// Method: ProjectGeneralPluginInfo::GetName
//
// Purpose:
// Return the name of the operator plugin.
//
// Returns: A pointer to the name of the operator plugin.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
char *
ProjectGeneralPluginInfo::GetName() const
{
return "Project";
}
// ****************************************************************************
// Method: ProjectGeneralPluginInfo::GetVersion
//
// Purpose:
// Return the version of the operator plugin.
//
// Returns: A pointer to the version of the operator plugin.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
char *
ProjectGeneralPluginInfo::GetVersion() const
{
return "1.0";
}
// ****************************************************************************
// Method: ProjectGeneralPluginInfo::GetID
//
// Purpose:
// Return the id of the operator plugin.
//
// Returns: A pointer to the id of the operator plugin.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
char *
ProjectGeneralPluginInfo::GetID() const
{
return "Project_1.0";
}
// ****************************************************************************
// Method: ProjectGeneralPluginInfo::EnabledByDefault
//
// Purpose:
// Return true if this plugin should be enabled by default; false otherwise.
//
// Returns: true/false
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
bool
ProjectGeneralPluginInfo::EnabledByDefault() const
{
return true;
}
// ************************************************************************* //
// File: ProjectPluginInfo.h
// ************************************************************************* //
#ifndef PROJECT_PLUGIN_INFO_H
#define PROJECT_PLUGIN_INFO_H
#include <OperatorPluginInfo.h>
#include <operator_plugin_exports.h>
class ProjectAttributes;
// ****************************************************************************
// Class: ProjectPluginInfo
//
// Purpose:
// Five classes that provide all the information about an Project operator
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// Modifications:
//
// ****************************************************************************
class ProjectGeneralPluginInfo : public virtual GeneralOperatorPluginInfo
{
public:
virtual char *GetName() const;
virtual char *GetVersion() const;
virtual char *GetID() const;
virtual bool EnabledByDefault() const;
};
class ProjectCommonPluginInfo : public virtual CommonOperatorPluginInfo, public virtual ProjectGeneralPluginInfo
{
public:
virtual AttributeSubject *AllocAttributes();
virtual void CopyAttributes(AttributeSubject *to, AttributeSubject *from);
};
class ProjectGUIPluginInfo : public virtual GUIOperatorPluginInfo, public virtual ProjectCommonPluginInfo
{
public:
virtual const char *GetMenuName() const;
virtual QvisPostableWindowObserver *CreatePluginWindow(int type,
AttributeSubject *attr, QvisNotepadArea *notepad);
virtual const char **XPMIconData() const;
};
class ProjectViewerPluginInfo : public virtual ViewerOperatorPluginInfo, public virtual ProjectCommonPluginInfo
{
public:
virtual AttributeSubject *GetClientAtts();
virtual AttributeSubject *GetDefaultAtts();
virtual void SetClientAtts(AttributeSubject *atts);
virtual void GetClientAtts(AttributeSubject *atts);
virtual void InitializeOperatorAtts(AttributeSubject *atts,
const ViewerPlot *plot,
const bool fromDefault);
virtual const char **XPMIconData() const;
static void InitializeGlobalObjects();
private:
static ProjectAttributes *defaultAtts;
static ProjectAttributes *clientAtts;
};
class ProjectEnginePluginInfo : public virtual EngineOperatorPluginInfo, public virtual ProjectCommonPluginInfo
{
public:
virtual avtPluginFilter *AllocAvtPluginFilter();
};
class ProjectScriptingPluginInfo : public virtual ScriptingOperatorPluginInfo, public virtual ProjectCommonPluginInfo
{
public:
virtual void InitializePlugin(AttributeSubject *subj, FILE *log);
virtual void *GetMethodTable(int *nMethods);
virtual bool TypesMatch(void *pyobject);
virtual void SetLogging(bool val);
virtual void SetDefaults(const AttributeSubject *atts);
};
#endif
// ************************************************************************* //
// ProjectScriptingPluginInfo.C
// ************************************************************************* //
#include <ProjectPluginInfo.h>
#include <PyProjectAttributes.h>
#if defined(__APPLE__)
#define GetScriptingInfo Project_GetScriptingInfo
#endif
// ****************************************************************************
// Function: GetScriptingInfo
//
// Purpose:
// Return a new ScriptingPluginInfo for the Project plot.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// ****************************************************************************
extern "C" ScriptingOperatorPluginInfo* GetScriptingInfo()
{
return new ProjectScriptingPluginInfo;
}
// ****************************************************************************
// Method: ProjectScriptingPluginInfo::InitializePlugin
//
// Purpose:
// Calls the initialization function for the plugin.
//
// Arguments:
// subj : A pointer to the plugin's state object.
// logFile : A pointer to the logFile to be used.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// Modifications:
//
// ****************************************************************************
void
ProjectScriptingPluginInfo::InitializePlugin(AttributeSubject *subj,
FILE *logFile)
{
PyProjectAttributes_StartUp((ProjectAttributes *)subj, logFile);
}
// ****************************************************************************
// Method: ProjectScriptingPluginInfo::GetMethodTable
//
// Purpose:
// Returns a pointer to the plugin's Python method table. These methods are
// added to the top-level visit module's methods.
//
// Arguments:
// nMethods : Returns the number of methods in the method table.
//
// Returns: A pointer to the method table.
//
// Programmer: meredith -- generated by xml2info
// Creation: Tue May 18 14:35:37 PST 2004
//
// Modifications:
//
// ****************************************************************************
void *
ProjectScriptingPluginInfo::GetMethodTable(int