class ARWorldCoordinateSpace (Niantic.ARDK.AR.Localization.ARWorldCoordinateSpace)
Overview
class ARWorldCoordinateSpace: IDisposable { public: // structs struct Identifier; // properties Identifier Id; Matrix4x4 Transform; // methods ARWorldCoordinateSpace(Identifier id, Matrix4x4 transform); Matrix4x4 ConvertFromCoordinateSpace( ARWorldCoordinateSpace sourceCoordinateSpace, Matrix4x4 pose ); Vector3 ConvertFromCoordinateSpace( ARWorldCoordinateSpace sourceCoordinateSpace, Vector3 vector ); Matrix4x4 ConvertFromTransform(Matrix4x4 sourceTransform, Matrix4x4 pose); Vector3 ConvertFromTransform(Matrix4x4 sourceTransform, Vector3 vector); Matrix4x4 ConvertFromWorld(Matrix4x4 pose); Vector3 ConvertFromWorld(Vector3 vector); Matrix4x4 ConvertToTransform(Matrix4x4 targetTransform, Matrix4x4 pose); Vector3 ConvertToTransform(Matrix4x4 targetTransform, Vector3 vector); Matrix4x4 ConvertToWorld(Matrix4x4 pose); Vector3 ConvertToWorld(Vector3 vector); void Dispose(); };
Detailed Documentation
Note
This is an experimental feature, and may be changed or removed in a future release. This feature is currently not functional or supported.
Properties
Identifier Id
Persistent identifier for a particular coordinate space. Serializable, should be stored game-side in order to localize against this coordinate space in future sessions.
Matrix4x4 Transform
The coordinate space’s transform relative to the local (i.e. device tracking system’s) coordinate space. Changes to this value will be broadcast by the WorldCoordinateSpaceUpdated event.
Note
This is a transform to an arbitrary point in the real world, but is guaranteed to be persistent (subsequent localization results to the same coordinate space will return a transform to the same real world point again).
Methods
ARWorldCoordinateSpace(Identifier id, Matrix4x4 transform)
Creates an ARWorldCoordinateSpace object from the provided parameters.
Parameters:
id |
the unique string identifying this world anchor. |
transform |
the world anchor’s transform relative to the world. |
Matrix4x4 ConvertFromCoordinateSpace( ARWorldCoordinateSpace sourceCoordinateSpace, Matrix4x4 pose )
Converts a pose from another coordinate space to this coordinate space.
Parameters:
sourceCoordinateSpace |
the pose’s source coordinate space. |
pose |
the pose to be transformed. |
Vector3 ConvertFromCoordinateSpace( ARWorldCoordinateSpace sourceCoordinateSpace, Vector3 vector )
Converts a vector from another coordinate space to this coordinate space.
Parameters:
sourceCoordinateSpace |
the vector’s source coordinate space. |
vector |
the vector to be transformed. |
Matrix4x4 ConvertFromTransform(Matrix4x4 sourceTransform, Matrix4x4 pose)
Converts a pose from a source coordinate system to this coordinate space.
Parameters:
sourceTransform |
the transform of the coordinate system of the pose, relatively to the world. |
pose |
the pose to be transformed. |
Vector3 ConvertFromTransform(Matrix4x4 sourceTransform, Vector3 vector)
Converts a vector from a source coordinate system to this coordinate space.
Parameters:
sourceTransform |
the transform of the coordinate system of the vector, relatively to the world. |
vector |
the vector to be transformed. |
Matrix4x4 ConvertFromWorld(Matrix4x4 pose)
Converts a pose from world coordinates to this coordinate space.
Parameters:
pose |
the pose to be transformed. |
Vector3 ConvertFromWorld(Vector3 vector)
Converts a vector from world coordinates to this coordinate space.
Parameters:
vector |
the vector to be transformed. |
Matrix4x4 ConvertToTransform(Matrix4x4 targetTransform, Matrix4x4 pose)
Converts a pose from this coordinate space to a target coordinate system.
Parameters:
targetTransform |
the target coordinate system’s transform, relatively to the world. |
pose |
the pose to be transformed. |
Vector3 ConvertToTransform(Matrix4x4 targetTransform, Vector3 vector)
Converts a vector from this coordinate space to a target coordinate system.
Parameters:
targetTransform |
the target coordinate system’s transform, relatively to the world. |
vector |
the vector to be transformed. |
Matrix4x4 ConvertToWorld(Matrix4x4 pose)
Converts a pose from this coordinate space to world coordinates.
Parameters:
pose |
the pose to be transformed. |
Vector3 ConvertToWorld(Vector3 vector)
Converts a vector from this coordinate space to world coordinates.
Parameters:
vector |
the vector to be transformed. |