VR Development Framework
v 1.0.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Events Pages
Public Member Functions | Public Attributes | Protected Attributes | Private Member Functions | Private Attributes | List of all members
AVR.Avatar.AVR_PoseNaturalizationFilter Class Reference

A PoseNaturalizationFilter "naturalizes" a pose. For instance, when a player places the controllers on the ground or to the side, the resulting pose will look bizarre and unnatural. These filters will turn the resulting pose into one that seems more natural. More...

Inheritance diagram for AVR.Avatar.AVR_PoseNaturalizationFilter:

Public Member Functions

Vector3 naturalize_point (Vector3 wpos)
 

Public Attributes

int reference_amount = 30
 The amount of points from the point-cloud to use More...
 
int take_k = 4
 How many points to incorporate into the weighted average. More...
 
float smoothing_speed = 10.0f
 how much to smooth motion by More...
 
float interp = 1.0f
 interp = 0 means we dont naturalize at all, interp = 0.5 means the output is 50% input and 50% naturalized position More...
 
List< Vector3 > refpoints
 Pointcloud More...
 

Protected Attributes

Vector3 outpos = Vector3.zero
 

Private Member Functions

void OnEnable ()
 
Vector3 get_weighted_average_reference (Vector3 p)
 

Private Attributes

List< Vector3 > _refpoints
 

Detailed Description

A PoseNaturalizationFilter "naturalizes" a pose. For instance, when a player places the controllers on the ground or to the side, the resulting pose will look bizarre and unnatural. These filters will turn the resulting pose into one that seems more natural.

The filter is based on a recorded point-cloud. The cloud consists of locations relative to the HMD that are "normal". The filter uses a simple weighted average (similar to the kNN algorithm) to produce a more natural result.

Definition at line 21 of file AVR_PoseNaturalizationFilter.cs.