Reference Property changes entity shape definition

1. A concise explanation of the problem you're experiencing.
When I add an entity to the Viewer's EntityCollection and use a Reference Property for the new entity's position, it changes (or ignores) the definition of the ellipsoid that I am trying to create.

2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.

var availability = new Cesium.TimeIntervalCollection(<some TimeInterval>);
var position_ref = new Cesium.ReferenceProperty(viewer, 'otherId', ['position']);
   id: 'Some Ellipsoid',
   availability: availability,
   position: position_ref,
   ellipsoid: {
      radii: new Cesium.Cartesian3(100, 200, 300),
      material: Cesium.Color.RED.withAlpha(0.3),
      outline: True

Then from EllipsoidGeometry.createGeometry() in CesiumUnminified/Cesium.js:
EllipsoidGeometry.createGeometry = function(ellipsoidGeometry) {

From the console log above, I would expect to see:
But instead I see:

The ellipsoid appears to be drawn with the correct radii, but why do I see the geometry definition like this?

If I instead use a fixed position instead of a position reference, the console log gives me what I expect. Why is that?

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I need to use the geometry definition attributes from within the createGeometry function.

4. The Cesium version you're using, your operating system and browser.
Cesium 1.30 on Firefox 45.1.0 on Linux (yes I know, both are old; it takes moving heaven and earth to get updates in my work environment). Note that I have a few custom mods to my local Cesium, so if you can't reproduce this it's likely I simply broke something.


I just discovered it is not due to the fact that the position is a reference property. I also get the described behavior if the position is a SampledPositionProperty. The only time I get the expected behavior is if Position is a Cartesian3.

This is by design. For performance, ellipsoid geometry is created with a unit sphere and deformed using the model matrix, to avoid the need to recompute the geometry each frame.


Thanks for pointing me to that section of the code. That's exactly what I needed.

Another thing I noticed is that the DynamicGeometry.update() function is getting triggered continually, even when the clock is not advancing. Is that how it is supposed to work?

Thanks for your help.

Since your position attribute is determined with a reference property, I believe it must update every frame to check whether the referenced position has been updated. If you supply a static position, it would only update when the value is updated.