<ServerManagerConfiguration>
  <ProxyGroup name="camera">
    <CameraProxy name="MantaCamera" class="vtkMantaCamera"
      processes="client|dataserver|renderserver"
      base_proxygroup="camera" base_proxyname="Camera">
    </CameraProxy>
  </ProxyGroup>

  <ProxyGroup name="views">
    <MantaViewProxy name="MantaView" class="vtkPVMantaView"
        processes="client|renderserver|dataserver"
        base_proxygroup="views" base_proxyname="RenderView"
        label="Manta Rendered 3D View">

      <Documentation>
        A render view subclasses to use Manta raytracing instead of OpenGL
        rasterization for rendering.
      </Documentation>

     <SubProxy>
       <Proxy name="ActiveCamera" proxyname="MantaCamera" proxygroup="camera"
              override="1">
       </Proxy>
       <ExposedProperties>
         <Property name="CameraPositionInfo" panel_visibility="never"/>
         <Property name="CameraPosition" panel_visibility="never"/>
         <Property name="CameraFocalPointInfo" panel_visibility="never"/>
         <Property name="CameraFocalPoint" panel_visibility="never"/>
         <Property name="CameraViewUpInfo" panel_visibility="never"/>
         <Property name="CameraViewUp" panel_visibility="never"/>
         <Property name="CameraViewAngle" panel_visibility="never"/>
         <Property name="CameraParallelScale" panel_visibility="never"/>
         <Property name="CameraParallelScaleInfo" panel_visibility="never"/>
         <Property name="EyeAngle" panel_visibility="never"/>
         <Property name="EyeTransformMatrix" />
         <Property name="ModelTransformMatrix" />
       </ExposedProperties>
     </SubProxy>

      <DoubleVectorProperty name="Background Up"
        command="SetBackgroundUp"
        immediate_update="1"
        number_of_elements="3"
        panel_visibility="default"
        default_values="0 1 0">
        <Documentation>
          The up vector for gradient and texture backgrounds.
        </Documentation>
      </DoubleVectorProperty>

      <DoubleVectorProperty name="Background Right"
        command="SetBackgroundRight"
        immediate_update="1"
        number_of_elements="3"
        panel_visibility="default"
        default_values="1 0 0">
        <Documentation>
          The right vector for texture (environment map) background.
        </Documentation>
      </DoubleVectorProperty>

      <IntVectorProperty name="Threads"
        command="SetThreads"
        immediate_update="1"
        number_of_elements="1"
        panel_visibility="default"
        default_values="1">
        <IntRangeDomain name="range" min="1" />
        <Documentation>
          Controls number of render threads.
        </Documentation>
      </IntVectorProperty>

      <IntVectorProperty name="EnableShadows"
        command="SetEnableShadows"
        immediate_update="1"
        number_of_elements="1"
        panel_visibility="default"
        default_values="0">
        <BooleanDomain name="bool" />
        <Documentation>
          Turns on shadow.
        </Documentation>
      </IntVectorProperty>

      <IntVectorProperty name="Samples"
        command="SetSamples"
        immediate_update="1"
        number_of_elements="1"
        panel_visibility="default"
        default_values="1">
        <IntRangeDomain name="range" min="1" />
        <Documentation>
          Controls multisampling.
        </Documentation>
      </IntVectorProperty>

      <IntVectorProperty name="MaxDepth"
        command="SetMaxDepth"
        immediate_update="1"
        number_of_elements="1"
        panel_visibility="advanced"
        default_values="10">
        <IntRangeDomain name="range" min="1" />
        <Documentation>
          Controls maximum number of ray bounces.
        </Documentation>
      </IntVectorProperty>

      <ProxyProperty name="CurrentLight"
                     command="SetCurrentLight"
                     panel_widget="proxy_editor" >
        <ProxyListDomain name="proxy_list">
          <Proxy group="extra_lights" name="MantaLight" />
        </ProxyListDomain>
        <Hints>
          <ProxyEditorPropertyWidget />
        </Hints>
      </ProxyProperty>

      <PropertyGroup label="hidden stuff"
                     panel_widget="sir_not_appearing_in_this_film"
                     panel_visibility="never">
        <Property name="CenterAxesVisibility"/>
        <Property name="AxesGrid"/>
        <Property name="UseLight"/>
        <!-- Key Light -->
        <Property name="KeyLightWarmth"/>
        <Property name="KeyLightIntensity"/>
        <Property name="KeyLightElevation"/>
        <Property name="KeyLightAzimuth"/>
        <!-- Fill Light -->
        <Property name="FillLightWarmth"/>
        <Property name="FillLightK:F Ratio"/>
        <Property name="FillLightElevation"/>
        <Property name="FillLightAzimuth"/>
        <!-- Back Light -->
        <Property name="BackLightWarmth"/>
        <Property name="BackLightK:B Ratio"/>
        <Property name="BackLightElevation"/>
        <Property name="BackLightAzimuth"/>
        <!-- Head Light -->
        <Property name="HeadLightWarmth"/>
        <Property name="HeadLightK:H Ratio"/>
        <Property name="MaintainLuminance"/>
        <!-- Light -->
        <Property name="LightSwitch"/>
        <Property name="LightAmbientColor"/>
        <Property name="LightSpecularColor"/>
        <Property name="LightDiffuseColor"/>
        <Property name="LightIntensity"/>
        <Property name="LightType"/>
      </PropertyGroup>

      <PropertyGroup label="Manta Lights"
                     panel_widget="extra_lights"
                     panel_visibility="default">
        <Property name="CurrentLight" />
      </PropertyGroup>

      <PropertyGroup label="Manta Background"
                     panel_visibility="default">
        <Property name="Background Up" />
        <Property name="Background Right" />
      </PropertyGroup>

      <PropertyGroup label="Manta Engine"
                     panel_visibility="default">
        <Property name="Threads" />
        <Property name="EnableShadows" />
        <Property name="Samples" />
        <Property name="MaxDepth" />
      </PropertyGroup>

    </MantaViewProxy>

  </ProxyGroup>

  <ProxyGroup name="extra_lights" label="Lights">
    <Proxy name="MantaLight" class="vtkMantaLight"
      processes="client|dataserver|renderserver">

      <IntVectorProperty command="GetLightType"
                         default_values="1"
                         information_only="1"
                         number_of_elements="1"
                         name="LightTypeInfo">
        <SimpleIntInformationHelper /> -->
      </IntVectorProperty>
      <IntVectorProperty name="LightType"
        command="SetLightType"
        number_of_elements="1"
        panel_visibility="default"
        default_values="1"
        information_property="LightTypeInfo">
        <EnumerationDomain name="enum">
          <Entry text="HEADLIGHT"
                 value="1" />
          <Entry text="CAMERA"
                 value="2" />
          <Entry text="SCENE"
                 value="3" />
        </EnumerationDomain>
        <Documentation>
        Whether this light is attached the the eye, relative to the eye or fixed in world space.
        </Documentation>
      </IntVectorProperty>

      <IntVectorProperty command="GetSwitch"
                         default_values="1"
                         information_only="1"
                         name="LightSwitchInfo"
                         number_of_elements="1">
        <SimpleDoubleInformationHelper />
      </IntVectorProperty>
      <IntVectorProperty command="SetSwitch"
                         default_values="1"
                         information_property="LightSwitchInfo"
                         name="LightSwitch"
                         number_of_elements="1">
        <BooleanDomain name="bool" />
        <Documentation>
        Turn light on or off.
        </Documentation>
      </IntVectorProperty>

      <DoubleVectorProperty command="GetIntensity"
                            default_values="1.0"
                            information_only="1"
                            name="LightIntensityInfo"
                            number_of_elements="1">
        <SimpleDoubleInformationHelper />
      </DoubleVectorProperty>
      <DoubleVectorProperty command="SetIntensity"
                            default_values="1.0"
                            information_property="LightIntensityInfo"
                            name="LightIntensity"
                            number_of_elements="1">
        <DoubleRangeDomain max="1"
                           min="0"
                           name="range"
                           resolution="0.01" />
        <Documentation>
        Light intensity.
        </Documentation>
      </DoubleVectorProperty>

      <DoubleVectorProperty command="GetMantaPosition"
                            default_values="0 0 0"
                            information_only="1"
                            name="LightPositionInfo"
                            number_of_elements="3">
        <SimpleDoubleInformationHelper />
      </DoubleVectorProperty>
      <DoubleVectorProperty command="SetMantaPosition"
                            default_values="0 0 0"
                            information_property="LightPositionInfo"
                            name="LightPosition"
                            number_of_elements="3">
        <Documentation>
        Relative position of light for CAMERA type, Absolute for SCENE type light.
        </Documentation>
     </DoubleVectorProperty>

      <DoubleVectorProperty command="GetDiffuseColor"
                            default_values="1 1 1"
                            information_only="1"
                            name="LightColorInfo"
                            number_of_elements="3">
        <SimpleDoubleInformationHelper />
      </DoubleVectorProperty>
      <DoubleVectorProperty command="SetColor"
                            default_values="1 1 1"
                            ignore_synchronization="1"
                            information_property="LightColorInfo"
                            name="LightColor"
                            number_of_elements="3">
        <DoubleRangeDomain
            max="1 1 1"
            min="0 0 0"
            name="range" />
        <Documentation>
        RGB color of light.
        </Documentation>
      </DoubleVectorProperty>
    </Proxy>
  </ProxyGroup>

  <ProxyGroup name="representations">

    <RepresentationProxy name="MantaSurfaceRepresentation"
                         class="vtkPVMantaRepresentation"
                         processes="client|renderserver|dataserver"
                         base_proxygroup="representations"
                         base_proxyname="SurfaceRepresentation">

      <Documentation>
        A proxy that sets up manta display pipeline at vtk level.
      </Documentation>

      <IntVectorProperty name="UseDataMaterial"
        command="SetAllowDataMaterial"
        number_of_elements="1"
        default_values="1">
        <BooleanDomain name="bool" />
        <Documentation>
        Let cell array 'material', be a lookup into field arrays
        'material_id' and 'material_properties' that define
        materials of each cell.
        </Documentation>
      </IntVectorProperty>

      <StringVectorProperty name="MaterialType"
        command="SetMaterialType"
        number_of_elements="1"
        default_values="default" >
        <StringListDomain name="material">
          <String value="default"/>
          <String value="lambertian"/>
          <String value="phong"/>
          <String value="transparent"/>
          <String value="thindielectric"/>
          <String value="dielectric"/>
          <String value="metal"/>
        </StringListDomain>
        <Documentation>
        Apply the chosen Manta material to the object. This takes effect only when
        Coloring is set to Solid Color. It has no effect when color mapping by an array.
        Specific characteristics of the manta material are defined below.
        </Documentation>
      </StringVectorProperty>

      <DoubleVectorProperty name="Reflectance"
        command="SetReflectance"
        number_of_elements="1"
        default_values="0.0">
        <Documentation>
        Reflectivity fraction for Phong material.
        </Documentation>
      </DoubleVectorProperty>

      <DoubleVectorProperty name="Thickness"
        command="SetThickness"
        number_of_elements="1"
        default_values="1.0">
        <Documentation>
        Thickness of thin dielectric material.
        </Documentation>
      </DoubleVectorProperty>

      <DoubleVectorProperty name="Eta"
        command="SetEta"
        number_of_elements="1"
        default_values="1.52">
        <Documentation>
        Refractive index of thin dielectric material.
        </Documentation>
      </DoubleVectorProperty>

      <DoubleVectorProperty name="N"
        command="SetN"
        number_of_elements="1"
        default_values="1.0">
        <Documentation>
        Outside refractive index for dielectric material.
        </Documentation>
      </DoubleVectorProperty>

      <DoubleVectorProperty name="Nt"
        command="SetNt"
        number_of_elements="1"
        default_values="1.2">
        <Documentation>
        Inside refractive index of dielectric material.
        </Documentation>
      </DoubleVectorProperty>

    </RepresentationProxy>

    <PVRepresentationProxy name="MantaGeometryRepresentation"
                           class="vtkPVCompositeRepresentation"
                           processes="client|renderserver|dataserver">


      <!--
      This is all a copy of representations/GeometryRepresentation (and its parent).
      All I do differently is instantiate the above manta surface representation.
      The hack is necessary since xml overrides didn't work
      (shared properties I think), and because at the C++
      level it is too late to change them by the time the subclass is created.

      I also use this now to hide properties from the GUI that have not affect
      on manta.
      -->

      <Documentation>
        Top level representation for objects shown in a manta view.
      </Documentation>

      <IntVectorProperty command="SetVisibility"
                         default_values="1"
                         name="Visibility"
                         number_of_elements="1"
                         panel_visibility="never">
        <BooleanDomain name="bool" />
        <Documentation>Set the visibility for this
        representation.</Documentation>
      </IntVectorProperty>
      <IntVectorProperty command="SetForceUseCache"
                         default_values="0"
                         is_internal="1"
                         name="ForceUseCache"
                         number_of_elements="1">
        <BooleanDomain name="bool" />
        <Documentation>Typically UseCache and CacheKey are updated by the View
        and representations cache based on what the view tells it. However in
        some cases we may want to force a representation to cache irrespective
        of the view (e.g. comparative views). In which case these ivars can up
        set. If ForcedCacheKey is true, it overrides UseCache and CacheKey.
        Instead, ForcedCacheKey is used.</Documentation>
      </IntVectorProperty>
      <DoubleVectorProperty command="SetForcedCacheKey"
                            default_values="none"
                            is_internal="1"
                            name="ForcedCacheKey"
                            number_of_elements="1">
        <DoubleRangeDomain name="range" />
        <Documentation>Typically UseCache and CacheKey are updated by the View
        and representations cache based on what the view tells it. However in
        some cases we may want to force a representation to cache irrespective
        of the view (e.g. comparative views). In which case these ivars can up
        set. If ForcedCacheKey is true, it overrides UseCache and CacheKey.
        Instead, ForcedCacheKey is used.</Documentation>
      </DoubleVectorProperty>
      <IntVectorProperty command="SetSelectionVisibility"
                         default_values="1"
                         name="SelectionVisibility"
                         number_of_elements="1"
                         panel_visibility="never">
        <BooleanDomain name="bool" />
        <Documentation>Set the visibility for the selection, if
        any.</Documentation>
      </IntVectorProperty>
      <RepresentationType subproxy="SurfaceRepresentation"
                          subtype="Points"
                          text="Points" />
      <RepresentationType subproxy="SurfaceRepresentation"
                          subtype="Wireframe"
                          text="Wireframe" />
      <RepresentationType subproxy="SurfaceRepresentation"
                          subtype="Surface"
                          text="Surface" />
      <RepresentationType subproxy="SurfaceRepresentation"
                          subtype="Surface With Edges"
                          text="Surface With Edges" />
      <StringVectorProperty command="GetRepresentationTypes"
                            information_only="1"
                            name="RepresentationTypesInfo"
                            si_class="vtkSIDataArrayProperty">
        <Documentation>Property that lists the available representation types.
        This is used by the domain for "Representation" to setup the list of
        types available correctly.</Documentation>
      </StringVectorProperty>
      <StringVectorProperty command="SetActiveRepresentation"
                            default_values="Surface"
                            name="Representation"
                            number_of_elements="1"
                            panel_visibility="default"
                            panel_widget="display_representation_selector" >
        <Documentation>Choose the type for the representation.</Documentation>
        <RepresentationTypeDomain name="list">
          <RequiredProperties>
            <Property function="StringList"
                      name="RepresentationTypesInfo" />
            <Property function="Input"
                      name="Input" />
          </RequiredProperties>
        </RepresentationTypeDomain>
      </StringVectorProperty>
      <StringVectorProperty command="SetCellFieldDataArrayName"
                            default_values="vtkOriginalCellIds"
                            name="SelectionCellFieldDataArrayName"
                            number_of_elements="1"
                            panel_visibility="never">
        <ArrayListDomain input_domain_name="input_array_cell"
                         name="array_list">
          <RequiredProperties>
            <Property function="Input" name="Input" />
          </RequiredProperties>
        </ArrayListDomain>
      </StringVectorProperty>
      <StringVectorProperty command="SetPointFieldDataArrayName"
                            default_values="vtkOriginalPointIds"
                            name="SelectionPointFieldDataArrayName"
                            number_of_elements="1"
                            panel_visibility="never">
        <ArrayListDomain input_domain_name="input_array_point"
                         name="array_list">
          <RequiredProperties>
            <Property function="Input" name="Input" />
          </RequiredProperties>
        </ArrayListDomain>
      </StringVectorProperty>
      <SubProxy>
        <Proxy name="SurfaceRepresentation"
               proxygroup="representations"
               proxyname="MantaSurfaceRepresentation"> <!-- this is the only thing different -->
        </Proxy>
        <ExposedProperties>
          <PropertyGroup panel_visibility="default"
                         panel_widget="ColorEditor"
                         label="Coloring" >
            <Property name="Ambient" />
            <Property name="AmbientColor" />
            <Property name="ColorArrayName" />
            <Property name="Diffuse" />
            <Property name="DiffuseColor" />
            <Property name="LookupTable" />
          </PropertyGroup>

          <PropertyGroup label="Scalar Coloring">
            <Property name="MapScalars"
                      panel_visibility="advanced" />
            <Property name="InterpolateScalarsBeforeMapping"
                      panel_visibility="advanced" />
          </PropertyGroup>

          <PropertyGroup label="Styling">
            <Property name="Opacity"
                      panel_visibility="default" />
            <Property name="PointSize"
                      panel_visibility="advanced"
                      panel_visibility_default_for_representation="points" />
            <Property name="LineWidth"
                      panel_visibility="advanced"
                      panel_visibility_default_for_representation="wireframe" />
          </PropertyGroup>

          <PropertyGroup label="Lighting">
            <Property name="Interpolation"
                      panel_visibility="advanced" />
            <Property name="Specular"
                      panel_visibility="default" />
            <Property name="SpecularColor"
                      panel_widget="color_selector"
                      panel_visibility="advanced" />
            <Property name="SpecularPower"
                      panel_visibility="advanced" />
          </PropertyGroup>

          <PropertyGroup label="Edge Styling">
            <Property name="EdgeColor"
                      panel_widget="color_selector"
                      panel_visibility="never"
                      panel_visibility_default_for_representation="Surface With Edges" />
          </PropertyGroup>

          <PropertyGroup label="Backface Styling">
            <Property name="BackfaceRepresentation"
                      panel_visibility="never" />
            <Property name="BackfaceAmbientColor"
                      panel_widget="color_selector"
                      panel_visibility="never" />
            <Property name="BackfaceDiffuseColor"
                      panel_widget="color_selector"
                      panel_visibility="never" />
            <Property name="BackfaceOpacity"
                      panel_visibility="never" />
          </PropertyGroup>

          <PropertyGroup label="Transforming">
            <Property name="Position"
                      panel_visibility="advanced" />
            <Property name="Scale"
                      panel_visibility="advanced" />
            <Property name="Orientation"
                      panel_visibility="advanced" />
            <Property name="Origin"
                      panel_visibility="advanced" />
          </PropertyGroup>

          <PropertyGroup label="Miscellaneous">
            <Property name="Pickable"
                      panel_visibility="never" />
            <Property name="StaticMode"
                      panel_visibility="never" />
            <Property name="SuppressLOD"
                      panel_visibility="never" />
            <Property name="Texture"
                      panel_visibility="advanced" />
            <Property name="UserTransform"
                      panel_visibility="never" />
            <Property name="NonlinearSubdivisionLevel"
                      panel_visibility="never" />
            <Property name="BlockVisibility"
                      panel_visibility="never" />
            <Property name="BlockColor"
                      panel_visibility="never" />
            <Property name="BlockOpacity"
                      panel_visibility="never" />
          </PropertyGroup>
          <PropertyGroup label="Manta Materials">
            <!-- manta specific properties -->
            <Property name="UseDataMaterial" />
            <Property name="MaterialType" />
            <Property name="Reflectance" />
            <Property name="Thickness" />
            <Property name="Eta" />
            <Property name="N" />
            <Property name="Nt" />
          </PropertyGroup>
        </ExposedProperties>
      </SubProxy>
      <SubProxy>
        <Proxy name="SelectionRepresentation"
               proxygroup="representations"
               proxyname="SelectionRepresentation" />
        <ShareProperties subproxy="SurfaceRepresentation">
          <Exception name="Input" />
          <Exception name="Visibility" />
          <Exception name="Representation" />
          <Exception name="Color" />
          <Exception name="LineWidth" />
          <Exception name="Opacity" />
          <Exception name="PointSize" />
        </ShareProperties>
        <ExposedProperties>
          <Property exposed_name="SelectionColor" name="Color" panel_visibility="never" />
          <Property exposed_name="SelectionOpacity" name="Opacity" panel_visibility="never" />
          <Property exposed_name="SelectionUseOutline" name="UseOutline" panel_visibility="never" />
          <Property exposed_name="SelectionRepresentation" name="Representation" panel_visibility="never" />
          <Property exposed_name="SelectionPointSize" name="PointSize" panel_visibility="never" />
          <Property exposed_name="SelectionLineWidth" name="LineWidth" panel_visibility="never" />
          <Property exposed_name="SelectionCellLabelVisibility" name="CellLabelVisibility" panel_visibility="never"/>
          <PropertyGroup label="Cell Label Font" panel_visibility="never" panel_widget="FontEditor">
            <Property exposed_name="SelectionCellLabelBold" name="CellLabelBold" function="Bold"/>
            <Property exposed_name="SelectionCellLabelColor" name="CellLabelColor" function="Color"/>
            <Property exposed_name="SelectionCellLabelFontFamily" name="CellLabelFontFamily" function="Family"/>
            <Property exposed_name="SelectionCellLabelFontSize" name="CellLabelFontSize" function="Size"/>
            <Property exposed_name="SelectionCellLabelFormat" name="CellLabelFormat" />
            <Property exposed_name="SelectionCellLabelItalic" name="CellLabelItalic" function="Italics"/>
            <Property exposed_name="SelectionCellLabelJustification" name="CellLabelJustification" />
            <Property exposed_name="SelectionCellLabelOpacity" name="CellLabelOpacity" function="Opacity"/>
            <Property exposed_name="SelectionCellLabelShadow" name="CellLabelShadow" function="Shadow"/>
          </PropertyGroup>
          <Property exposed_name="SelectionPointLabelVisibility" name="PointLabelVisibility" panel_visibility="never"/>
          <PropertyGroup label="Point Label Font" panel_visibility="never" panel_widget="FontEditor">
            <Property exposed_name="SelectionPointLabelBold" name="PointLabelBold" function="Bold"/>
            <Property exposed_name="SelectionPointLabelColor" name="PointLabelColor" function="Color"/>
            <Property exposed_name="SelectionPointLabelFontFamily" name="PointLabelFontFamily" function="Family"/>
            <Property exposed_name="SelectionPointLabelFontSize" name="PointLabelFontSize" function="Size"/>
            <Property exposed_name="SelectionPointLabelFormat" name="PointLabelFormat"/>
            <Property exposed_name="SelectionPointLabelItalic" name="PointLabelItalic" function="Italics"/>
            <Property exposed_name="SelectionPointLabelJustification" name="PointLabelJustification"/>
            <Property exposed_name="SelectionPointLabelOpacity" name="PointLabelOpacity" function="Opacity"/>
            <Property exposed_name="SelectionPointLabelShadow" name="PointLabelShadow" function="Shadow"/>
          </PropertyGroup>
        </ExposedProperties>
      </SubProxy>

      <InputProperty name="Input" command="SetInputConnection">
        <DataTypeDomain name="input_type" composite_data_supported="1">
          <DataType value="vtkDataSet"/>
        </DataTypeDomain>
        <InputArrayDomain name="input_array_cell" attribute_type="cell"
          optional="1">
        </InputArrayDomain>
        <InputArrayDomain name="input_array_point" attribute_type="point"
          optional="1">
        </InputArrayDomain>
        <Documentation>
          Set the input to the representation.
        </Documentation>
      </InputProperty>
    </PVRepresentationProxy>
  </ProxyGroup>
</ServerManagerConfiguration>
