Hi
I was going through the tutorial on the link. When I came to the example of rewriting the initial code using geometries and appearances I got a bit confused. Why do we call vertexFormat under geometry as shown below ? As far as I know a Vertex is just an intersection of two lines. Could you please explain why is VertexFormat essential for plotting the rectangle on the Globe ?
[Code excerpt from the link where I am confused]
var viewer = new Cesium.Viewer('cesiumContainer');
var scene = viewer.scene;
// original code
// scene.primitives.add(new Cesium.RectanglePrimitive({
// rectangle : Cesium.Rectangle.fromDegrees(-100.0, 20.0, -90.0, 30.0),
// material : Cesium.Material.fromType('Dot')
// }));
var instance = new Cesium.GeometryInstance({
geometry : new Cesium.RectangleGeometry({
rectangle : Cesium.Rectangle.fromDegrees(-100.0, 20.0, -90.0, 30.0),
**->** vertexFormat : Cesium.EllipsoidSurfaceAppearance.VERTEX_FORMAT
})
});
scene.primitives.add(new Cesium.Primitive({
geometryInstances : instance,
appearance : new Cesium.EllipsoidSurfaceAppearance({
material : Cesium.Material.fromType('Dot')
})
}));