ARCameraBaseBehaviour Class¶
Description¶
ARCameraBaseBehaviour is the component to control ARCamera in the AR scene.
The object with ARCameraBaseBehaviour is the parent of RenderCameras, and the transform between ARCamera and tracked Target is controlled by EasyAR.
You can filter Target pose (Rotation and Position from TargetInstance in the Frame) in the FrameUpdate event, to reduce jitter.
You can turn RenderReality off to disable camera background display.
Public Types¶
Public Fields¶
Public Functions¶
Public Events¶
Overwritten MonoBahaviour Functions¶
enum CenterMode¶
Constant |
Value |
Description |
---|---|---|
FirstTarget |
0 |
The AR scene will use the first tracked target as centered. You can move or rotate the target and the ARCamera will follow. You cannot manually change the ARCamera's transform in this mode. The relative transform from Target to ARCamera is controlled by EasyAR. |
Camera |
1 |
The AR scene is Camera centered. You can move or rotate the ARCamera and the Target will follow. You cannot manually change the Target's transform in this mode. The relative transform from Target to ARCamera is controlled by EasyAR. |
SpecificTarget |
2 |
The AR scene will use the target specified by CenterTarget as centered. If the specified target is not found, will fall back to Camera center mode.The relative transform from Target to ARCamera is controlled by EasyAR. |
CenterMode WorldCenter¶
The AR world center. It can be changed on the fly. See CenterMode for more details.
bool RenderReality¶
Flag to render or disalble reality plane. Camera background will stop to display is set to false.
TargetAbstractBehaviour CenterTarget¶
Centered target when WorldCenter is target.
void Bind(DeviceAbstractBehaviour behaviour)¶
Binds DeviceAbstractBehaviour. It is used for building AR scene. ARCameraBaseBehaviour must be bind to a DeviceAbstractBehaviour before all functions work.
event Action<ARCameraBaseBehaviour, Frame> FrameUpdate¶
Event for a frame update. You can get a Frame and its underlying data like the tracked target or current image of the frame. The image inside the frame is synchronized with the RealityPlane. See Frame for more details.
event Action<ARCameraBaseBehaviour, Texture2D> PlaneTextureCreated¶
Event for the creation of RealityPlane texture.
event Action<ARCameraBaseBehaviour, TargetAbstractBehaviour, Target> TargetFound¶
Target found event. All targets found will be evented here.
event Action<ARCameraBaseBehaviour, TargetAbstractBehaviour, Target> TargetLost¶
Target lost event. All targets lost will be evented here.
event Action<ARCameraBaseBehaviour, string> TextMessage¶
Text message get event. QRCode message will be evented here.