Skip to content
API reference

API reference

This page documents the public-facing surface of the package. It lists the types you construct, call methods on, or read fields from when wiring up anchor placement and localization. It does not cover every public C# symbol in the source tree. Internal pipeline stages (RANSAC, ICP, descriptor matching), licensing plumbing, and math/serialization primitives are deliberately left out. See how alignment works if you want the algorithm internals.

Each entry names the file the contract was read from, so you can go straight to source for anything not covered here. Contracts are written from the current implementation, not from intent. Where a member’s behavior was not obvious from the code alone, this page says so instead of guessing.

Placing and saving anchors

ManualAnchoring

src/LansAnchor.Unity/Assets/MeshBasedAnchoring/Anchoring/ManualAnchoring.cs:17

Single-room MonoBehaviour: one source scan, one anchor, one client scan trying to find it. Set up as described in Manual anchoring; the table below is the method/ event surface behind that Inspector.

MemberSignatureContract
SetSourcevoid SetSource(Transform source)Sets the source (Client A) root Transform without touching the Inspector.
SetClientvoid SetClient(Transform client)Sets the client (Client B) root Transform without touching the Inspector.
TryCreateAnchorAnchorResult<AnchorDescriptor> TryCreateAnchor(WorldMesh[] sourceMeshes, Transform center, RegistrationParams options)Client A side: extracts features around center and builds an AnchorDescriptor to send to Client B. Fails when fewer than the minimum feature count is found near the anchor.
TryImportAnchorAnchorResult<AnchorPose> TryImportAnchor(AnchorDescriptor descriptor, Feature[] ownFeatures, float clientCharacteristicLength = 0f, Action<RegistrationProgress> onProgress = null, CancellationToken cancellationToken = default)Client B side: registers ownFeatures against the descriptor and returns an AnchorPose mapping client world space to source world space. Fails when the result does not clear DiagnosticInfo.IsReliable.
CalculateTask<DiagnosticInfo> Calculate()Convenience wrapper: runs TryCreateAnchor then TryImportAnchor using the component’s serialized Inspector fields, applies the resulting pose to the assigned client Transform, and writes a FeatureRegistration_*.log file. Returns diagnostics regardless of outcome; check IsReliable.
CancelCalculatevoid CancelCalculate()Requests cooperative cancellation of an in-flight Calculate() call. No-op when nothing is running; the in-flight call returns a clean WasCancelled result rather than throwing.
BuildParamsRegistrationParams BuildParams()Builds a RegistrationParams from the component’s current serialized fields, same values Calculate() uses internally. Useful for calling TryImportAnchor/TryCreateAnchor directly with the Inspector’s own settings.
OnProgressProgressEvent OnProgress (UnityEvent<RegistrationProgress>)Invoked on the main thread with phase-level progress while Calculate() runs.

AnchorDescriptor

src/LansAnchor.Unity/Assets/MeshBasedAnchoring/Anchoring/AnchorDescriptor.cs:11

Produced by TryCreateAnchor. This is the wire/save format for a single anchor: serialize it with ToBytes(), send it to Client B by whatever transport you choose (file, network, LAN share), and deserialize with FromBytes().

MemberSignatureContract
SourceFeaturesFeature[] SourceFeaturesAnchor-local feature set collected within AnchorRadius of the anchor.
RoomFeaturesFeature[] RoomFeaturesOptional whole-scan feature set (the room tier). Null/empty when Build Room Tier was off at creation time.
ParamsRegistrationParams ParamsRegistration settings shipped with the descriptor so Client B matches Client A’s configuration.
AnchorOffsetVector3 AnchorOffsetHow far AnchorPlacementRadius snapping moved the anchor from the caller’s requested position. Zero when that snap was not used. Informational only.
RequestedAnchorPositionVector3 RequestedAnchorPositionClient A’s original requested anchor position, before any snap. Client B recovers this directly once frames are unified; see AnchorPose.
SourceCharacteristicLengthfloat SourceCharacteristicLengthMedian edge length of Client A’s source scan, used to resolve scale-relative thresholds against Client B’s own scan.
FingerprintQualityfloat FingerprintQualitySame-room fingerprint richness score computed once at build time. 0 = not computed.
StrengthAnchorStrength StrengthCreation-time strength feedback (Weak/OK/Strong with plain-language message). Not serialized; set directly on the descriptor TryCreateAnchor returns.
FrameEpochint FrameEpochWhich ARSession reset epoch this descriptor’s features/position were captured in. -1 means not recorded (older descriptors, or a caller that never stamped it); never treated as equal to another unknown epoch.
FeatureCountint FeatureCount (get)SourceFeatures?.Length ?? 0.
HasRoomTierbool HasRoomTier (get)True when RoomFeatures is non-null and non-empty.
ToBytesbyte[] ToBytes()Serializes the descriptor to a binary blob for saving/transmitting.
FromBytesstatic AnchorDescriptor FromBytes(byte[] data)Deserializes a blob produced by ToBytes(). Accepts the current and one prior format version.
SaveToFile / LoadFromFilevoid SaveToFile(string path) / static AnchorDescriptor LoadFromFile(string path)File-based convenience wrappers around ToBytes/FromBytes.

