Class Model

java.lang.Object
com.agisoft.metashape.Model

public class Model extends Object
Polygonal model.
  • Field Details

    • swigCMemOwn

      protected transient boolean swigCMemOwn
  • Constructor Details

    • Model

      public Model(long cPtr, boolean cMemoryOwn)
    • Model

      public Model()
    • Model

      public Model(Model model)
  • Method Details

    • getCPtr

      public static long getCPtr(Model obj)
    • finalize

      protected void finalize()
      Overrides:
      finalize in class Object
    • delete

      public void delete()
    • cArrayUnwrap

      public static long[] cArrayUnwrap(Model[] arrayWrapper)
    • cArrayWrap

      public static Model[] cArrayWrap(long[] cArray, boolean cMemoryOwn)
    • getKey

      public int getKey()
      Model identifier.
    • getChunk

      public Chunk getChunk()
      Chunk container, may be null.
    • setLabel

      public void setLabel(String label)
      Model label.
    • getLabel

      public String getLabel()
      Model label.
    • getTextures

      public Model.Texture[] getTextures()
      List of textures in the model.
    • getActiveTexture

      public Model.Texture getActiveTexture(Model.TextureType type)
      Active texture of a given type, may be null.
    • setMesh

      public void setMesh(Model.Mesh mesh)
      Model mesh, may be null.
    • getMesh

      public Model.Mesh getMesh()
      Model mesh, may be null.
    • getPath

      public String getPath()
      Path to model file.
    • setMeta

      public void setMeta(MetaData meta)
      Model meta data.
    • getMeta

      public MetaData getMeta()
      Model meta data.
    • getFaceCount

      public int getFaceCount()
      Face count.
    • getVertexCount

      public int getVertexCount()
      Vertex count;
    • hasUV

      public boolean hasUV()
      Returns true if model has UV coordinates.
    • hasVertexColors

      public boolean hasVertexColors()
      Returns true if model has vertex colors.
    • hasVertexConfidence

      public boolean hasVertexConfidence()
      Returns true if model has confidence values.
    • pickPoint

      public Vector3d pickPoint(Vector3d origin, Vector3d target)
      Returns ray intersection with the model surface.
      Parameters:
      origin - Ray origin.
      target - Point on the ray.
      Returns:
      Coordinates of the intersection point, may be null.
    • renderPreview

      public Image renderPreview(long width, long height, Matrix4x4d transform, Progress progress)
      Generate model preview image.
      Parameters:
      width - Preview image width.
      height - Preview image height.
      transform - 4x4 viewpoint transformation matrix.
      Returns:
      Preview image.