addPortal

Adds a hidden portal panel at the back of the SpatialML container. The portal panel can only be added when containerType is ContainerType.VOLUMETRIC with positive depth, height, and width. Otherwise, an exception will be thrown.

When a portal panel is not added to a volumetric SpatialML container, just as all normal volumetric containers, the 3D content rendered inside it will be limited and clipped to the container's boundary. But if the portal panel is added, the 3D content falls outside the container can still be visible through the portal panel. A volumetric SpatialML container with portal panel added can be very useful when using SceneGraphProperty.CameraAnchor to anchor a 3D object according to camera-space coordinates.

For example, when you deploy an object-tracking algorithm inside SpatialML and want to render a digital twin anchored to the tracked object, it is very likely that the object goes far away and falls outside the SpatialML container, which normally makes the digital twin invisible even when the object is still being tracked. However, if the SpatialML container has the portal panel added, the user can still see the digital twin following the tracked object through the portal panel.

Return

This InitInfo object.

Throws

If the containerType is not ContainerType.VOLUMETRIC, or the depth, height, or width is non-positive.