ํŽธ์ง‘

๋‹ค์Œ์„ ํ†ตํ•ด ๊ณต์œ 


StabilizedRay Class

Definition

A ray whose position and direction are stabilized in a way similar to how gaze stabilization works in HoloLens.

The ray uses Anatolie Gavrulic's "DynamicExpDecay" filter to stabilize the ray this filter adjusts its smoothing factor based on the velocity of the filtered object

The formula is Y_smooted += โˆ†๐‘Œ_๐‘Ÿ where ใ€–โˆ†๐‘Œ_๐‘Ÿ=โˆ†๐‘Œโˆ—ใ€–0.5ใ€—^(โˆ†๐‘Œ/ใ€–Halflifeใ€—)

In code, LERP(signal, oldValue, POW(0.5, ABS(signal โ€“ oldValue) / hl)

public ref class StabilizedRay
public class StabilizedRay
type StabilizedRay = class
Public Class StabilizedRay
Inheritance
StabilizedRay

Constructors

StabilizedRay(Single)

HalfLife closer to zero means lerp closer to one.

Properties

HalfLifeDirection

Half life used for velocity decay calculations.

HalfLifePosition

Half life used for position decay calculations.

StabilizedDirection

Computed stabilized direction.

StabilizedPosition

Computed Stabilized position.

Methods

AddSample(Ray)

Add sample to ray stabilizer.

DynamicExpCoefficient(Single, Single)

Compute dynamic exponential coefficient.

DynamicExpDecay(Vector3, Vector3, Single)

Compute stabilized vector3 given a previously stabilized value, and a new sample, given a half life.

Applies to