Time-step independent exponential smoothing.
When moving at a constant speed: speed * delay = Value - SmoothedVector3.value.
示例#1
0
 public DrawState(PinchDraw parent)
 {
     _parent                 = parent;
     _smoothedPosition       = new SmoothedVector3();
     _smoothedPosition.delay = parent._smoothingDelay;
     _smoothedPosition.reset = true;
 }
示例#2
0
    public DrawStateRPC(Material material, float minSegmentLength, int drawResolution, Color drawColor, float drawRadius, float smoothingDelay)
    {
        _material         = material;
        _minSegmentLength = minSegmentLength;
        _drawResolution   = drawResolution;
        _drawColor        = drawColor;
        _drawRadius       = drawRadius;
        _smoothingDelay   = smoothingDelay;

        _smoothedPosition       = new SmoothedVector3();
        _smoothedPosition.delay = _smoothingDelay;
        _smoothedPosition.reset = true;
    }
示例#3
0
        public PaintLine(Paint parent)
        {
            this.parent   = parent;
            copyMaterials = new Material[parent.materials.Length];
            for (int i = 0; i < copyMaterials.Length; i++)
            {
                copyMaterials [i] = new Material(parent.materials [i].shader);
                copyMaterials [i].CopyPropertiesFromMaterial(parent.materials [i]);
            }
            position       = new SmoothedVector3();
            position.delay = 0.05f;
            position.reset = true;
            previousRings  = new Vector3[2];
            previousNormal = new Vector3(0f, 0f, 0f);

            vertices = new List <Vector3> ();
            indices  = new List <int> ();
            uvs      = new List <Vector2> ();
            //colors = new List<Color>();
        }
示例#4
0
 void Awake()
 {
     WristGraphicsOff();
     smoothedPosition = new SmoothedVector3 ();
     smoothedRotation = new SmoothedQuaternion ();
 }
示例#5
0
            public DrawState(PinchDraw parent)
            {
                _parent = parent;

                _smoothedPosition = new SmoothedVector3();
                _smoothedPosition.delay = parent._smoothingDelay;
                _smoothedPosition.reset = true;
            }
	void Awake()
	{
		_smoothedFloat = new SmoothedFloat( 0f, 2f );
		_smoothedVector3 = new SmoothedVector3( cubeTransform.position, 0.5f );
	}
示例#7
0
 void Awake()
 {
     WristGraphicsOff();
     smoothedPosition = new SmoothedVector3();
     smoothedRotation = new SmoothedQuaternion();
 }
示例#8
0
 void Awake()
 {
     _smoothedFloat   = new SmoothedFloat(0f, 2f);
     _smoothedVector3 = new SmoothedVector3(cubeTransform.position, 0.5f);
 }