IGeneralMultiPatchInfo Interface

Interface to get infomation of a GeneralMultiPatch.

Members

Name Description
Read-only property IdCount Get Id Count.
Read-only property IsMaterialTextured Get Is Material textured.
Read-only property MaterialColor Get material color.
Read-only property MaterialCount Get Material Count.
Read-only property MaterialCullBackface Get backface culling enabled,
Read-only property MaterialTextureBytesPerPixel Get Material texture bytes per pixel.
Read-only property MaterialTextureColumnCount Get Material texture column count.
Read-only property MaterialTexturePixelColor Get Material texture pixel color.
Read-only property MaterialTextureRowCount Get Material texture row count.
Read-only property MaterialTransparencyPercent Get transparency %, in range of 0 - 100
Read-only property MCount Get M Count.
Read-only property NormalCount Get Normal Count.
Read-only property PatchCount Get Patch Count.
Read-only property PatchM Get M for patch at vertex index.
Read-only property PatchMaterialIndex Get patch material index.
Read-only property PatchPriority Get patch priority.
Read-only property PatchTextureVertex Get Texture WKSPoint for a patch at vertex index.
Read-only property PatchTextureVertexCount Get texture vertex count for a patch.
Read-only property PatchType Get patch type.
Read-only property PatchVertex Get Point for patch at vertex index.
Read-only property PatchVertexCount Get count of vertices in patch.
Read-only property PatchVertexID Get vertex Id for a patch at vertex index.
Method QueryPatchNormal Copies the Normal for patch at specified vertex index into the input vector.
Read-only property TextureVertexCount Get Texture Vertex Count.
Read-only property VertexCount Get Vertex Count.

IGeneralMultiPatchInfo.IdCount Property

Get Id Count.

Public ReadOnly Property IdCount As Integer
public int IdCount {get;}

Description

Returns the total number of IDs defined in the MultiPatch.

IGeneralMultiPatchInfo.IsMaterialTextured Property

Get Is Material textured.

Public Function get_IsMaterialTextured ( _
    ByVal Index As Integer _
) As Boolean
public bool get_IsMaterialTextured (
    int Index
);

Description

Returns whether the Geometry Material located at the specified index has a texture image associated with it.

IGeneralMultiPatchInfo.MaterialColor Property

Get material color.

Public Function get_MaterialColor ( _
    ByVal Index As Integer _
) As Integer
public int get_MaterialColor (
    int Index
);

Description

Returns the solid fill color associated with the Geometry Material located at the specified index.

IGeneralMultiPatchInfo.MaterialCount Property

Get Material Count.

Public ReadOnly Property MaterialCount As Integer
public int MaterialCount {get;}

Description

Returns the total number of Geometry Materials in the MultiPatch. This value is identical with the IGeometryMaterialList.Count property of the list passed to IGeneralMultiPatchCreator.Init() when constructing the MultiPatch.

IGeneralMultiPatchInfo.MaterialCullBackface Property

Get backface culling enabled,.

Public Function get_MaterialCullBackface ( _
    ByVal Index As Integer _
) As Boolean
public bool get_MaterialCullBackface (
    int Index
);

Description

Returns whether backface culling is persisted as a property of the Geometry Material located at the specified index.

Remarks

Backface Culling is a property acquired through the process of importing 3D models into the MultiPatch format. It cannot currently be set programmatically.

IGeneralMultiPatchInfo.MaterialTextureBytesPerPixel Property

Get Material texture bytes per pixel.

Public Function get_MaterialTextureBytesPerPixel ( _
    ByVal Index As Integer _
) As Integer
public int get_MaterialTextureBytesPerPixel (
    int Index
);

Description

Returns the number of bytes per pixel of the texture associated with the Geometry Material located at the specified index.

Remarks

This property shows how many bands exist in a geometry material. For a geometry material, the minimum value of this property is 1 and the maximum is 4. The fourth channel is usually the alpha channel used for material pixel transparency - the 'A' in 'RGBA'.

IGeneralMultiPatchInfo.MaterialTextureColumnCount Property

Get Material texture column count.

Public Function get_MaterialTextureColumnCount ( _
    ByVal Index As Integer _
) As Integer
public int get_MaterialTextureColumnCount (
    int Index
);

Description

Returns the number of columns (width in pixels) of the texture associated with the Geometry Material located at the specified index.

IGeneralMultiPatchInfo.MaterialTexturePixelColor Property

