show 3D object in cesium

Hi,

I want to show a 3D object 3D in Cesium using the Geometry class and an extension of Appearance class, but i have an error in primitive.js, Cesium looks for
parameters of boundingSphereCV which was defined as undefined in Geometry, do you know how to avoid this error?

Here is my code:
var instance = new Cesium.GeometryInstance({
geometry : new Cesium.Geometry({
attributes : {
position : new Cesium.GeometryAttribute({
componentDatatype : Cesium.ComponentDatatype.FLOAT,
componentsPerAttribute : 3,
values : obj.verts //not good, must have new layer to manage buffers
})
},
indices : obj.indices,
primitiveType : Cesium.PrimitiveType.TRIANGLES,
boundingSphere : Cesium.BoundingSphere.fromVertices(obj.verts),
}),
id : ‘Bati3D’
});
viewer.scene.primitives.add( new Cesium.Primitive({
geometryInstances : instance,
appearance : new Cesium.IgnB3DAppearance()
}));
Code for IgnB3DAppearance
var IgnB3DAppearance = function() {
this.material = undefined;
this.vertexShaderSource =
‘attribute vec3 position3DHigh;’ +
‘attribute vec3 position3DLow;’ +
‘attribute vec3 normal;’ +
‘varying vec3 v_positionEC;’ +
‘varying vec3 v_normalEC;’ +
‘void main()’ +
‘{’ +
’ vec4 p = czm_computePosition();’ +
’ v_positionEC = (czm_modelViewRelativeToEye * p).xyz;’ +
’ gl_Position = czm_modelViewProjectionRelativeToEye * p;’ +
‘}’;
this.fragmentShaderSource =
‘varying vec3 v_positionEC;’ +
‘varying vec3 v_normalEC;’ +
‘void main()’ +
‘{’ +
’ gl_FragColor = vec4(1.0, 0.0, 0.0, 0.5);’ +
‘}’;
this.renderState = Appearance.getDefaultRenderState(true, false);
};
IgnB3DAppearance.prototype.getFragmentShaderSource = Appearance.prototype.getFragmentShaderSource;
IgnB3DAppearance.prototype.isTranslucent = Appearance.prototype.isTranslucent;
IgnB3DAppearance.prototype.getRenderState = Appearance.prototype.getRenderState;

Here is erreur
An error occurred while rendering. Rendering has stopped.
undefined
TypeError: Cannot read property ‘center’ of undefined
TypeError: Cannot read property ‘center’ of undefined
at Primitive.update (http://localhost/trunk/globe/Source/Scene/Primitive.js:873:59)
at PrimitiveCollection.update (http://localhost/trunk/globe/Source/Scene/PrimitiveCollection.js:364:27)
at updatePrimitives (http://localhost/trunk/globe/Source/Scene/Scene.js:1319:27)
at render (http://localhost/trunk/globe/Source/Scene/Scene.js:1372:9)
at Scene.render (http://localhost/trunk/globe/Source/Scene/Scene.js:1413:13)
at CesiumWidget.render (http://localhost/trunk/globe/Source/Widgets/CesiumWidget/CesiumWidget.js:636:25)
at render (http://localhost/trunk/globe/Source/Widgets/CesiumWidget/CesiumWidget.js:68:32)