The camera tag defines how the scene is viewed. It is the camera that “sees” the 3D objects. The attributes determine the type of camera, how it can move in the scene, and it’s initial viewing location and orientation.
- type – The type of camera. Legal values are perspective, orthographic, stereo, and vr. The default is perspective. If the display device does not support this choice, XSeen automatically rolls back to a supported type. The value of this field is case insensitive.
perspective — A “single-eye” perspective view of the scene. All viewing converges to the camera position.
orthographic — A “single-eye” orthographic view of the scene. There is no viewing convergence.
stereo – A “double-eye” perspective view. This mode is used to generate side-by-side perspective views with a separation between the cameras. It is used for display devices such as Cardboard.
vr – This mode connects with the devices VR display. It controls display and navigation; and depends on the WebVR/WebXR library successfully making a connection to the VR display. This display type overrides any setting for track. If the device is not capable of this mode, then XSeen automatically rolls back to ‘stereo‘.
- track – How the camera is allowed to move from it’s current position and rotation relative to it’s parent coordinate system. Legal values are ‘none’, ‘orbit’, ‘fly’, ‘examine’, ‘trackball’, and ‘device’. If the display device does not support this choice, XSeen automatically rolls back to a supported type. The value of this field is case insensitive.
none – The camera does not move.
examine – Synonym of ‘trackball’.
device – The camera motion tracks the motion of the device, looking at the 3D scene from the same orientation as the device registers. This is useful for scenes meant to be viewed from mobile devices. If the device does not support this mode, then XSeen automatically rolls back to ‘orbit‘.
- available – This camera definition is available for use.
- priority – The priority of this camera relative to others that are defined. This value is an integer >= 1. The system provides a default perspective orbit-tracking camera at (0,0,10). All user cameras are higher priority than the system default. Anytime there is no camera defined for rendering, the system finds first defined available camera at the highest priority. This happens at display initialization and any other time durring hte running of the scene. The camera used for rendering can be switched by
- making it unavailable by setting available to false.
- requesting a specific camera (API only)
- position – The 3-space position relative to the current origin of the camera. If the camera type provides for two “eyes”, then this is the mid-point of the line between the “eyes”. The default is the origin. See Data Types -> position for more details.
- rotation – The rotation about the X, Y, and Z-axis at this position relative to the current coordinate system. The default is no rotation, See Data Types -> rotation for more details.