The descriptor also carries ScanQuality (a scan-quality self-check result) and QualityMeter (a save-time local-data reading), both dev-facing diagnostics rather than integrator-facing API; not detailed here since their own types are outside this reference’s include list. Read ManualAnchoring.cs’s TryCreateAnchor if you need them.

AnchorStrength

src/LansAnchor.AnchorSystem.Companion/Runtime/AnchorStrength.cs:13 (StrengthBucket enum at :6)

Zero-mesh-knowledge Weak/OK/Strong feedback about how much distinctive geometry an anchor has around it at creation time. This is a coverage/richness proxy, not a prediction that localization will succeed later: a Strong anchor can still fail to register if Client B’s scan does not overlap it enough.

MemberSignatureContract
Bucketreadonly StrengthBucket BucketOne of Weak, Ok, Strong.
Messagereadonly string MessagePlain-language description of why the anchor scored this way.
ImprovementHintreadonly string ImprovementHintPlain-language suggestion for improving a weak/OK anchor.
Summarystring Summary (get)"Anchor strength: {Bucket} - {Message}" in one line, ready to log or display.
HealthyFeatureCountconst int HealthyFeatureCount = 50Feature count threshold used internally when deciding whether an anchor can reach Strong.
Assessstatic AnchorStrength Assess(int sourceFeatureCount, float fingerprintQuality, bool hasRoomTier, float stableFraction = 1f, NormalQualitySelfCheck.Result? scanQuality = null)Computes the bucket from feature count, fingerprint quality, room-tier presence, and geometry stability. Called automatically by TryCreateAnchor/MultiRoomAnchoring.BuildBatches; call directly only if you are building an AnchorDescriptor/AnchorBatch outside those paths.

Strength (an AnchorDescriptor/log field) is always read through ManualAnchoring.TryCreateAnchor or MultiRoomAnchoring.BuildBatches in normal use; you rarely construct AnchorStrength yourself.

Localizing (single room)

AnchorPose

src/LansAnchor.Unity/Assets/MeshBasedAnchoring/Anchoring/AnchorPose.cs:8

Produced by TryImportAnchor (Client B). Carries the transform that aligns the client’s coordinate frame to the source’s, plus enough bookkeeping to recover the original anchor pose after applying it.

MemberSignatureContract
WorldTransformMatrix4x4 WorldTransformMaps a client-world point to the corresponding source-world point.
DiagnosticsDiagnosticInfo DiagnosticsFull verification result for this registration attempt.
AnchorOffsetVector3 AnchorOffsetCopied from the source AnchorDescriptor.AnchorOffset; informational.
RequestedAnchorPositionVector3 RequestedAnchorPositionCopied from the source AnchorDescriptor.RequestedAnchorPosition; directly usable in Client B’s world once ApplyTo has run.
ApplyTovoid ApplyTo(Transform t)Applies WorldTransform to t, moving/rotating it into the source’s coordinate frame.

Multi-room

MultiRoomAnchoring

src/LansAnchor.Unity/Assets/MeshBasedAnchoring/Anchoring/MultiRoomAnchoring.cs:24

