<!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width, height=device-height, initial-scale=1, user-scalable=no"><meta name="description" content="API docs for the SpringSimulation class from the physics library, for the Dart programming language."><title>SpringSimulation class - physics library - Dart API</title><!-- required because all the links are pseudo-absolute --><base href=".."><link href="https://fonts.googleapis.com/css?family=Source+Code+Pro:500,400i,400,300|Source+Sans+Pro:400,300,700" rel="stylesheet"><link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet"><link rel="stylesheet" href="static-assets/github.css"><link rel="stylesheet" href="static-assets/styles.css"><link rel="icon" href="static-assets/favicon.png"></head><body><div id="overlay-under-drawer"></div><header id="title"><button id="sidenav-left-toggle" type="button"> </button><ol class="breadcrumbs gt-separated dark hidden-xs"><li><a href="index.html">flutter</a></li><li><a href="physics/physics-library.html">physics</a></li><li class="self-crumb">SpringSimulation class</li></ol><div class="self-name">SpringSimulation</div><form class="search navbar-right" role="search"><input type="text" id="search-box" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search..."></form></header><main><div id="dartdoc-sidebar-left" class="col-xs-6 col-sm-3 col-md-2 sidebar sidebar-offcanvas-left"><header id="header-search-sidebar" class="hidden-l"><form class="search-sidebar" role="search"><input type="text" id="search-sidebar" autocomplete="off" disabled class="form-control typeahead" placeholder="Loading search..."></form></header><ol class="breadcrumbs gt-separated dark hidden-l" id="sidebar-nav"><li><a href="index.html">flutter</a></li><li><a href="physics/physics-library.html">physics</a></li><li class="self-crumb">SpringSimulation class</li></ol><h5>physics library</h5><ol><li class="section-title"><a href="physics/physics-library.html#classes">Classes</a></li><li><a href="physics/BoundedFrictionSimulation-class.html">BoundedFrictionSimulation</a></li><li><a href="physics/ClampedSimulation-class.html">ClampedSimulation</a></li><li><a href="physics/FrictionSimulation-class.html">FrictionSimulation</a></li><li><a href="physics/GravitySimulation-class.html">GravitySimulation</a></li><li><a href="physics/ScrollSpringSimulation-class.html">ScrollSpringSimulation</a></li><li><a href="physics/Simulation-class.html">Simulation</a></li><li><a href="physics/SpringDescription-class.html">SpringDescription</a></li><li><a href="physics/SpringSimulation-class.html">SpringSimulation</a></li><li><a href="physics/Tolerance-class.html">Tolerance</a></li><li class="section-title"><a href="physics/physics-library.html#functions">Functions</a></li><li><a href="physics/nearEqual.html">nearEqual</a></li><li><a href="physics/nearZero.html">nearZero</a></li><li class="section-title"><a href="physics/physics-library.html#enums">Enums</a></li><li><a href="physics/SpringType-class.html">SpringType</a></li></ol></div><div id="dartdoc-main-content" class="col-xs-12 col-sm-9 col-md-8 main-content"><div><h1><span class="kind-class">SpringSimulation</span> class </h1></div><section class="desc markdown"><p>A spring simulation.</p><p>Models a particle attached to a spring that follows Hooke's law.</p></section><section><dl class="dl-horizontal"><dt>Inheritance</dt><dd><ul class="gt-separated dark clazz-relationships"><li><a href="dart-core/Object-class.html">Object</a></li><li><a href="physics/Simulation-class.html">Simulation</a></li><li>SpringSimulation</li></ul></dd><dt>Implementers</dt><dd><ul class="comma-separated clazz-relationships"><li><a href="physics/ScrollSpringSimulation-class.html">ScrollSpringSimulation</a></li></ul></dd></dl></section><section class="summary offset-anchor" id="constructors"><h2>Constructors</h2><dl class="constructor-summary-list"><dt id="SpringSimulation" class="callable"><span class="name"><a href="physics/SpringSimulation/SpringSimulation.html">SpringSimulation</a></span><span class="signature">(<span class="parameter" id="-param-spring"><span class="type-annotation"><a href="physics/SpringDescription-class.html">SpringDescription</a></span> <span class="parameter-name">spring</span>, </span> <span class="parameter" id="-param-start"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">start</span>, </span> <span class="parameter" id="-param-end"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">end</span>, </span> <span class="parameter" id="-param-velocity"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">velocity</span>, {</span> <span class="parameter" id="-param-tolerance"><span class="type-annotation"><a href="physics/Tolerance-class.html">Tolerance</a></span> <span class="parameter-name">tolerance</span>: <span class="default-value">Tolerance.defaultTolerance</span></span> })</span></dt><dd>Creates a spring simulation from the provided spring description, startdistance, end distance, and initial velocity. <a href="physics/SpringSimulation/SpringSimulation.html">[...]</a></dd></dl></section><section class="summary offset-anchor" id="instance-properties"><h2>Properties</h2><dl class="properties"><dt id="type" class="property"><span class="name"><a href="physics/SpringSimulation/type.html">type</a></span><span class="signature">→ <a href="physics/SpringType-class.html">SpringType</a></span></dt><dd>The kind of spring being simulated, for debugging purposes. <a href="physics/SpringSimulation/type.html">[...]</a><div class="features">read-only</div></dd><dt id="hashCode" class="property inherited"><span class="name"><a href="dart-core/Object/hashCode.html">hashCode</a></span><span class="signature">→ <a href="dart-core/int-class.html">int</a></span></dt><dd class="inherited">The hash code for this object. <a href="dart-core/Object/hashCode.html">[...]</a><div class="features">read-only, inherited</div></dd><dt id="runtimeType" class="property inherited"><span class="name"><a href="dart-core/Object/runtimeType.html">runtimeType</a></span><span class="signature">→ <a href="dart-core/Type-class.html">Type</a></span></dt><dd class="inherited">A representation of the runtime type of the object.<div class="features">read-only, inherited</div></dd><dt id="tolerance" class="property inherited"><span class="name"><a href="physics/Simulation/tolerance.html">tolerance</a></span><span class="signature">↔ <a href="physics/Tolerance-class.html">Tolerance</a></span></dt><dd class="inherited">How close to the actual end of the simulation a value at a particular timemust be before <a href="physics/SpringSimulation/isDone.html">isDone</a> considers the simulation to be "done". <a href="physics/Simulation/tolerance.html">[...]</a><div class="features">read / write, inherited</div></dd></dl></section><section class="summary offset-anchor" id="instance-methods"><h2>Methods</h2><dl class="callables"><dt id="dx" class="callable"><span class="name"><a href="physics/SpringSimulation/dx.html">dx</a></span><span class="signature">(<wbr><span class="parameter" id="dx-param-time"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">time</span></span>)<span class="returntype parameter">→ <a href="dart-core/double-class.html">double</a></span></span></dt><dd>The velocity of the object in the simulation at the given time.<div class="features">override</div></dd><dt id="isDone" class="callable"><span class="name"><a href="physics/SpringSimulation/isDone.html">isDone</a></span><span class="signature">(<wbr><span class="parameter" id="isDone-param-time"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">time</span></span>)<span class="returntype parameter">→ <a href="dart-core/bool-class.html">bool</a></span></span></dt><dd>Whether the simulation is "done" at the given time.<div class="features">override</div></dd><dt id="toString" class="callable"><span class="name"><a href="physics/SpringSimulation/toString.html">toString</a></span><span class="signature">(<wbr>)<span class="returntype parameter">→ <a href="dart-core/String-class.html">String</a></span></span></dt><dd>Returns a string representation of this object.<div class="features">override</div></dd><dt id="x" class="callable"><span class="name"><a href="physics/SpringSimulation/x.html">x</a></span><span class="signature">(<wbr><span class="parameter" id="x-param-time"><span class="type-annotation"><a href="dart-core/double-class.html">double</a></span> <span class="parameter-name">time</span></span>)<span class="returntype parameter">→ <a href="dart-core/double-class.html">double</a></span></span></dt><dd>The position of the object in the simulation at the given time.<div class="features">override</div></dd><dt id="noSuchMethod" class="callable inherited"><span class="name"><a href="dart-core/Object/noSuchMethod.html">noSuchMethod</a></span><span class="signature">(<wbr><span class="parameter" id="noSuchMethod-param-invocation"><span class="type-annotation"><a href="dart-core/Invocation-class.html">Invocation</a></span> <span class="parameter-name">invocation</span></span>)<span class="returntype parameter">→ dynamic</span></span></dt><dd class="inherited">Invoked when a non-existent method or property is accessed. <a href="dart-core/Object/noSuchMethod.html">[...]</a><div class="features">inherited</div></dd></dl></section><section class="summary offset-anchor inherited" id="operators"><h2>Operators</h2><dl class="callables"><dt id="operator ==" class="callable inherited"><span class="name"><a href="dart-core/Object/operator_equals.html">operator ==</a></span><span class="signature">(<wbr><span class="parameter" id="==-param-other"><span class="type-annotation">dynamic</span> <span class="parameter-name">other</span></span>)<span class="returntype parameter">→ <a href="dart-core/bool-class.html">bool</a></span></span></dt><dd class="inherited">The equality operator. <a href="dart-core/Object/operator_equals.html">[...]</a><div class="features">inherited</div></dd></dl></section></div> <!-- /.main-content --><div id="dartdoc-sidebar-right" class="col-xs-6 col-sm-6 col-md-2 sidebar sidebar-offcanvas-right"><ol><li class="section-title"><a href="physics/SpringSimulation-class.html#constructors">Constructors</a></li><li><a href="physics/SpringSimulation/SpringSimulation.html">SpringSimulation</a></li><li class="section-title"><a href="physics/SpringSimulation-class.html#instance-properties">Properties</a></li><li><a href="physics/SpringSimulation/type.html">type</a></li><li class="inherited"><a href="dart-core/Object/hashCode.html">hashCode</a></li><li class="inherited"><a href="dart-core/Object/runtimeType.html">runtimeType</a></li><li class="inherited"><a href="physics/Simulation/tolerance.html">tolerance</a></li><li class="section-title"><a href="physics/SpringSimulation-class.html#instance-methods">Methods</a></li><li><a href="physics/SpringSimulation/dx.html">dx</a></li><li><a href="physics/SpringSimulation/isDone.html">isDone</a></li><li><a href="physics/SpringSimulation/toString.html">toString</a></li><li><a href="physics/SpringSimulation/x.html">x</a></li><li class="inherited"><a href="dart-core/Object/noSuchMethod.html">noSuchMethod</a></li><li class="section-title inherited"><a href="physics/SpringSimulation-class.html#operators">Operators</a></li><li class="inherited"><a href="dart-core/Object/operator_equals.html">operator ==</a></li></ol></div><!--/.sidebar-offcanvas--></main><footer><span class="no-break">flutter 0.0.0-unknown</span></footer><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script><script src="static-assets/typeahead.bundle.min.js"></script><script src="static-assets/highlight.pack.js"></script><script src="static-assets/URI.js"></script><script src="static-assets/script.js"></script></body></html>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。