public class GeodeticMeshLoader extends Object implements MeshProvider
The file format is column text file following format for each line: [latitude (deg) longitude (deg) altitude (m)].
Example:
-90.0000 0.0000 8.3726
-90.0000 2.0000 8.3726
-90.0000 4.0000 8.3726
...
Note about the convention used by loaded files: they follow the cartographic convention meaning that,
in the case of Phobos or Deimos for instance, longitudes are increasing toward West (from +X_body to -Y_body). This
convention is used by NASA and is recommended by the IAU working group (Report of the IAU Working Group on
Cartographic Coordinates and Rotational Elements: 2009):
"Thus, west longitudes (i.e., longitudes measured positively to the west) will be used when the rotation is direct,
i.e. the sign of the second term in the expression for W is positive. East longitudes (i.e., longitudes measured
positively to the east) will be used when the rotation is retrograde, i.e. the sign of the second term in the
expression for W is negative. The origin is the center of mass. Also because of tradition, the Earth, Sun, and
Moon do not conform with this definition. Their rotations are direct and longitudes run both east and west 180°,
or east 360°"
Once a body is loaded and instantiated as a FacetBodyShape
its longitudes follow the more intuitive
mathematical convention. In this case, longitudes are increasing counter-clockwise toward East
(from +X_body to +Y_body).
Constructor and Description |
---|
GeodeticMeshLoader(String modelFileName)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
Triangle[] |
getTriangles()
Returns the list of triangles of the mesh.
|
Map<Integer,Vertex> |
getVertices()
Returns the list of vertices of the mesh.
|
void |
toObjFile(String fileName)
Convert file to .obj file format.
|
public GeodeticMeshLoader(String modelFileName) throws PatriusException
modelFileName
- mesh model .tab file namePatriusException
- thrown if loading failedpublic Triangle[] getTriangles()
getTriangles
in interface MeshProvider
public void toObjFile(String fileName) throws PatriusException
fileName
- output file namePatriusException
- thrown if writing failedpublic Map<Integer,Vertex> getVertices()
getVertices
in interface MeshProvider
Copyright © 2023 CNES. All rights reserved.