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
.
ArAsInstantPlacementPoint
ArInstantPlacementPoint * ArAsInstantPlacementPoint( ArTrackable *trackable )
Downcasts to ArInstantPlacementPoint
.
ArAsStreetscapeGeometry
ArStreetscapeGeometry * ArAsStreetscapeGeometry( ArTrackable *trackable )
Downcasts to ArStreetscapeGeometry
.
ArAsTrackable
ArTrackable * ArAsTrackable( ArAugmentedImage *augmented_image )
Upcasts to ArTrackable
.
ArAsTrackable
ArTrackable * ArAsTrackable( ArInstantPlacementPoint *instant_placement_point )
Upcasts to ArTrackable
.
ArAsTrackable
ArTrackable * ArAsTrackable( ArStreetscapeGeometry *streetscape_geometry )
Upcasts to ArTrackable
.