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

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

Functions

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.

Send feedback about...