com.esri.arcgis.analyst3d
Class GeometryMaterial

java.lang.Object
  extended bycom.esri.arcgis.analyst3d.GeometryMaterial
All Implemented Interfaces:
IGeometryMaterial, IPersist, IPersistStream, java.io.Serializable

public class GeometryMaterial
extends java.lang.Object
implements IGeometryMaterial, IPersistStream, IPersist

The Geometry Material component.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

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.

See Also:
Serialized Form

Constructor Summary
GeometryMaterial()
          Constructs a GeometryMaterial using ArcGIS Engine.
GeometryMaterial(java.lang.Object obj)
          Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.
 
Method Summary
 void clearTextureImage()
          Clear Texture Image file.
 void clearTransparentTextureColor()
          Clear the transparent color to the texture image.
 boolean equals(java.lang.Object o)
          Compare this object with another
 IGeometryMaterial getAsIGeometryMaterial()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IPersist getAsIPersist()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 IPersistStream getAsIPersistStream()
          Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.
 void getClassID(GUID[] pClassID)
          Supported Platforms
static java.lang.String 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)
          Supported Platforms
 void getTextureColorPalette(IArray[] ppRgbColors)
          The values of unique RGB colors in the texture image.
 java.lang.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()
          Supported Platforms
 boolean isHasTransparentTextureColor()
          Indicates if a transparent color has been assigned to the texture image.
 void load(IStream pstm)
          Supported Platforms
 void save(IStream pstm, int fClearDirty)
          Supported Platforms
 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(java.lang.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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryMaterial

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

Throws:
java.io.IOException - if there are interop problems
java.net.UnknownHostException - if there are interop problems

GeometryMaterial

public GeometryMaterial(java.lang.Object obj)
                 throws java.io.IOException
Deprecated. As of ArcGIS 9.2, replaced by normal Java casts.

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.
GeometryMaterial theGeometryMaterial = (GeometryMaterial) obj;

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

getClsid

public static java.lang.String getClsid()

getAsIGeometryMaterial

public IGeometryMaterial getAsIGeometryMaterial()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIPersistStream

public IPersistStream getAsIPersistStream()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


getAsIPersist

public IPersist getAsIPersist()
Deprecated. No replacement. The object reference can be directly used where the implemented interface is needed.


equals

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


hashCode

public int hashCode()
the hashcode for this object


setColor

public void setColor(double red,
                     double green,
                     double blue)
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IGeometryMaterial
Set color, red, green, blue is in range of 0.0 - 1.0.

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:
AutomationException - If the ArcObject component throws an exception.
java.io.IOException - If there are interop problems.

getColor

public void getColor(double[] pRed,
                     double[] pGreen,
                     double[] pBlue)
              throws java.io.IOException,
                     AutomationException
Description copied from interface: IGeometryMaterial
Get color, red, green, blue is in range of 0.0 - 1.0.

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:
java.io.IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setColorByRef

public void setColorByRef(IRgbColor ppRgbColor)
                   throws java.io.IOException,
                          AutomationException
Description copied from interface: IGeometryMaterial
The color.

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

getColor2

public IRgbColor getColor2()
                    throws java.io.IOException,
                           AutomationException
Description copied from interface: IGeometryMaterial
The color.

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

setTransparency

public void setTransparency(double pTransparency)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IGeometryMaterial
The transparency, in range of 0.0 - 1.0.

Supported Platforms

Windows, Solaris, Linux

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

getTransparency

public double getTransparency()
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IGeometryMaterial
The transparency, in range of 0.0 - 1.0.

Supported Platforms

Windows, Solaris, Linux

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

setTextureImage

public void setTextureImage(java.lang.String pFilePath)
                     throws java.io.IOException,
                            AutomationException
Description copied from interface: IGeometryMaterial
The Texture Image file.

Supported Platforms

Windows, Solaris, Linux

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

getTextureImage

public java.lang.String getTextureImage()
                                 throws java.io.IOException,
                                        AutomationException
Description copied from interface: IGeometryMaterial
The Texture Image file.

Supported Platforms

Windows, Solaris, Linux

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

clearTextureImage

public void clearTextureImage()
                       throws java.io.IOException,
                              AutomationException
Description copied from interface: IGeometryMaterial
Clear Texture Image file.

Supported Platforms

Windows, Solaris, Linux

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

setTransparentTextureColorByRef

public void setTransparentTextureColorByRef(IRgbColor ppRgbColor)
                                     throws java.io.IOException,
                                            AutomationException
Description copied from interface: IGeometryMaterial
The transparent texture color.

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

getTransparentTextureColor

public IRgbColor getTransparentTextureColor()
                                     throws java.io.IOException,
                                            AutomationException
Description copied from interface: IGeometryMaterial
The transparent texture color.

Supported Platforms

Windows, Solaris, Linux

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

isHasTransparentTextureColor

public boolean isHasTransparentTextureColor()
                                     throws java.io.IOException,
                                            AutomationException
Description copied from interface: IGeometryMaterial
Indicates if a transparent color has been assigned to the texture image.

Supported Platforms

Windows, Solaris, Linux

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

clearTransparentTextureColor

public void clearTransparentTextureColor()
                                  throws java.io.IOException,
                                         AutomationException
Description copied from interface: IGeometryMaterial
Clear the transparent color to the texture image.

Supported Platforms

Windows, Solaris, Linux

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

getTextureColorPalette

public void getTextureColorPalette(IArray[] ppRgbColors)
                            throws java.io.IOException,
                                   AutomationException
Description copied from interface: IGeometryMaterial
The values of unique RGB colors in the texture image.

Supported Platforms

Windows, Solaris, Linux

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

isDirty

public void isDirty()
             throws java.io.IOException,
                    AutomationException
Description copied from interface: IPersistStream

Supported Platforms

Windows, Solaris, Linux

Description

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

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

load

public void load(IStream pstm)
          throws java.io.IOException,
                 AutomationException
Description copied from interface: IPersistStream

Supported Platforms

Windows, Solaris, Linux

Description

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

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

save

public void save(IStream pstm,
                 int fClearDirty)
          throws java.io.IOException,
                 AutomationException
Description copied from interface: IPersistStream

Supported Platforms

Windows, Solaris, Linux

Description

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

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

getSizeMax

public void getSizeMax(_ULARGE_INTEGER[] pcbSize)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IPersistStream

Supported Platforms

Windows, Solaris, Linux

Description

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

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

getClassID

public void getClassID(GUID[] pClassID)
                throws java.io.IOException,
                       AutomationException
Description copied from interface: IPersist

Supported Platforms

Windows, Solaris, Linux

Description

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

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