Hello !
I tried to create a cylinder with hexagon bottom projection as follows:
var viewer = new Cesium.CesiumWidget(‘cesiumContainer’);
var scene = viewer.scene;
var cylinderGeometry = new Cesium.CylinderGeometry({
length : 5000,
topRadius : 3000,
bottomRadius : 3000,
slices: 6,
vertexFormat : Cesium.PerInstanceColorAppearance.VERTEX_FORMAT
});
var cylinder = new Cesium.GeometryInstance({
geometry: cylinderGeometry,
modelMatrix: Cesium.Matrix4.multiplyByTranslation(
Cesium.Transforms.eastNorthUpToFixedFrame(Cesium.Cartesian3.fromDegrees(116.60777 , 40.04883),
new Cesium.Cartesian3(0.0,0.0, length/2),
new Cesium.Matrix4()
),
attributes: {
color : Cesium.ColorGeometryInstanceAttribute.fromColor( Cesium.Color.fromCssColorString(’#0070c0’))
}
});
var primitive = new Cesium.Primitive({
geometryInstances : cylinder,
appearance: new Cesium.PerInstanceColorAppearance({
closed : true,
translucent: false,
flat: false,
faceForward: false
})
});
scene.primitives.add(primitive);
``
It is hard to distinguish the bottom projection is a circle or a hexagon,
how can I add normal to a cylinderGeometry?