com.esri.arcgis.analyst3d
Class GeometryMaterial

java.lang.Object
  extended by com.esri.arcgis.analyst3d.GeometryMaterial
All Implemented Interfaces:
IGeometryMaterial, com.esri.arcgis.interop.RemoteObjRef, IPersist, IPersistStream, Externalizable, Serializable

public class GeometryMaterial
extends Object
implements com.esri.arcgis.interop.RemoteObjRef, IGeometryMaterial, IPersistStream, IPersist, Externalizable

The Geometry Material component.

Remarks

Once a GeometryMaterial is defined (thru IGeometryMaterial interface), it can be used as a property of TextureLineSymbol or TextureFillSymbol. Alternatively, it can be added to the GeometryMaterialList to be used by the Init method of GeneralMultipatchCreator to create a textured multipatch. Note that a valid GeometryMaterial does not require a texture image. It is the developer's responsibility to make sure that a valid texture image exists before the intended use.

Note on transparency issues:

We need to differentiate Transparency, Transparent Color, and Alpha Channel three different issues.

Transparency refers to a transparent value that is applied to all pixels of an image, ranging from 0% to 100% with 0% meaning opaque and 100% transparent. When you set a transparency value to an image (or a GeometryMaterial made from that image), the value is applied blankly to all its pixels (this is called 'blending' in computer graphics term).

Transparent color specifies one particular color, with a certain RGB value, to be set to 100% transparent (i.e. invisible). When you set a transparent color, the pixels with that color value becomes completely transparent.

The alpha channel is often the fourth channel in a four-band color image. A pixel's alpha value is used as a transparency measure only applicable to that pixel. So an image (or a GeometryMaterial made from that image) with an alpha channel may have various degrees of transparency among all its pixels. If an alpha channel is present with the original image, it will be utilized automatically when the GeometryMaterial is created from that image.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

See Also:
Serialized Form

Constructor Summary
GeometryMaterial()
          Constructs a GeometryMaterial using ArcGIS Engine.