Matches one client scan against several pre-registered rooms at once. Sits alongside ManualAnchoring rather than replacing it; see Multi-room anchoring for scene setup. Inspector surface is deliberately narrow (rooms, client, three feature-extraction defaults); every algorithm knob comes from RegistrationParams.Default.

MemberSignatureContract
BatchesIReadOnlyList<AnchorBatch> Batches (get)The batches built by the most recent BuildBatches/BuildBatchesAsync/InstallBatches call.
SetClientvoid SetClient(Transform client)Sets the client root Transform without touching the Inspector.
SetRoomsvoid SetRooms(List<RoomSourceEntry> rooms)Replaces the configured room list without reflecting into the private field.
InstallBatchesvoid InstallBatches(List<AnchorBatch> batches)Installs pre-built batches (for example, loaded from disk) instead of building them this session.
BuildBatchesList<AnchorBatch> BuildBatches()Synchronous: extracts one AnchorBatch per configured RoomSourceEntry from the scene meshes. Skips (with a warning, never throws) entries with no SourceRoot or too few features.
BuildBatchesAsyncTask<List<AnchorBatch>> BuildBatchesAsync()Same extraction as BuildBatches, but the CPU-heavy feature/scoring work runs off the main thread so it does not block the UI.
BuildBatchAtAnchorBatch BuildBatchAt(WorldMesh[] coreMeshes, Vector3 anchorPosition, string roomId, Vector3 gravity, out int anchorFeatureCount)Builds a single-room batch at a fixed anchor position from already-baked meshes. Used for rebuilding one room’s payload (for example, a refresh flow) without re-deriving the whole-batch extraction recipe. Returns null when the anchor has fewer than 20 features.
LocalizeMultiRoomRegistrationResult Localize()Synchronous: runs the client scan against every batch in Batches. Fires exactly one of OnMatched/OnAmbiguous/OnNoMatch and also returns the result. Call BuildBatches() first; Localize() does not build batches implicitly.
LocalizeAsyncTask<MultiRoomRegistrationResult> LocalizeAsync()Async variant of Localize; the client-feature extraction and registration fan-out both run off the main thread.
CancelLocalizevoid CancelLocalize()Requests cooperative cancellation of an in-flight LocalizeAsync() call.
OnMatched / OnAmbiguous / OnNoMatchUnityEvent<MultiRoomRegistrationResult>Exactly one fires per Localize/LocalizeAsync call, matching MultiRoomRegistrationResult.State.
OnProgressUnityEvent<RegistrationProgress>Invoked on the main thread with phase-level progress during LocalizeAsync(). Never invoked by the synchronous Localize().
BuildRegistrationParamsTemplatestatic RegistrationParams BuildRegistrationParamsTemplate()Returns the same RegistrationParams.Default-based template Localize/LocalizeAsync use internally (scale estimation off, license-gate scoping applied). Useful if you are calling MultiRoomRegistration.Register yourself.

MultiRoomRegistrationResult

src/LansAnchor.AnchorSystem.Model/Runtime/MultiRoomRegistrationResult.cs:7

Outcome of one client scan fanned out against every configured AnchorBatch. Carries every room’s candidate, not just the winner, so a caller can explain a non-match.

MemberSignatureContract
StateMultiRoomResultState StateMatched, Ambiguous, or NoMatch.
WinningRoomIdstring WinningRoomIdSet only when State == Matched; null otherwise.
TransformTargetToSourceTransform TransformWinning transform, target frame to source frame. Default (identity) when not matched.
WinningDiagnosticsDiagnosticInfo WinningDiagnosticsFull verification result for the winning candidate. Default when not matched.
CandidatesList<RoomRegistrationCandidate> CandidatesEvery batch that was fully registered against, in evaluation order. Never null.
LicenseRequiredbool LicenseRequiredTrue when the installed license lacked the multi-room feature bit; Candidates stays empty in that case.
LicenseFailureReasonstring LicenseFailureReasonPlain-language reason paired with LicenseRequired.
IsMatched / IsAmbiguous / IsNoMatchbool (get)Convenience checks against State.
WinningAnchorWorldPosesList<Float3> WinningAnchorWorldPoses()Matched only: the winning room’s anchor(s) mapped into the client’s world frame, one pose per member of the winning batch. Empty (never null) otherwise.
RankedCandidateSummariesList<(string RoomId, float Score, string Reason)> RankedCandidateSummaries()Every candidate, best-first by combined score, with a plain-language reason string. Useful for an Ambiguous prompt.
NoMatchReasonsList<(string RoomId, string Reason)> NoMatchReasons()Every candidate’s best-effort, plain-language reason it did not win, keyed by room ID.

