Disable frustum on map

1. A concise explanation of the problem you're experiencing.

I am working on frustum functionality, where I was trying to change angle distance, head, and pitch dynamically.

But when I was drawing with 30 degrees initially and later changed to 60 degrees,but the first frustum view of 30 degree has to be disabled where i couldnot find any syntax to disable.

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

viewer.scene.primitives.remove(frustum);
viewer.frustum.removeall;

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.

I am working on frustum functionality, where I was trying to change angle distance, head, and pitch dynamically.

But when I was drawing with 30 degrees initially and later changed to 60 degrees,but the first frustum view of 30 degree has to be disabled where i couldnot find any syntax to disable .

4. The Cesium version you're using, your operating system and browser.

cesuim latest and windows 10 OS

Hi there,

Are you trying to change the properties of a frustum or a frustum geometry? Can you provide a more complete example using Sandcastle?

Thanks,

Gabby

Hi Gabby,

I have taken frustum code from github link below.

https://github.com/AnalyticalGraphicsInc/cesium/blob/master/Apps/Sandcastle/gallery/development/Frustum.html

i have modified by adding distance and
rolling_value

& changing dynamically frustum view.

frustum = new Cesium.PerspectiveFrustum({

fov : Cesium.Math.toRadians(rolling_value),

aspectRatio : scene.canvas.clientWidth / scene.canvas.clientHeight,

//twist:15,

near :0.009,

far : distance,

}

based on changes of each distance and rolling value , multiple frustums is created. i just want to disable previous frustum view while changing dynamically then i can show only current view.

Please help me how can i disable frustum .

Regards

Dhana

I’m not sure why you’re getting multiple frustums - are you creating a new one every time the values change?

If you just want dynamic properties, use the CallbackProperty.

If that still doesn’t work, here’s a live Sandcastle of the frustum example. Put your modifications there and share it here so we can take a look.

Dhana, You should be able to modify the camera’s frustum with camera.frustum.fov property directly without creating a new Frustum object each time. Do you also want to update the geometry? If so, Omar sounds like he can help with that!

Hi Omar ,

Thanks Gabby , we have worked with camera.frustum property to show the dynamic frustum view.

Yes am creating a new one every time based on dynamic distance and rolling value . I think CallbackProperty cannot be able to help here. please guide me .

below is the attached html and snapshot for reference.

frustum2.html (8.55 KB)