Get Material texture pixel color.

Public Function get_MaterialTexturePixelColor ( _
    ByVal Index As Integer, _
    ByVal row As Integer, _
    ByVal column As Integer _
) As Integer
public int get_MaterialTexturePixelColor (
    int Index,
    int row,
    int column
);

Description

Returns the color (as an integer) of the pixel located at the specified row and column of the texture associated with the Geometry Material located at the specified index.

IGeneralMultiPatchInfo.MaterialTextureRowCount Property

Get Material texture row count.

Public Function get_MaterialTextureRowCount ( _
    ByVal Index As Integer _
) As Integer
public int get_MaterialTextureRowCount (
    int Index
);

Description

Returns the number of rows (height in pixels) of the texture associated with the Geometry Material located at the specified index.

IGeneralMultiPatchInfo.MaterialTransparencyPercent Property

Get transparency %, in range of 0 - 100.

Public Function get_MaterialTransparencyPercent ( _
    ByVal Index As Integer _
) As Integer
public int get_MaterialTransparencyPercent (
    int Index
);

Description

Returns the overall transparency in percent (truncated as an integer) of the Geometry Material located at the specified index.

IGeneralMultiPatchInfo.MCount Property

Get M Count.

Public ReadOnly Property MCount As Integer
public int MCount {get;}

Description

Returns the total number of Ms defined in the MultiPatch.

IGeneralMultiPatchInfo.NormalCount Property

Get Normal Count.

Public ReadOnly Property NormalCount As Integer
public int NormalCount {get;}

Description

Returns the total number of Normals defined in the MultiPatch.

IGeneralMultiPatchInfo.PatchCount Property

Get Patch Count.

Public ReadOnly Property PatchCount As Integer
public int PatchCount {get;}

Description

Returns the total number of Patches (TriangleStrip, TriangleFan, Triangles, Ring) in the MultiPatch. This value is identical with the partCount parameter passed to IGeneralMultiPatchCreator.Init() when constructing the MultiPatch.

IGeneralMultiPatchInfo.PatchM Property

Get M for patch at vertex index.

Public Function get_PatchM ( _
    ByVal patch As Integer, _
    ByVal Index As Integer _
) As Double
public double get_PatchM (
    int patch,
    int Index
);

Description

Returns as a double the M coordinate of the specified geometry vertex associated with the Patch located at the specified index.

IGeneralMultiPatchInfo.PatchMaterialIndex Property

Get patch material index.

Public Function get_PatchMaterialIndex ( _
    ByVal patch As Integer _
) As Integer
public int get_PatchMaterialIndex (
    int patch
);

Description

Returns the index of the Geometry Material associated with the Patch located at the specified index.

IGeneralMultiPatchInfo.PatchPriority Property

Get patch priority.

Public Function get_PatchPriority ( _
    ByVal patch As Integer _
) As Integer
public int get_PatchPriority (
    int patch
);

Description

Returns the Priority of the Patch located at the specified index.

Remarks

When overlapping patches are defined within the same multipatch, patch priorities can be used to explicitly specify the order in which patches should be drawn when rendered. The larger the number assigned, the higher the patch priority or precedence the patch takes when rendered.

IGeneralMultiPatchInfo.PatchTextureVertex Property

Get Texture WKSPoint for a patch at vertex index.

Public Function get_PatchTextureVertex ( _
    ByVal patch As Integer, _
    ByVal Index As Integer _
) As WKSPoint
public WKSPoint get_PatchTextureVertex (
    int patch,
    int Index
);

Description

Returns as a WKSPoint the S and T coordinates of the specified texture vertex associated with the Patch located at the specified index.

IGeneralMultiPatchInfo.PatchTextureVertexCount Property

Get texture vertex count for a patch.

Public Function get_PatchTextureVertexCount ( _
    ByVal patch As Integer _
) As Integer
public int get_PatchTextureVertexCount (
    int patch
);

Description

Returns the total number of texture vertices in the Patch located at the specified index.

Remarks

The index specified refers to the index within the list of texture vertices. This is different than the index used to specify geometry vertices.

IGeneralMultiPatchInfo.PatchType Property

Get patch type.

Public Function get_PatchType ( _
    ByVal patch As Integer _
) As esriPatchType
public esriPatchType get_PatchType (
    int patch
);

Description

Returns the esriPatchType of the Patch located at the specified index.

