// /*===============================================================================
// Copyright (C) 2020 PhantomsXR Ltd. All Rights Reserved.
//
// This file is part of the AR-MOD SDK.
//
// The AR-MOD SDK cannot be copied, distributed, or made available to
// third-parties for commercial purposes without written permission of PhantomsXR Ltd.
//
// Contact info@phantomsxr.com for licensing requests.
// ===============================================================================*/
using System;
using UnityEngine;
namespace Phantom.XRMOD.ActionNotification.Runtime
{
[Flags]
public enum TrackableTypeEnum : int
{
///
/// No trackable.
///
None = 0,
///
/// Refers to the 2D convex shape associated with a plane's boundary points.
///
///
/// When used as the trackableTypeMask in a
/// ,
/// the ray is considered to have hit if the ray intersects with the polygon described by the exact
/// boundary of the plane.
///
PlaneWithinPolygon = 1 << 0,
///
/// Refers to the 2D rectangular bounding box that tightly encloses the plane's polygon.
///
///
/// When used as the trackableTypeMask in a
/// ,
/// the ray is considered to have hit if the ray intersects with the 2D box described by the
/// size of the plane.
///
PlaneWithinBounds = 1 << 1,
///
/// Refers to the infinite plane described by its Pose (a position and orientation).
///
///
/// When used as the trackableTypeMask in a
/// ,
/// the ray is considered to have hit if the ray intersects with the infinite plane.
///
PlaneWithinInfinity = 1 << 2,
///
/// Refers to an estimated plane.
///
///
/// When used as the trackableTypeMask in a
/// ,
/// the ray is considered to have hit if the ray intersects with an estimated plane. An estimated
/// plane is implementation-defined, but might not have an exact boundary. It is a guess that suggests
/// the ray is near a surface.
///
PlaneEstimated = 1 << 3,
///
/// Refers to any of the plane type trackables.
///
///
/// Often used with the trackableTypeMask in a
/// ,
/// the ray is considered to have hit if the ray intersects with any of the plane types.
///
Planes =
PlaneWithinPolygon |
PlaneWithinBounds |
PlaneWithinInfinity |
PlaneEstimated,
///
/// Refers to a feature point (that is, a point in a point cloud).
///
///
/// When used as the trackableTypeMask in a
/// ,
/// the ray is considered to have hit if a cone around the ray intersects with a point in a point cloud.
///
FeaturePoint = 1 << 4,
///
/// Refers to a tracked image.
///
Image = 1 << 5,
///
/// Refers to a tracked face.
///
Face = 1 << 6,
///
/// Refers to a point in the depth map.
///
Depth = 1 << 7,
///
/// Deprecated in favor of . Refers to all trackable types except
/// .
///
[Obsolete("Use TrackableType.AllTypes instead. (2021-05-02)")]
All = Planes | FeaturePoint | Image | Face,
///
/// Refers to all trackable types.
///
AllTypes = -1,
}
public class CreateAnchorArgs : BaseNotificationData
{
///
/// Only work in Handheld ar
///
public StickTypeEnum StickType;
///
/// Only work in Handheld ar
///
public TrackableTypeEnum TrackableType;
///
/// Only work in Handheld ar
///
public Vector3 Offset;
///
/// Placed position
///
public Vector3 Position;
///
/// Placed rotation
///
public Quaternion Rotation;
///
/// The instanced GameObject
///
public GameObject Content;
public enum StickTypeEnum
{
//ByScreen,
ByTrackableType
}
}
}