Class OrienterThreeBody
Derived class which supports computing implicit rotations in full 3-DOF (6-DOF w/ position).
Implements
Inherited Members
Namespace: Microsoft.MixedReality.WorldLocking.Core
Assembly: cs.temp.dll.dll
Syntax
public class OrienterThreeBody : Orienter, IOrienter
Remarks
Whereas the base Orienter class uses the simplifying assumption of only adjusting yaw, that is rotation about the gravity vector Y-axis, the OrienterThreeBody computes an arbitrary 3-DOF rotation to align modeling space with the supplied physical reference points. Since at least three non-collinear points are necessary to compute such a rotation, until they are available, it falls back on a simplified computation. To summarize:
- Zero points - identity transform
- One point - position alignment only (identity rotation)
- All points collinear - yaw and pitch about the line, but no roll about the line.
- Non-collinear - 3-DOF alignment.
Methods
ComputeRotation(IOrientable, IOrientable)
Compute yaw and pitch to align virtual line with physical.
Declaration
protected override Orienter.WeightedRotation ComputeRotation(IOrientable a, IOrientable b)
Parameters
Type | Name | Description |
---|---|---|
IOrientable | a | First point |
IOrientable | b | Second point |
Returns
Type | Description |
---|---|
Orienter.WeightedRotation | Computed rotation weighted by inverse distance between points. |
Overrides
ComputeRotations()
Override to compute rotations unconstrained as a rotation about the gravity vector, Y-axis.
Declaration
protected override bool ComputeRotations()
Returns
Type | Description |
---|---|
Boolean | True on success. |
Overrides
Remarks
It takes at least 3 non-collinear points to imply a rotation. If there are fewer than that, this reverts back to the behavior of computing a rotation which pitches to align points but doesn't introduce roll.