ArObject

data class ArObject(var id: Int = -1, var name: String = "", var location: Location = Location(), var zoom: Zoom = Zoom(), var model: ArModel? = null, var events: ArrayList<ArEvent>? = null, var subEvents: HashMap<String, ArrayList<ArEvent>?>? = null, var transparency: Float = 1.0f, var sceneId: Int? = null, var children: List<ArObject> = emptyList()) : Serializable

One AR object of a scene, as found in the ar_objects array of a scene payload (ArScenes.arObjects).

Wrapped by ArObjectModel, which supplies defaults and builds the scene node.

Constructors

Link copied to clipboard
constructor(id: Int = -1, name: String = "", location: Location = Location(), zoom: Zoom = Zoom(), model: ArModel? = null, events: ArrayList<ArEvent>? = null, subEvents: HashMap<String, ArrayList<ArEvent>?>? = null, transparency: Float = 1.0f, sceneId: Int? = null, children: List<ArObject> = emptyList())

Properties

Link copied to clipboard

Child AR objects, used by ArSpherePolyhedron2Node; empty when absent.

Link copied to clipboard

Events (trigger plus actions) attached to the object; null when none.

Link copied to clipboard
var id: Int

AR object id; -1 when absent.

Link copied to clipboard

Position (scene units, relative to the scene origin) and Euler rotation (degrees).

Link copied to clipboard

Renderable type, type-specific fields and asset URLs; null builds a plain ArBaseNode.

Link copied to clipboard

Display name; empty when absent.

Link copied to clipboard
@SerializedName(value = "scene_id")
var sceneId: Int?

Id of the scene the object belongs to (scene_id); null when absent.

Link copied to clipboard
@SerializedName(value = "sub_events")
var subEvents: HashMap<String, ArrayList<ArEvent>?>?

Events attached to named sub-nodes such as polyhedron faces, keyed by sub-node name (sub_events); null when none.

Link copied to clipboard

Initial alpha, 0 (transparent) to 1 (opaque); default 1.

Link copied to clipboard
var zoom: Zoom

Scale per axis.

Functions

Link copied to clipboard

Returns a copy whose location, zoom and model are copied and whose children are cloned recursively.