Class TriMesh

    • Constructor Summary

      Constructors 
      Constructor Description
      TriMesh​(long cPtr, boolean cMemoryOwn)  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      TriMeshPtr clone()
      make a clone of this triangle mesh
      void delete()  
      static long getCPtr​(TriMesh obj)  
      long getSize()
      gets the number of triangles in the triangle array.
      Triangle getTriangle​(long idx)
      gets the triangle at index idx.
      void getTriangle​(long idx, Triangle dst)
      gets the triangle at index idx.
      void getTriangle​(long idx, Triangle_f dst)
      gets the triangle at index idx.
      TriMeshPtr getTriMesh()
      gets a trimesh representation of this geometry data.

      The trimesh that is returned is by default a copy, which means
      ownership is transfered to the caller.
      TriMeshPtr getTriMesh​(boolean forceCopy)
      gets a trimesh representation of this geometry data.

      The trimesh that is returned is by default a copy, which means
      ownership is transfered to the caller.
      double getVolume()
      calculate a volume of this triangle mesh
      boolean isConvex()
      test if this geometry data is convex
      void scale​(double scale)
      Scale all vertices in the mesh.
      void setConvexEnabled​(boolean isConvex)  
      long size()
      gets the number of triangles in the triangle array.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • TriMesh

        public TriMesh​(long cPtr,
                       boolean cMemoryOwn)
    • Method Detail

      • getCPtr

        public static long getCPtr​(TriMesh obj)
      • getTriangle

        public Triangle getTriangle​(long idx)
        gets the triangle at index idx.
        Parameters:
        idx - [in] the index of the triangle.
        Returns:
        the triangle at index idx
      • getTriangle

        public void getTriangle​(long idx,
                                Triangle dst)
        gets the triangle at index idx.
        Parameters:
        idx - [in] the index of the triangle.
        dst - [out] where to store the triangle at index idx
      • getTriangle

        public void getTriangle​(long idx,
                                Triangle_f dst)
        gets the triangle at index idx. Using Floating point presicion
        Parameters:
        idx - [in] the index of the triangle.
        dst - [out] where to store the triangle at index idx
      • getSize

        public long getSize()
        gets the number of triangles in the triangle array.
      • size

        public long size()
        gets the number of triangles in the triangle array.
      • clone

        public TriMeshPtr clone()
        make a clone of this triangle mesh
        Returns:
        clone of this trimesh
      • scale

        public void scale​(double scale)
        Scale all vertices in the mesh.
      • getTriMesh

        public TriMeshPtr getTriMesh​(boolean forceCopy)
        Description copied from class: GeometryData
        gets a trimesh representation of this geometry data.

        The trimesh that is returned is by default a copy, which means
        ownership is transfered to the caller. Specifying forceCopy to false
        will enable copy by reference and ownership is not necesarilly transfered.
        This is more efficient, though pointer is only alive as long as this
        GeometryData is alive.

        Overrides:
        getTriMesh in class GeometryData
        Returns:
        TriMesh representation of this GeometryData
      • getTriMesh

        public TriMeshPtr getTriMesh()
        Description copied from class: GeometryData
        gets a trimesh representation of this geometry data.

        The trimesh that is returned is by default a copy, which means
        ownership is transfered to the caller. Specifying forceCopy to false
        will enable copy by reference and ownership is not necesarilly transfered.
        This is more efficient, though pointer is only alive as long as this
        GeometryData is alive.

        Overrides:
        getTriMesh in class GeometryData
        Returns:
        TriMesh representation of this GeometryData
      • isConvex

        public boolean isConvex()
        Description copied from class: GeometryData
        test if this geometry data is convex
        Overrides:
        isConvex in class GeometryData
        Returns:
        true if convex
      • setConvexEnabled

        public void setConvexEnabled​(boolean isConvex)
      • getVolume

        public double getVolume()
        calculate a volume of this triangle mesh