See Diagnostics for what the underlying gates mean, and the accuracy writeup for measured numbers behind them.

RoomRegistrationCandidate

src/LansAnchor.AnchorSystem.Model/Runtime/RoomRegistrationCandidate.cs:7

One room’s full registration result inside a MultiRoomRegistrationResult.Candidates list.

MemberSignatureContract
RoomIdstring RoomIdThe batch’s room identifier.
TransformTargetToSourceTransform TransformThis candidate’s registered transform, target frame to source frame.
Inliersint InliersInlier count from this candidate’s registration run.
DiagnosticsDiagnosticInfo DiagnosticsFull verification result for this specific room.
SameRoomScorefloat SameRoomScorePre-registration ranking hint for this room. -1 = quality-insufficient (no opinion); report-only, never used for winner selection.
CombinedScorefloat CombinedScoreScore actually used for cross-room winner selection and the margin gate. Saturates at 1.0 once overlap/normal-agreement/RMSE all clear their gates.
Passesbool Passes (get)Diagnostics.IsReliable.
BatchAnchorBatch BatchThe batch this candidate was registered against.
ReferenceFrameEpochint ReferenceFrameEpochFrame epoch of whichever batch member was actually registered against; used by WorldAnchorPoses to skip members from a known-different epoch.
FailureReasonstring FailureReason()Best-effort, plain-language reason this candidate did not win. Null when it passed.
WorldAnchorPosesList<Float3> WorldAnchorPoses()Maps every batch member’s source-frame anchor position into the client’s target frame. Members whose frame epoch is known to differ from ReferenceFrameEpoch are silently skipped.

MultiRoomResultState

src/LansAnchor.AnchorSystem.Model/Runtime/MultiRoomResultState.cs:5

ValueMeaning
MatchedExactly one room scored confidently above the margin gate.
AmbiguousTwo or more rooms scored comparably close; never auto-resolves to a pick.
NoMatchNo room passed verification, or none was supplied.

RoomSourceEntry

src/LansAnchor.Unity/Assets/MeshBasedAnchoring/Anchoring/RoomSourceEntry.cs:10

One Inspector-configured room entry. MultiRoomAnchoring.BuildBatches() turns each entry into one AnchorBatch.

MemberSignatureContract
RoomIdstring RoomIdCaller-assigned room identifier, used as an opaque string key only.
SourceRootTransform SourceRootRoot Transform whose child MeshFilters make up this room’s source scan.
AnchorTransform AnchorAnchor position within this room. Defaults to SourceRoot’s own position when left unset at BuildBatches() time.

Payload and transport

AnchorPayload

src/LansAnchor.AnchorSystem.Model/Runtime/AnchorPayload.cs:7

The N-tier wire format for one anchor inside a multi-room AnchorBatch. Distinct from Anchoring.AnchorDescriptor (the single-room, Unity-side type above); this is the Model-layer equivalent used by AnchorBatch.

MemberSignatureContract
SourceFeaturesFeature[] SourceFeaturesAnchor-local feature set.
CharacteristicLengthfloat CharacteristicLengthMedian edge length of the source scan this payload was built from.
GravityDirectionFloat3 GravityDirectionGravity direction the features were canonicalized against.
AnchorPositionFloat3 AnchorPositionWorld-space anchor position, source frame.
FineRadiusfloat FineRadiusRadius (meters) the fine-tier ICP considers around the anchor. 0 = auto via EffectiveFineRadius().
RoomFeaturesFeature[] RoomFeaturesOptional whole-scan feature set (own room tier, distinct from the batch’s shared tier).
FingerprintQualityfloat FingerprintQualitySame-room fingerprint richness score computed once at build time. 0 = not computed.
FrameEpochint FrameEpochWhich ARSession reset epoch this payload was captured in. -1 = not recorded.
HasRoomTierbool HasRoomTier (get)True when RoomFeatures is non-null and non-empty.
EffectiveFineRadiusfloat EffectiveFineRadius()Returns FineRadius if set, else max(1.5 m, 8 x CharacteristicLength).
DefaultFineRadiusstatic float DefaultFineRadius(float characteristicLength)The formula EffectiveFineRadius() falls back to.
ToBytesbyte[] ToBytes()Serializes the payload to a binary blob.
FromBytesstatic AnchorPayload FromBytes(byte[] data)Deserializes a blob produced by ToBytes(). Throws InvalidDataException on malformed/truncated input rather than allocating unbounded memory.

