C++ type conversions

These functions expose allowable type conversions as C++ helper functions.

This avoids having to explicitly reinterpret_cast in most cases.

Note: These functions only change the type of a pointer; they do not change the reference count of the referenced objects.

Note: There is no runtime checking that casts are correct. When downcasting ArTrackable, call ArTrackable_getType beforehand to figure out the correct cast.

Summary

Functions

ArAsAugmentedImage

ArAugmentedImage * ArAsAugmentedImage(
  ArTrackable *trackable
)

Downcasts to ArAugmentedImage.

ArAsFace

ArAugmentedFace * ArAsFace(
  ArTrackable *trackable
)

Downcasts to ArAugmentedFace.

ArAsFuture

ArFuture * ArAsFuture(
  ArHostCloudAnchorFuture *future
)

Upcasts to ArFuture.

ArAsFuture

ArFuture * ArAsFuture(
  ArResolveCloudAnchorFuture *future
)

Upcasts to ArFuture.

ArAsFuture

ArFuture * ArAsFuture(
  ArResolveAnchorOnTerrainFuture *future
)

Upcasts to ArFuture.

ArAsFuture

ArFuture * ArAsFuture(
  ArResolveAnchorOnRooftopFuture *future
)

Upcasts to ArFuture.

ArAsFuture

ArFuture * ArAsFuture(
  ArVpsAvailabilityFuture *future
)

Upcasts to ArFuture.

ArAsInstantPlacementPoint

ArInstantPlacementPoint * ArAsInstantPlacementPoint(
  ArTrackable *trackable
)

Downcasts to ArInstantPlacementPoint.

ArAsPlane

ArPlane * ArAsPlane(
  ArTrackable *trackable
)

Downcasts to ArPlane.

ArAsPoint

ArPoint * ArAsPoint(
  ArTrackable *trackable
)

Downcasts to ArPoint.

ArAsStreetscapeGeometry

ArStreetscapeGeometry * ArAsStreetscapeGeometry(
  ArTrackable *trackable
)

Downcasts to ArStreetscapeGeometry.

ArAsTrackable

ArTrackable * ArAsTrackable(
  ArPlane *plane
)

Upcasts to ArTrackable.

ArAsTrackable

ArTrackable * ArAsTrackable(
  ArPoint *point
)

Upcasts to ArTrackable.

ArAsTrackable

ArTrackable * ArAsTrackable(
  ArAugmentedImage *augmented_image
)

Upcasts to ArTrackable.

ArAsTrackable

ArTrackable * ArAsTrackable(
  ArInstantPlacementPoint *instant_placement_point
)

Upcasts to ArTrackable.

ArAsTrackable

ArTrackable * ArAsTrackable(
  ArAugmentedFace *face
)

Upcasts to ArTrackable.

ArAsTrackable

ArTrackable * ArAsTrackable(
  ArStreetscapeGeometry *streetscape_geometry
)

Upcasts to ArTrackable.