public LinearElasticSystem(float initialValue, float initialVelocity, ElasticExtentProperties <float> extentInfo, ElasticProperties elasticProperties) : base(initialValue, initialVelocity, extentInfo, elasticProperties) { }
/// <summary> /// Initialize system with source info from controllers/hands. /// Left and right handles must both be specified, but this does not /// preclude single-hand interaction when Update() is called. /// </summary> /// <param name="leftHandleStart">World position of "left" handle point.</param> /// <param name="rightHandleStart">World position of "right" handle point.</param> /// <param name="extentInfo">Properties of the linear 1-D elastic extent to be manipulated</param> /// <param name="elasticProperties">Properties of the elastic material/spring.</param> /// <param name="leftHandleVelocity">Optional, initial velocity in 1-dimensional stretch space</param> /// <param name="rightHandleVelocity">Optional, initial velocity in 1-dimensional stretch space</param> public virtual void Setup(Vector3 leftHandleStart, Vector3 rightHandleStart, ElasticExtentProperties <float> extentInfo, ElasticProperties elasticProperties) { isSetup = true; leftInitialPosition = leftHandleStart; rightInitialPosition = rightHandleStart; elasticSystem = new LinearElasticSystem((leftHandleStart - rightHandleStart).magnitude, elasticSystem?.GetCurrentVelocity() ?? 0.0f, extentInfo, elasticProperties); }
public ElasticSystem(T initialValue, T initialVelocity, ElasticExtentProperties <T> extentInfo, ElasticProperties elasticProperties) { this.extentInfo = extentInfo; this.elasticProperties = elasticProperties; currentValue = initialValue; currentVelocity = initialVelocity; }
/// <summary> /// Default constructor; initializes the elastic system with the specified /// initial value, velocity, extent, and elastic properties. /// </summary> public LinearElasticSystem(float initialValue, float initialVelocity, LinearElasticExtent extentInfo, ElasticProperties elasticProperties) { currentValue = initialValue; currentVelocity = initialVelocity; this.extent = extentInfo; this.elasticProperties = elasticProperties; }
/// <summary> /// Default constructor; initializes the elastic system with the specified /// initial value, velocity, extent, and elastic properties. /// </summary> public VolumeElasticSystem(Vector3 initialValue, Vector3 initialVelocity, VolumeElasticExtent extentInfo, ElasticProperties elasticProperties) { currentValue = initialValue; currentVelocity = initialVelocity; this.extent = extentInfo; this.elasticProperties = elasticProperties; }
/// <summary> /// Default constructor; initializes the elastic system with the specified /// initial value, velocity, extent, and elastic properties. /// </summary> public QuaternionElasticSystem(Quaternion initialValue, Quaternion initialVelocity, QuaternionElasticExtent extentInfo, ElasticProperties elasticProperties) { currentValue = initialValue; currentVelocity = initialVelocity; this.extent = extentInfo; this.elasticProperties = elasticProperties; }