AnchorBatch

src/LansAnchor.AnchorSystem.Model/Runtime/AnchorBatch.cs:8

Groups one or more AnchorPayloads under a caller-assigned room ID. This is what MultiRoomAnchoring registers against; build one per room, either via MultiRoomAnchoring.BuildBatches() or by hand for a custom pipeline.

MemberSignatureContract
RoomIdstring RoomIdCaller-assigned room identifier.
MembersList<AnchorPayload> MembersThe anchors that belong to this room.
RoomFeaturesFeature[] RoomFeaturesBatch-level shared room tier, used when a member does not carry its own.
HasRoomTierbool HasRoomTier (get)True when the batch-level RoomFeatures is non-null and non-empty.
FingerprintQualityfloat FingerprintQualityBatch-level fingerprint quality, same semantics as AnchorPayload.FingerprintQuality.
EffectiveRoomFeaturesFeature[] EffectiveRoomFeatures(AnchorPayload payload)Returns payload’s own room tier if it has one, else the batch’s shared tier. Never averages across members.
EffectiveFingerprintQualityfloat EffectiveFingerprintQuality(AnchorPayload payload)Same own-first resolution rule as EffectiveRoomFeatures, for the quality score.
ToBytesbyte[] ToBytes()Serializes the batch (and every member) to a binary blob.
FromBytesstatic AnchorBatch FromBytes(byte[] data)Deserializes a blob produced by ToBytes(). Throws InvalidDataException on malformed/truncated input; per-member and per-feature counts are bound-checked before allocating.

Results and diagnostics

DiagnosticInfo

src/LansAnchor.AnchorSystem.Model/Runtime/DiagnosticInfo.cs:6

Full verification result for one registration run. AnchorPose.Diagnostics, RoomRegistrationCandidate.Diagnostics, and MultiRoomRegistrationResult.WinningDiagnostics are all this type. See Diagnostics for a plain-language walkthrough and the accuracy writeup for how these thresholds were calibrated.

MemberSignatureContract
SourceFeatureCount / TargetFeatureCountintFeature counts on each side. Below the minimum floor, registration fails before verification even runs.
CoarseYawDegreesfloatThe coarse yaw hypothesis chosen before ICP refinement.
YawAmbiguityfloatCompeting-peak mass over dominant-peak mass, [0,1]. Near 1 in symmetric (Manhattan) rooms. Reported, never gates IsReliable.
YawCandidatesTriedintHow many (yaw, translation) hypotheses were fully evaluated. 0 on the non-yaw-voting (RANSAC) path.
FinalRmsefloatPoint-to-plane RMSE, whole-cloud average, after global ICP.
OverlapRatiofloatFraction of target features within the association radius. Gate: >= OverlapMinReliable (0.30).
FloorCoincidencefloat|source floor - mapped target floor| in meters. -1 when not checked (no gravity/floor).
NormalAgreementfloatFraction of overlapping pairs whose rotated target normal agrees with the source normal within 35 degrees. Gate: >= NormalAgreementMinReliable (0.27). Catches wrong-90-degree-yaw confusion RMSE alone cannot see.
LocalRmsefloatPoint-to-plane RMSE restricted to the fine-tier region around the anchor, after LocalIcpRefine. What the user experiences standing at the anchor. 0 when the fine-tier ICP did not run.
FootprintCoveragefloatFraction of the source anchor patch’s occupancy footprint the target scan also covers. Gate: >= CoverageMinReliable (0.20). -1 = not computed (no gravity, or source patch too sparse to trust).
BidirYawDeltaDegfloatForward-then-reverse composed yaw error. Gate: <= BidirYawMaxDeg (12 degrees). -1 = not computed; only runs when the forward result sits in the low-certainty doubt band.
SameRoomScorefloatCheap pre-registration same-room fingerprint score. Report-only; measured non-separating on real rooms, never gates IsReliable. -1 = gate skipped (too sparse to trust).
IsSameRoombool (get)SameRoomScore >= 0.716. Report-only, same caveat as SameRoomScore.
WasCancelledboolTrue when a CancellationToken was cancelled mid-run; IsReliable is always false in that case.
LicenseRequired / LicenseFailureReasonbool / stringSet when RequireLicense was true and no valid license was present; ComputeTransform returns immediately rather than throwing.
Confidencefloat (get)bestInliers / min(source, target) counts. Display-only; does not gate IsReliable.
Certaintyfloat (get)Minimum of the per-gate margins, each normalized so 1.0 = exactly at its own gate. Gate: >= CertaintyMinReliable (1.03).
IsReliablebool (get)Conjunction of every hard gate above (feature floor, overlap, RMSE, floor, normal agreement, certainty, coverage, bidirectional yaw). The single field to check before trusting a result.
Formatstring Format()Human-readable multi-line summary, the same text written to the FeatureRegistration_*.log file.
CandidatesCandidateDiagnostic[]One row per fully-evaluated (yaw, translation) hypothesis, for offline debugging. Null on paths that skip the multi-hypothesis loop.

