C++ helper functions

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

Summary

This avoids having to explicitly reinterpret_cast in most cases.

Note: These methods 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. Call ArTrackable_getType() beforehand to figure out the correct cast.

Functions

ArAsAugmentedImage(ArTrackable *trackable)
Downcasts to ArAugmentedImage.
ArAsPlane(ArTrackable *trackable)
Downcasts to ArPlane.
ArAsPoint(ArTrackable *trackable)
Downcasts to ArPoint.
ArAsTrackable(ArPlane *plane)
Upcasts to ArTrackable.
ArAsTrackable(ArPoint *point)
Upcasts to ArTrackable.
ArAsTrackable(ArAugmentedImage *augmented_image)
Upcasts to ArTrackable.

Functions

ArAsAugmentedImage

ArAugmentedImage * ArAsAugmentedImage(
  ArTrackable *trackable
)

Downcasts to ArAugmentedImage.

ArAsPlane

ArPlane * ArAsPlane(
  ArTrackable *trackable
)

Downcasts to ArPlane.

ArAsPoint

ArPoint * ArAsPoint(
  ArTrackable *trackable
)

Downcasts to ArPoint.

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.

Send feedback about...