IGeneralMultiPatchInfo.PatchVertex Property

Get Point for patch at vertex index.

Public Function get_PatchVertex ( _
    ByVal patch As Integer, _
    ByVal Index As Integer _
) As WKSPointZ
public WKSPointZ get_PatchVertex (
    int patch,
    int Index
);

Description

Returns as a WKSPointZ the X, Y, and Z coordinates of the specified geometry vertex associated with the Patch located at the specified index.

IGeneralMultiPatchInfo.PatchVertexCount Property

Get count of vertices in patch.

Public Function get_PatchVertexCount ( _
    ByVal patch As Integer _
) As Integer
public int get_PatchVertexCount (
    int patch
);

Description

Returns the total number of geometry vertices in the Patch located at the specified index.

Remarks

The index specified refers to the index within the list of geometry vertices. This is different than the index used to specify texture vertices.

IGeneralMultiPatchInfo.PatchVertexID Property

Get vertex Id for a patch at vertex index.

Public Function get_PatchVertexID ( _
    ByVal patch As Integer, _
    ByVal Index As Integer _
) As Integer
public int get_PatchVertexID (
    int patch,
    int Index
);

Description

Returns as a double the ID coordinate of the specified geometry vertex associated with the Patch located at the specified index.

IGeneralMultiPatchInfo.QueryPatchNormal Method

Copies the Normal for patch at specified vertex index into the input vector.

Public Sub QueryPatchNormal ( _
    ByVal patch As Integer, _
    ByVal Index As Integer, _
    ByVal pNormal As IVector3D _
)
public void QueryPatchNormal (
    int patch,
    int Index,
    IVector3D pNormal
);

Description

Queries the Normal vector at the specified geometry vertex associated with the Patch located at the specified index.

Remarks

A Vector3D object must be instantiated before being passed as the normal parameter to this method.

IGeneralMultiPatchInfo.TextureVertexCount Property

Get Texture Vertex Count.

Public ReadOnly Property TextureVertexCount As Integer
public int TextureVertexCount {get;}

Description

Returns the total number of texture vertices defined in the MultiPatch.

IGeneralMultiPatchInfo.VertexCount Property

Get Vertex Count.

Public ReadOnly Property VertexCount As Integer
public int VertexCount {get;}

Description

Returns the total number of geometry vertices in the MultiPatch. This value is identical with the pointCount parameter passed to IGeneralMultiPatchCreator.Init() when constructing the MultiPatch.

Classes that implement IGeneralMultiPatchInfo

Classes Description
MultiPatch A collection of surface patches.

Remarks

Use this interface to obtain a multipatch's geometry information, including those of its geometry material, if any.