RegistrationProgress

src/LansAnchor.AnchorSystem.Model/Runtime/RegistrationProgress.cs:6

One snapshot delivered through ManualAnchoring.OnProgress/MultiRoomAnchoring.OnProgress or RegistrationParams.OnProgress directly.

MemberSignatureContract
Phasereadonly RegistrationPhase PhaseWhich phase this snapshot belongs to.
Currentreadonly int Current1-based index of the unit just completed within this phase (for example, candidate 4 of 30). 0 for phases with no i-of-N breakdown.
Totalreadonly int TotalTotal units expected in this phase. 0 when not applicable.

Candidate-phase reports may arrive from worker threads; every other phase reports from the caller’s own thread. ManualAnchoring/MultiRoomAnchoring both marshal this onto the main thread before invoking their UnityEvent; a caller using RegistrationParams.OnProgress directly is responsible for its own marshaling.

RegistrationPhase

src/LansAnchor.AnchorSystem.Model/Runtime/RegistrationPhase.cs:5

ValueMeaning
FeatureExtractionReading mesh vertices/normals into Features (source and/or client side).
CoarseDescriptor matching plus yaw/occupancy candidate generation, before per-candidate evaluation.
CandidatesPer-candidate evaluation loop (floor lock, ICP refine, verification). One report per candidate completion.
FineRefineAnchor-local second-stage ICP, after the global transform is already selected.
RoomMulti-room fan-out: one report per room evaluated. Single-room callers never report this phase.

AnchorResult<T>

src/LansAnchor.Unity/Assets/MeshBasedAnchoring/Anchoring/AnchorResult.cs:3

Generic success/failure wrapper returned by TryCreateAnchor (as AnchorResult<AnchorDescriptor>) and TryImportAnchor (as AnchorResult<AnchorPose>).

MemberSignatureContract
IsSuccessreadonly bool IsSuccessWhether the operation succeeded.
Valuereadonly T ValueThe result value. Populated on both success and failure (a failed TryCreateAnchor still returns a partial descriptor with feature counts and strength).
FailureReasonreadonly string FailureReasonPlain-language failure message. Null on success.
Successstatic AnchorResult<T> Success(T value)Constructs a success result.
Failurestatic AnchorResult<T> Failure(T value, string reason)Constructs a failure result.

Presets and tuning

RegistrationParams

src/LansAnchor.AnchorSystem.Model/Runtime/RegistrationParams.cs:7

Pure-data configuration struct for one registration run. Most projects never construct this directly; ManualAnchoring/MultiRoomAnchoring’s Inspector fields (see Manual anchoring) build it for you. The fields below matter when calling TryImportAnchor/ComputeTransform yourself, or tuning the no-gravity RANSAC fallback.

