Chart3DCameraRig
public class Chart3DCameraRig : MonoBehaviourOrbit rig that keeps a scene camera on a Chart3DComponent: it orbits by the chart's
Chart.Pose and follows its Chart.Projection. By default it fits the whole chart, labels
included, into the camera's view with the framing and field of view Chart 3D outputs use; off, it places the camera
at its own distance and orthographic size. It writes the camera only when the pose, projection, plot, geometry,
host transform, camera aspect or a rig setting changed, or something else moved the camera.
Methods
Section titled “Methods”
EnsureRig(Chart3DComponent)
Section titled “EnsureRig(Chart3DComponent)”public static Chart3DCameraRig EnsureRig(Chart3DComponent host)Returns the rig on the __CameraRig child of host, creating that child and its camera
when it is missing, and points the rig at the host; null for a null host. The rig is saved with the scene. A host
without a Chart3DComponent.CameraRig takes the rig as its own, so the rig orbits by the pose and
the host stops turning its content by it.
Parameters
| Name | Type |
|---|---|
host | ChartGuru.Chart3DComponent |
Returns
ChartGuru.Chart3DCameraRig
Constructors
Section titled “Constructors”
Chart3DCameraRig()
Section titled “Chart3DCameraRig()”public Chart3DCameraRig()Properties
Section titled “Properties”
public Chart3DComponent Host { get; set; }Returns
ChartGuru.Chart3DComponent
ActiveCamera
Section titled “ActiveCamera”public Camera ActiveCamera { get; }Returns
UnityEngine.Camera
AutoFrame
Section titled “AutoFrame”public bool AutoFrame { get; set; }Whether the rig fits the whole chart into the camera’s view; off, it uses Chart3DCameraRig.Distance and its orthographic size.
Returns
System.Boolean
Distance
Section titled “Distance”public float Distance { get; set; }The camera’s distance from the plot center, in the chart’s local units: the chart pose’s distance when it has one, else the latest automatic framing’s, else the rig’s own. Setting it clamps it between the minimum and maximum distances and, while the rig orbits by the chart’s pose, stores it in the pose.
Returns
System.Single