• Public
  • Public/Protected
  • All

Module ria/geometry/mesh/MeshFactory

A factory for creating 3D meshes that can be visualized using a FeaturePainter, in combination with Icon3DStyle.






  • Creates a 3D mesh, with the given parameters.

     //Create a simple triangle in the X-Y plane
     var mesh = MeshFactory.create3DMesh([0,0,0, 1,0,0, 0,1,0], [0,1,2], {});
     //In your FeaturePainter
     featurePainter.paintBody = function(geocanvas, feature, shape, layer, map, paintState) {
       //An instance of Icon3DStyle
       var icon3dstyle = {mesh: mesh};
       geocanvas.drawIcon3D(shape, icon3dstyle);


    • positions: number[]

      An array of positions containing (X,Y,Z) positions defined in a local cartesian reference. The unit of measure is assumed to be meters. You can control how the local mesh is placed in the world with Icon3DStyle. Its documentation also provides a more in depth explanation of how to place the (local) positions in the world. In short; the X-axis points north, the Y-axis points west and the Z-axis points up.

      The positions in local cartesian reference
      Local positions placed in world
      The positions in local cartesian reference Local positions placed in world

    • indices: number[]

      An array of indices connecting the various positions together as a set of triangles. Each triple of indices points to the 3 vertices of a triangle. The indices of the triangle must match the indices of the positions in the positions array.

    • Optional options: MeshCreateOptions

      An object literal containing various options to create this 3D mesh.

    Returns Mesh

    A 3D mesh that can be painted by a FeaturePainter.


  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Type alias with type parameter
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method