Feature extraction

MemberTypeContract
AnchorRadiusfloatRadius (meters) around the anchor used to build the source feature set. Default 5.
MaxTargetFeaturesintGlobal cap on client-side features. Default 3000.
CurvatureMinfloatMinimum curvature for a vertex to count as a feature. Default 0.05.
AnchorPlacementRadiusfloatRadius to auto-relocate the anchor to nearby distinctive geometry. 0 disables.

Matching and RANSAC (no-gravity fallback path only)

MemberTypeContract
CurvDiffMaxfloatMax curvature difference between a query feature and a source candidate.
GeometryConsistencyfloatMax pairwise-distance difference (meters) tolerated within a correspondence set.
GeometryConsistencyScaleTolerancefloatFractional version of the check above, used instead when EstimateScale is true and this is > 0.
MinSampleSpreadfloatMinimum distance between features sampled in the same RANSAC iteration.
RansacIterationsintIteration count for the RANSAC fallback.
InlierThresholdfloatMax spatial distance for a transformed point to count as an inlier. Also feeds RmseThreshold/FloorTolerance on the gravity path.
EarlyExitInlierRatiofloatStop RANSAC early once this fraction of target features are inliers.
InlierSampleSizeintSample size for inlier counting instead of scanning every target feature.
MinCorrespondencesintMinimum correspondences per iteration to attempt Kabsch-Umeyama.
MinItersBeforeEarlyExitintIterations that must run before early exit is allowed.
MaxTiltDegreesfloatRejects candidates that tilt world up by more than this. No-gravity path only.
EstimateScaleboolSolve for uniform scale as well as rotation/translation. Leave false when both devices share physical scale.
SeedintRANSAC random seed. Fixed at 0 by ManualAnchoring.BuildParams() for determinism.

Gravity path (default) and scale-relative thresholds

MemberTypeContract
GravityDirectionFloat3Enables the entire gravity path (yaw voting, floor lock, ICP, relative thresholds) when non-zero.
InlierThresholdRel / GeometryConsistencyRelfloatThresholds as multiples of characteristic length; resolved to absolute values by ResolveSpatialThresholds.
CharacteristicLengthfloatThe length these relative thresholds were last resolved against. Local per-device, not serialized.
LockFloorHeightboolLock vertical translation to the difference in estimated floor heights instead of solving it from correspondences.
UseYawVotingboolUse the single-shot yaw-voting solver instead of per-iteration RANSAC on the gravity path.
UseSegmentCandidatesboolOpt-in third coarse-candidate source (structural segment matching). Off by default.
RefineWithIcpbool / IcpMaxIters intWhether to run gravity-constrained point-to-plane ICP refine, and its iteration cap.

Fine-tier ICP

MemberTypeContract
RefineLocalIcpboolRun the anchor-local second-stage ICP after the global transform is accepted.
AnchorWorldPositionFloat3Source-frame anchor position the fine tier centers on. Required when RefineLocalIcp is on.
FineRadiusfloatRadius the fine-tier ICP considers. 0 = auto.
FineIcpMaxDistRelfloatFine-tier correspondence-rejection distance as a multiple of characteristic length.
FineIcpMaxItersintMax fine-tier ICP iterations.
MinCorrespondenceFractionfloatMinimum fraction of queried points that must associate on ICP’s first pass, or refinement bails out early. 0 disables.

Advanced/experimental

MemberTypeContract
DenseGlobalRefineboolOpt-in post-selection dense whole-cloud ICP re-refine of the already-chosen winner.
DenseGlobalPointBudget / DenseGlobalMaxItersintPoint budget and iteration cap for the dense global refine pass.
MaxDegreeOfParallelismintParallelism for the per-candidate loop. 0 = Environment.ProcessorCount. Perf-only; does not change results.
DescriptorMatchTargetSampleCapintOpt-in stride-subsampling of the target side of descriptor matching. 0 = off (default, every target feature matched).
UseNccOccupancyScore / UseWallNormalCellWeightsboolExperimental occupancy-correlation scoring variants. Off by default.

Licensing and runtime

