API / geotoolkit3d / util / occlusion / AbstractOcclusionManager / AbstractOcclusionManager
occlusion.AbstractOcclusionManager.AbstractOcclusionManager
Abstract class for occlusion manager.
It uses an offscreen canvas to render the bounding box of added objects. At each frame, it tests if each bounding box is occluded by using occlusion query that supported in WebGL 2.
Constructors
Methods
▸ getClassName(): string
string
▸ getNumberOfOccludedObjects(): number
Get the number of occluded objects
number
num
▸ render(camera, plot): void
Render call in offscreen canvas. It does occlusion query and flip the visibility of objects based on query results.
Should be called at each frame in main 3D plot.
| Name | Type | Description |
|---|---|---|
camera | PerspectiveCamera | OrthographicCamera | the camera |
plot | Plot | the main plot |
void
▸ resize(width, height): void
Resize the offscreen canvas by width and height
| Name | Type | Description |
|---|---|---|
width | number | the width in pixel |
height | number | the height in pixel |
void
▸ Abstract setObjects(object): void
Add target objects to occlusion manager for occlusion query
It constructs bounding box information and binds the position array to gl program
void
▸ setUsability(toEnable): AbstractOcclusionManager
To enable / disable occlusion culling
| Name | Type | Description |
|---|---|---|
toEnable | boolean | the flag to enable or disable |
this
▸ Static getClassName(): string
string