public static void MultiPatchToString(IMultiPatch multiPatch)

          {

              IGeneralMultiPatchInfo generalMultiPatchInfo = multiPatch as IGeneralMultiPatchInfo;

  

              int materialCount = generalMultiPatchInfo.MaterialCount;

              int patchCount = generalMultiPatchInfo.PatchCount;

  

              Trace.WriteLine("----------------------");

              Trace.WriteLine("High Level Description");

              Trace.WriteLine("----------------------");

              Trace.WriteLine("Material Count: " + materialCount);

              Trace.WriteLine("Patch Count: " + patchCount);

              Trace.WriteLine("   Point Count: " + generalMultiPatchInfo.VertexCount);

              Trace.WriteLine("   M Count: " + generalMultiPatchInfo.MCount);

              Trace.WriteLine("   ID Count: " + generalMultiPatchInfo.IdCount);

              Trace.WriteLine("   Normal Count: " + generalMultiPatchInfo.NormalCount);

              Trace.WriteLine("   Texture Point Count: " + generalMultiPatchInfo.TextureVertexCount);

  

              Trace.WriteLine("---------------------");

              Trace.WriteLine("Low Level Description");

              Trace.WriteLine("---------------------");

              Trace.WriteLine("Materials: ");

  

              for (int materialIndex = 0; materialIndex < materialCount; materialIndex++)

              {

                  Trace.WriteLine("   Material " + materialIndex + ": ");

                  Trace.WriteLine("       Color: " + generalMultiPatchInfo.get_MaterialColor(materialIndex));

                  Trace.WriteLine("       Texture: ");

                  Trace.WriteLine("           IsTextured: " + generalMultiPatchInfo.get_IsMaterialTextured(materialIndex));

                                                 

                  int columnCount = generalMultiPatchInfo.get_MaterialTextureColumnCount(materialIndex);

                  int rowCount = generalMultiPatchInfo.get_MaterialTextureRowCount(materialIndex);

                  int bytesPerPixel = generalMultiPatchInfo.get_MaterialTextureBytesPerPixel(materialIndex);

  

                  Trace.WriteLine("           RowCount: " + rowCount);

                  Trace.WriteLine("           ColumnCount: " + columnCount);

                  Trace.WriteLine("           BytesPerPixel: " + bytesPerPixel);

  

                  double sizeInKB = (double)rowCount * (double)columnCount * (double)bytesPerPixel * Math.Pow(10, -3);

  

                  Trace.WriteLine("           SizeInKB: " + sizeInKB);

  

                  for (int rowIndex = 0; rowIndex < rowCount; rowIndex++)

                  {

                      for (int columnIndex = 0; columnIndex < columnCount; columnIndex++)

                      {

                          Trace.WriteLine("               Pixel (" + rowIndex + ", " + columnIndex + "): ");

                          Trace.WriteLine("                   Color: " + generalMultiPatchInfo.get_MaterialTexturePixelColor(materialIndex, rowIndex, columnIndex));

                      }

                  }

  

                  Trace.WriteLine("       TransparencyPercent: " + generalMultiPatchInfo.get_MaterialTransparencyPercent(materialIndex));

                  Trace.WriteLine("       IsBackfaceCulled: " + generalMultiPatchInfo.get_MaterialCullBackface(materialIndex));

              }

  

              Trace.WriteLine("Patches: ");

  

              for (int patchIndex = 0; patchIndex < patchCount; patchIndex++)

              {

                  Trace.WriteLine("   Patch " + patchIndex + ": ");

                  Trace.WriteLine("       Type: " + generalMultiPatchInfo.get_PatchType(patchIndex));

                  Trace.WriteLine("       Priority: " + generalMultiPatchInfo.get_PatchPriority(patchIndex));

                  Trace.WriteLine("       MaterialIndex: " + generalMultiPatchInfo.get_PatchMaterialIndex(patchIndex));

  

                  int pointCount = generalMultiPatchInfo.get_PatchVertexCount(patchIndex);

  

                  Trace.WriteLine("       PointCount: " + pointCount);

  

                  for (int pointIndex = 0; pointIndex < pointCount; pointIndex++)

                  {

                      WKSPointZ point = generalMultiPatchInfo.get_PatchVertex(patchIndex, pointIndex);

  

                      Trace.WriteLine("           Point " + pointIndex + ": ");

                      Trace.WriteLine("               X: " + point.X);

                      Trace.WriteLine("               Y: " + point.Y);

                      Trace.WriteLine("               Z: " + point.Z);

  

                      double m = generalMultiPatchInfo.get_PatchM(patchIndex, pointIndex);

                      int id = generalMultiPatchInfo.get_PatchVertexID(patchIndex, pointIndex);

  

                      Trace.WriteLine("               M: " + m);

                      Trace.WriteLine("               ID: " + id);

  

                      IVector3D normalVector3D = new Vector3DClass();

                      generalMultiPatchInfo.QueryPatchNormal(patchIndex, pointIndex, normalVector3D);

  

                      Trace.WriteLine("               Normal: ");

                      Trace.WriteLine("                   XComponent: " + normalVector3D.XComponent);

                      Trace.WriteLine("                   YComponent: " + normalVector3D.YComponent);

                      Trace.WriteLine("                   ZComponent: " + normalVector3D.ZComponent);

                  }

  

                  int texturePointCount = generalMultiPatchInfo.get_PatchTextureVertexCount(patchIndex);

  

                  Trace.WriteLine("       TexturePointCount: " + texturePointCount);

                                         

                  for (int texturePointIndex = 0; texturePointIndex < texturePointCount; texturePointIndex++)

                  {

                      WKSPoint texturePoint = generalMultiPatchInfo.get_PatchTextureVertex(patchIndex, texturePointIndex);

  

                      Trace.WriteLine("           TexturePoint " + texturePointIndex + ": ");

                      Trace.WriteLine("               S: " + texturePoint.X);

                      Trace.WriteLine("               T: " + texturePoint.Y);

                  }

              }

         }

Your browser is no longer supported. Please upgrade your browser for the best experience. See our browser deprecation post for more details.