GeometryMaterial(Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GeometryMaterial theGeometryMaterial = (GeometryMaterial) obj;
 
Method Summary
 void clearTextureImage()
          Clear Texture Image file.
 void clearTransparentTextureColor()
          Clear the transparent color to the texture image.
 boolean equals(Object o)
          Compare this object with another
 void getClassID(GUID[] pClassID)
          getClassID
static String getClsid()
          getClsid.
 void getColor(double[] pRed, double[] pGreen, double[] pBlue)
          Get color, red, green, blue is in range of 0.0 - 1.0.
 IRgbColor getColor2()
          The color.
 void getSizeMax(_ULARGE_INTEGER[] pcbSize)
          getSizeMax
 void getTextureColorPalette(IArray[] ppRgbColors)
          The values of unique RGB colors in the texture image.
 String getTextureImage()
          The Texture Image file.
 double getTransparency()
          The transparency, in range of 0.0 - 1.0.
 IRgbColor getTransparentTextureColor()
          The transparent texture color.
 int hashCode()
          the hashcode for this object
 void isDirty()
          isDirty
 boolean isHasTransparentTextureColor()
          Indicates if a transparent color has been assigned to the texture image.
 void load(IStream pstm)
          load
 void readExternal(ObjectInput in)
           
 void save(IStream pstm, int fClearDirty)
          save
 void setColor(double red, double green, double blue)
          Set color, red, green, blue is in range of 0.0 - 1.0.
 void setColorByRef(IRgbColor ppRgbColor)
          The color.
 void setTextureImage(String pFilePath)
          The Texture Image file.
 void setTransparency(double pTransparency)
          The transparency, in range of 0.0 - 1.0.
 void setTransparentTextureColorByRef(IRgbColor ppRgbColor)
          The transparent texture color.
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.esri.arcgis.interop.RemoteObjRef
getJintegraDispatch, release
 

Constructor Detail

GeometryMaterial

public GeometryMaterial()
                 throws IOException,
                        UnknownHostException
Constructs a GeometryMaterial using ArcGIS Engine.

Throws:
IOException - if there are interop problems
UnknownHostException - if there are interop problems

GeometryMaterial

public GeometryMaterial(Object obj)
                 throws IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
GeometryMaterial theGeometryMaterial = (GeometryMaterial) obj;

Construct a GeometryMaterial using a reference to such an object returned from ArcGIS Engine or Server. This is semantically equivalent to casting obj to GeometryMaterial.

Parameters:
obj - an object returned from ArcGIS Engine or Server
Throws:
IOException - if there are interop problems
Method Detail

getClsid

public static String getClsid()
getClsid.


equals

public boolean equals(Object o)
Compare this object with another

Overrides:
equals in class Object

hashCode

public int hashCode()
the hashcode for this object

Overrides:
hashCode in class Object

setColor

public void setColor(double red,
                     double green,
                     double blue)
              throws IOException,
                     AutomationException
Set color, red, green, blue is in range of 0.0 - 1.0.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setColor in interface IGeometryMaterial
Parameters:
red - The red (in)
green - The green (in)
blue - The blue (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getColor

public void getColor(double[] pRed,
                     double[] pGreen,
                     double[] pBlue)
              throws IOException,
                     AutomationException
Get color, red, green, blue is in range of 0.0 - 1.0.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getColor in interface IGeometryMaterial
Parameters:
pRed - The pRed (out: use single element array)
pGreen - The pGreen (out: use single element array)
pBlue - The pBlue (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setColorByRef

public void setColorByRef(IRgbColor ppRgbColor)
                   throws IOException,
                          AutomationException
The color.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Specified by:
setColorByRef in interface IGeometryMaterial
Parameters:
ppRgbColor - A reference to a com.esri.arcgis.display.IRgbColor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getColor2

public IRgbColor getColor2()
                    throws IOException,
                           AutomationException
The color.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Specified by:
getColor2 in interface IGeometryMaterial
Returns:
A reference to a com.esri.arcgis.display.IRgbColor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTransparency

public void setTransparency(double pTransparency)
                     throws IOException,
                            AutomationException
The transparency, in range of 0.0 - 1.0.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setTransparency in interface IGeometryMaterial
Parameters:
pTransparency - The pTransparency (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTransparency

public double getTransparency()
                       throws IOException,
                              AutomationException
The transparency, in range of 0.0 - 1.0.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTransparency in interface IGeometryMaterial
Returns:
The pTransparency
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTextureImage

public void setTextureImage(String pFilePath)
                     throws IOException,
                            AutomationException
The Texture Image file.

Remarks

The following texture image formats are supported:

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Specified by:
setTextureImage in interface IGeometryMaterial
Parameters:
pFilePath - The pFilePath (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTextureImage

public String getTextureImage()
                       throws IOException,
                              AutomationException
The Texture Image file.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTextureImage in interface IGeometryMaterial
Returns:
The pFilePath
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearTextureImage

public void clearTextureImage()
                       throws IOException,
                              AutomationException
Clear Texture Image file.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Specified by:
clearTextureImage in interface IGeometryMaterial
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTransparentTextureColorByRef

public void setTransparentTextureColorByRef(IRgbColor ppRgbColor)
                                     throws IOException,
                                            AutomationException
The transparent texture color.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Specified by:
setTransparentTextureColorByRef in interface IGeometryMaterial
Parameters:
ppRgbColor - A reference to a com.esri.arcgis.display.IRgbColor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTransparentTextureColor

public IRgbColor getTransparentTextureColor()
                                     throws IOException,
                                            AutomationException
The transparent texture color.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getTransparentTextureColor in interface IGeometryMaterial
Returns:
A reference to a com.esri.arcgis.display.IRgbColor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isHasTransparentTextureColor

public boolean isHasTransparentTextureColor()
                                     throws IOException,
                                            AutomationException
Indicates if a transparent color has been assigned to the texture image.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isHasTransparentTextureColor in interface IGeometryMaterial
Returns:
The pHasTransparentColor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

clearTransparentTextureColor

public void clearTransparentTextureColor()
                                  throws IOException,
                                         AutomationException
Clear the transparent color to the texture image.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Supported Platforms

Windows, Solaris, Linux

Specified by:
clearTransparentTextureColor in interface IGeometryMaterial
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTextureColorPalette

public void getTextureColorPalette(IArray[] ppRgbColors)
                            throws IOException,
                                   AutomationException
The values of unique RGB colors in the texture image.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server. Requires 3D Analyst Extension.

Specified by:
getTextureColorPalette in interface IGeometryMaterial
Parameters:
ppRgbColors - A reference to a com.esri.arcgis.system.IArray (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

isDirty

public void isDirty()
             throws IOException,
                    AutomationException
isDirty

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
isDirty in interface IPersistStream
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

load

public void load(IStream pstm)
          throws IOException,
                 AutomationException
load

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
load in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

save

public void save(IStream pstm,
                 int fClearDirty)
          throws IOException,
                 AutomationException
save

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
save in interface IPersistStream
Parameters:
pstm - A reference to a com.esri.arcgis.system.IStream (in)
fClearDirty - The fClearDirty (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws IOException,
                       AutomationException
getSizeMax

Description

IPersistStream is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getSizeMax in interface IPersistStream
Parameters:
pcbSize - A Structure: com.esri.arcgis.system._ULARGE_INTEGER (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getClassID

public void getClassID(GUID[] pClassID)
                throws IOException,
                       AutomationException
getClassID

Description

IPersist is a Microsoft interface. Please refer to MSDN for information about this interface.

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Supported Platforms

Windows, Solaris, Linux

Specified by:
getClassID in interface IPersist
Parameters:
pClassID - A Structure: com.esri.arcgis.support.ms.stdole.GUID (out: use single element array)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Throws:
IOException

readExternal

public void readExternal(ObjectInput in)
                  throws IOException,
                         ClassNotFoundException
Specified by:
readExternal in interface Externalizable
Throws:
IOException
ClassNotFoundException