MemberTypeContract
RequireLicenseboolWhen true, ComputeTransform checks for a valid license before doing any work and returns a clean LicenseRequired result rather than throwing.
OnProgressAction<RegistrationProgress>Optional progress callback, invoked synchronously/inline. Marshaling to a UI thread is the caller’s responsibility.
CancellationTokenCancellationTokenOptional cooperative cancellation, checked between phases and candidates.

Methods

MemberSignatureContract
ResolveSpatialThresholdsRegistrationParams ResolveSpatialThresholds(float characteristicLength)Returns a copy with InlierThreshold/GeometryConsistency resolved to absolute meters against characteristicLength.
ResolveSpatialThresholdsRegistrationParams ResolveSpatialThresholds(float lengthA, float lengthB)Same, resolved against max(lengthA, lengthB) (the coarser of two scans).
Defaultstatic RegistrationParams DefaultThe shipped default configuration: gravity path on, yaw voting on, ICP refine on, EstimateScale = true.

InspectorPreset

src/LansAnchor.Unity/Assets/MeshBasedAnchoring/Anchoring/InspectorPreset.cs:7

ValueMeaning
FastLower compute budget: fewer target features, fewer RANSAC/ICP iterations, looser fit tolerance. Never disables the room tier.
BalancedMatches RegistrationParams.Default/ManualAnchoring’s own field defaults exactly.
PreciseHigher compute budget and tighter fit tolerance than Balanced.
CustomA slider was moved away from its preset’s exact value. Never written by a preset lookup; only detected.

ManualAnchoringPresetMapper

src/LansAnchor.Unity/Assets/MeshBasedAnchoring/Anchoring/ManualAnchoringPresetMapper.cs:27 (nested ThoroughnessValues at :33)

Pure data/logic behind the simple-mode Inspector (preset dropdown plus Thoroughness/Fit Tolerance sliders). Raising Thoroughness makes the algorithm try more candidates; it does not raise the physical accuracy ceiling (see the accuracy writeup).

MemberSignatureContract
ThoroughnessValuesstruct { MaxTargetFeatures, RansacIterations, MinItersBeforeEarlyExit, IcpMaxIters, FineIcpMaxIters }The five fields a Thoroughness setting maps to.
Fast / Balanced / Precisestatic readonly ThoroughnessValuesCanned values for each named preset. Balanced is byte-identical to ManualAnchoring’s own field defaults.
ThoroughnessForstatic ThoroughnessValues ThoroughnessFor(InspectorPreset preset)Looks up the canned values for a named preset (Custom falls back to Balanced).
ThoroughnessForSliderstatic ThoroughnessValues ThoroughnessForSlider(float t)Piecewise-linear interpolation across [0, 1] (0 = Fast, 0.5 = Balanced, 1 = Precise), rounded per field.
MinInlierThreshold / MaxInlierThresholdconst floatHard floor/ceiling (0.05 m / 0.50 m) the Fit Tolerance slider cannot exceed either direction.
FitToleranceForstatic float FitToleranceFor(InspectorPreset preset)Resolves a preset to an InlierThreshold value, clamped to the floor/ceiling above.
FitToleranceForSliderstatic float FitToleranceForSlider(float t)Same resolution, continuous over [0, 1]. Note the direction: 1 (Precise) means a smaller, tighter InlierThreshold, the opposite direction from the Thoroughness slider’s own [0, 1].
ClampInlierThresholdstatic float ClampInlierThreshold(float value)Clamps any value to [MinInlierThreshold, MaxInlierThreshold].
RoomTierForstatic bool RoomTierFor(InspectorPreset preset)Always returns true. Room tier is never disabled by a preset.
SliderValueForstatic float SliderValueFor(InspectorPreset preset)The exact slider position (0, 0.5, or 1) a named preset corresponds to.
DetectPresetstatic InspectorPreset DetectPreset(float thoroughnessSlider, float fitToleranceSlider)Returns the matching named preset if both sliders sit exactly on one, else Custom.

Next

  • Scene setup for a single anchor: Manual anchoring.
  • Scene setup for several rooms: Multi-room anchoring.
  • Reading the fields on DiagnosticInfo in practice: Diagnostics.
  • Why the gate thresholds above are set where they are: the accuracy writeup.