p2s
Version:
A JavaScript 2D physics engine.
1,286 lines (822 loc) • 48.7 kB
HTML
<html lang="en">
<head>
<meta charset="utf-8">
<title>Heightfield - p2.js</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/3.9.1/build/cssgrids/cssgrids-min.css">
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css">
<link rel="stylesheet" href="../assets/css/main.css" id="site_styles">
<link rel="icon" href="../assets/favicon.ico">
<script src="http://yui.yahooapis.com/combo?3.9.1/build/yui/yui-min.js"></script>
</head>
<body class="yui3-skin-sam">
<div id="doc">
<div id="hd" class="yui3-g header">
<div class="yui3-u-3-4">
<h1><img src="../assets/css/logo.png" title="p2.js" width="117" height="52"></h1>
</div>
<div class="yui3-u-1-4 version">
<em>API Docs for: 0.7.1</em>
</div>
</div>
<div id="bd" class="yui3-g">
<div class="yui3-u-1-4">
<div id="docs-sidebar" class="sidebar apidocs">
<div id="api-list">
<h2 class="off-left">APIs</h2>
<div id="api-tabview" class="tabview">
<ul class="tabs">
<li><a href="#api-classes">Classes</a></li>
<li><a href="#api-modules">Modules</a></li>
</ul>
<div id="api-tabview-filter">
<input type="search" id="api-filter" placeholder="Type to filter APIs">
</div>
<div id="api-tabview-panel">
<ul id="api-classes" class="apis classes">
<li><a href="../classes/AABB.html">AABB</a></li>
<li><a href="../classes/AngleLockEquation.html">AngleLockEquation</a></li>
<li><a href="../classes/Body.html">Body</a></li>
<li><a href="../classes/Box.html">Box</a></li>
<li><a href="../classes/Broadphase.html">Broadphase</a></li>
<li><a href="../classes/Capsule.html">Capsule</a></li>
<li><a href="../classes/Circle.html">Circle</a></li>
<li><a href="../classes/Constraint.html">Constraint</a></li>
<li><a href="../classes/ContactEquation.html">ContactEquation</a></li>
<li><a href="../classes/ContactMaterial.html">ContactMaterial</a></li>
<li><a href="../classes/Convex.html">Convex</a></li>
<li><a href="../classes/DistanceConstraint.html">DistanceConstraint</a></li>
<li><a href="../classes/Equation.html">Equation</a></li>
<li><a href="../classes/EventEmitter.html">EventEmitter</a></li>
<li><a href="../classes/FrictionEquation.html">FrictionEquation</a></li>
<li><a href="../classes/GearConstraint.html">GearConstraint</a></li>
<li><a href="../classes/GSSolver.html">GSSolver</a></li>
<li><a href="../classes/Heightfield.html">Heightfield</a></li>
<li><a href="../classes/Island.html">Island</a></li>
<li><a href="../classes/IslandManager.html">IslandManager</a></li>
<li><a href="../classes/IslandNode.html">IslandNode</a></li>
<li><a href="../classes/Line.html">Line</a></li>
<li><a href="../classes/LinearSpring.html">LinearSpring</a></li>
<li><a href="../classes/LockConstraint.html">LockConstraint</a></li>
<li><a href="../classes/Material.html">Material</a></li>
<li><a href="../classes/NaiveBroadphase.html">NaiveBroadphase</a></li>
<li><a href="../classes/Narrowphase.html">Narrowphase</a></li>
<li><a href="../classes/Object pooling utility..html">Object pooling utility.</a></li>
<li><a href="../classes/OverlapKeeper.html">OverlapKeeper</a></li>
<li><a href="../classes/OverlapKeeperRecord.html">OverlapKeeperRecord</a></li>
<li><a href="../classes/Particle.html">Particle</a></li>
<li><a href="../classes/Plane.html">Plane</a></li>
<li><a href="../classes/PrismaticConstraint.html">PrismaticConstraint</a></li>
<li><a href="../classes/Ray.html">Ray</a></li>
<li><a href="../classes/RaycastResult.html">RaycastResult</a></li>
<li><a href="../classes/RevoluteConstraint.html">RevoluteConstraint</a></li>
<li><a href="../classes/RotationalLockEquation.html">RotationalLockEquation</a></li>
<li><a href="../classes/.html"></a></li>
<li><a href="../classes/RotationalSpring.html">RotationalSpring</a></li>
<li><a href="../classes/RotationalVelocityEquation.html">RotationalVelocityEquation</a></li>
<li><a href="../classes/SAPBroadphase.html">SAPBroadphase</a></li>
<li><a href="../classes/Shape.html">Shape</a></li>
<li><a href="../classes/Solver.html">Solver</a></li>
<li><a href="../classes/Spring.html">Spring</a></li>
<li><a href="../classes/TopDownVehicle.html">TopDownVehicle</a></li>
<li><a href="../classes/TupleDictionary.html">TupleDictionary</a></li>
<li><a href="../classes/Utils.html">Utils</a></li>
<li><a href="../classes/vec2.html">vec2</a></li>
<li><a href="../classes/WheelConstraint.html">WheelConstraint</a></li>
<li><a href="../classes/World.html">World</a></li>
</ul>
<ul id="api-modules" class="apis modules">
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="yui3-u-3-4">
<div id="api-options">
Show:
<label for="api-show-inherited">
<input type="checkbox" id="api-show-inherited" checked>
Inherited
</label>
<label for="api-show-protected">
<input type="checkbox" id="api-show-protected">
Protected
</label>
<label for="api-show-private">
<input type="checkbox" id="api-show-private">
Private
</label>
<label for="api-show-deprecated">
<input type="checkbox" id="api-show-deprecated">
Deprecated
</label>
</div>
<div class="apidocs">
<div id="docs-main">
<div class="content">
<h1>Heightfield Class</h1>
<div class="box meta">
<div class="extends">
Extends <a href="../classes/Shape.html" class="crosslink">Shape</a>
</div>
<div class="foundat">
Defined in: <a href="../files/src_shapes_Heightfield.js.html#l7"><code>src/shapes/Heightfield.js:7</code></a>
</div>
</div>
<div class="box intro">
<p>Heightfield shape class. Height data is given as an array. These data points are spread out evenly with a distance "elementWidth".</p>
</div>
<div class="constructor">
<h2>Constructor</h2>
<div id="method_Heightfield" class="method item">
<h3 class="name"><code>Heightfield</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code class="optional">[options]</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="../files/src_shapes_Heightfield.js.html#l7"><code>src/shapes/Heightfield.js:7</code></a>
</p>
</div>
<div class="description">
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name optional">[options]</code>
<span class="type">Object</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>(Note that this options object will be passed on to the <a href="../classes/Shape.html" class="crosslink">Shape</a> constructor.)</p>
</div>
<ul class="params-list">
<li class="param">
<code class="param-name optional">[heights]</code>
<span class="type">Array</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>An array of Y values that will be used to construct the terrain.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[minValue]</code>
<span class="type">Number</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Minimum value of the data points in the data array. Will be computed automatically if not given.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[maxValue]</code>
<span class="type">Number</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>Maximum value.</p>
</div>
</li>
<li class="param">
<code class="param-name optional">[elementWidth=0.1]</code>
<span class="type">Number</span>
<span class="flag optional" title="This parameter is optional.">optional</span>
<div class="param-description">
<p>World spacing between the data points in X direction.</p>
</div>
</li>
</ul>
</li>
</ul>
</div>
<div class="example">
<h4>Example:</h4>
<div class="example-content">
<pre class="code prettyprint"><code>// Generate some height data (y-values).
var heights = [];
for(var i = 0; i < 1000; i++){
var y = 0.5 * Math.cos(0.2 * i);
heights.push(y);
}
// Create the heightfield shape
var heightfieldShape = new Heightfield({
heights: heights,
elementWidth: 1 // Distance between the data points in X direction
});
var heightfieldBody = new Body();
heightfieldBody.addShape(heightfieldShape);
world.addBody(heightfieldBody);
</code></pre>
</div>
</div>
</div>
</div>
<div id="classdocs" class="tabview">
<ul class="api-class-tabs">
<li class="api-class-tab index"><a href="#index">Index</a></li>
<li class="api-class-tab methods"><a href="#methods">Methods</a></li>
<li class="api-class-tab properties"><a href="#properties">Properties</a></li>
</ul>
<div>
<div id="index" class="api-class-tabpanel index">
<h2 class="off-left">Item Index</h2>
<div class="index-section methods">
<h3>Methods</h3>
<ul class="index-list methods extends">
<li class="index-item method inherited">
<a href="#method_computeAABB">computeAABB</a>
</li>
<li class="index-item method inherited">
<a href="#method_computeMomentOfInertia">computeMomentOfInertia</a>
</li>
<li class="index-item method">
<a href="#method_getLineSegment">getLineSegment</a>
</li>
<li class="index-item method inherited">
<a href="#method_raycast">raycast</a>
</li>
<li class="index-item method inherited">
<a href="#method_updateArea">updateArea</a>
</li>
<li class="index-item method inherited">
<a href="#method_updateBoundingRadius">updateBoundingRadius</a>
</li>
<li class="index-item method">
<a href="#method_updateMaxMinValues">updateMaxMinValues</a>
</li>
</ul>
</div>
<div class="index-section properties">
<h3>Properties</h3>
<ul class="index-list properties extends">
<li class="index-item property inherited">
<a href="#property_angle">angle</a>
</li>
<li class="index-item property inherited">
<a href="#property_area">area</a>
</li>
<li class="index-item property inherited">
<a href="#property_body">body</a>
</li>
<li class="index-item property inherited">
<a href="#property_boundingRadius">boundingRadius</a>
</li>
<li class="index-item property inherited">
<a href="#property_collisionGroup">collisionGroup</a>
</li>
<li class="index-item property inherited">
<a href="#property_collisionMask">collisionMask</a>
</li>
<li class="index-item property inherited">
<a href="#property_collisionResponse">collisionResponse</a>
</li>
<li class="index-item property">
<a href="#property_elementWidth">elementWidth</a>
</li>
<li class="index-item property">
<a href="#property_heights">heights</a>
</li>
<li class="index-item property inherited">
<a href="#property_id">id</a>
</li>
<li class="index-item property inherited">
<a href="#property_material">material</a>
</li>
<li class="index-item property">
<a href="#property_maxValue">maxValue</a>
</li>
<li class="index-item property">
<a href="#property_minValue">minValue</a>
</li>
<li class="index-item property inherited">
<a href="#property_position">position</a>
</li>
<li class="index-item property inherited">
<a href="#property_sensor">sensor</a>
</li>
<li class="index-item property inherited">
<a href="#property_type">type</a>
</li>
</ul>
</div>
</div>
<div id="methods" class="api-class-tabpanel">
<h2 class="off-left">Methods</h2>
<div id="method_computeAABB" class="method item">
<h3 class="name"><code>computeAABB</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>out</code>
</li>
<li class="arg">
<code>position</code>
</li>
<li class="arg">
<code>angle</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#method_computeAABB">
Shape
</a>
but overwritten in
<a href="../files/src_shapes_Heightfield.js.html#l137"><code>src/shapes/Heightfield.js:137</code></a>
</p>
</div>
<div class="description">
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">out</code>
<span class="type"><a href="../classes/AABB.html" class="crosslink">AABB</a></span>
<div class="param-description">
<p>The resulting AABB.</p>
</div>
</li>
<li class="param">
<code class="param-name">position</code>
<span class="type">Array</span>
<div class="param-description">
</div>
</li>
<li class="param">
<code class="param-name">angle</code>
<span class="type">Number</span>
<div class="param-description">
</div>
</li>
</ul>
</div>
</div>
<div id="method_computeMomentOfInertia" class="method item">
<h3 class="name"><code>computeMomentOfInertia</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>mass</code>
</li>
</ul><span class="paren">)</span>
</div>
<span class="returns-inline">
<span class="type">Number</span>
</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#method_computeMomentOfInertia">
Shape
</a>
but overwritten in
<a href="../files/src_shapes_Heightfield.js.html#l108"><code>src/shapes/Heightfield.js:108</code></a>
</p>
</div>
<div class="description">
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">mass</code>
<span class="type">Number</span>
<div class="param-description">
</div>
</li>
</ul>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Number</span>:
</div>
</div>
</div>
<div id="method_getLineSegment" class="method item">
<h3 class="name"><code>getLineSegment</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>start</code>
</li>
<li class="arg">
<code>end</code>
</li>
<li class="arg">
<code>i</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>
Defined in
<a href="../files/src_shapes_Heightfield.js.html#l151"><code>src/shapes/Heightfield.js:151</code></a>
</p>
</div>
<div class="description">
<p>Get a line segment in the heightfield</p>
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">start</code>
<span class="type">Array</span>
<div class="param-description">
<p>Where to store the resulting start point</p>
</div>
</li>
<li class="param">
<code class="param-name">end</code>
<span class="type">Array</span>
<div class="param-description">
<p>Where to store the resulting end point</p>
</div>
</li>
<li class="param">
<code class="param-name">i</code>
<span class="type">Number</span>
<div class="param-description">
</div>
</li>
</ul>
</div>
</div>
<div id="method_raycast" class="method item">
<h3 class="name"><code>raycast</code></h3>
<div class="args">
<span class="paren">(</span><ul class="args-list inline commas">
<li class="arg">
<code>result</code>
</li>
<li class="arg">
<code>ray</code>
</li>
<li class="arg">
<code>position</code>
</li>
<li class="arg">
<code>angle</code>
</li>
</ul><span class="paren">)</span>
</div>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#method_raycast">
Shape
</a>
but overwritten in
<a href="../files/src_shapes_Heightfield.js.html#l205"><code>src/shapes/Heightfield.js:205</code></a>
</p>
</div>
<div class="description">
</div>
<div class="params">
<h4>Parameters:</h4>
<ul class="params-list">
<li class="param">
<code class="param-name">result</code>
<span class="type">RayResult</span>
<div class="param-description">
</div>
</li>
<li class="param">
<code class="param-name">ray</code>
<span class="type"><a href="../classes/Ray.html" class="crosslink">Ray</a></span>
<div class="param-description">
</div>
</li>
<li class="param">
<code class="param-name">position</code>
<span class="type">Array</span>
<div class="param-description">
</div>
</li>
<li class="param">
<code class="param-name">angle</code>
<span class="type">Number</span>
<div class="param-description">
</div>
</li>
</ul>
</div>
</div>
<div id="method_updateArea" class="method item inherited">
<h3 class="name"><code>updateArea</code></h3>
<span class="paren">()</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#method_updateArea">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l215"><code>src/shapes/Shape.js:215</code></a>
</p>
</div>
<div class="description">
<p>Update the .area property of the shape.</p>
</div>
</div>
<div id="method_updateBoundingRadius" class="method item inherited">
<h3 class="name"><code>updateBoundingRadius</code></h3>
<span class="paren">()</span>
<span class="returns-inline">
<span class="type">Number</span>
</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#method_updateBoundingRadius">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l208"><code>src/shapes/Shape.js:208</code></a>
</p>
</div>
<div class="description">
<p>Returns the bounding circle radius of this shape.</p>
</div>
<div class="returns">
<h4>Returns:</h4>
<div class="returns-description">
<span class="type">Number</span>:
</div>
</div>
</div>
<div id="method_updateMaxMinValues" class="method item">
<h3 class="name"><code>updateMaxMinValues</code></h3>
<span class="paren">()</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_shapes_Heightfield.js.html#l87"><code>src/shapes/Heightfield.js:87</code></a>
</p>
</div>
<div class="description">
<p>Update the .minValue and the .maxValue</p>
</div>
</div>
</div>
<div id="properties" class="api-class-tabpanel">
<h2 class="off-left">Properties</h2>
<div id="property_angle" class="property item inherited">
<h3 class="name"><code>angle</code></h3>
<span class="type">Number</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#property_angle">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l36"><code>src/shapes/Shape.js:36</code></a>
</p>
</div>
<div class="description">
<p>Body-local angle of the shape.</p>
</div>
</div>
<div id="property_area" class="property item inherited">
<h3 class="name"><code>area</code></h3>
<span class="type">Number</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#property_area">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l123"><code>src/shapes/Shape.js:123</code></a>
</p>
</div>
<div class="description">
<p>Area of this shape.</p>
</div>
</div>
<div id="property_body" class="property item inherited">
<h3 class="name"><code>body</code></h3>
<span class="type"><a href="../classes/Body.html" class="crosslink">Body</a></span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#property_body">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l21"><code>src/shapes/Shape.js:21</code></a>
</p>
</div>
<div class="description">
<p>The body this shape is attached to. A shape can only be attached to a single body.</p>
</div>
</div>
<div id="property_boundingRadius" class="property item inherited">
<h3 class="name"><code>boundingRadius</code></h3>
<span class="type">Number</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#property_boundingRadius">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l65"><code>src/shapes/Shape.js:65</code></a>
</p>
</div>
<div class="description">
<p>Bounding circle radius of this shape</p>
</div>
</div>
<div id="property_collisionGroup" class="property item inherited">
<h3 class="name"><code>collisionGroup</code></h3>
<span class="type">Number</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#property_collisionGroup">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l72"><code>src/shapes/Shape.js:72</code></a>
</p>
</div>
<div class="description">
<p>Collision group that this shape belongs to (bit mask). See <a href="http://www.aurelienribon.com/blog/2011/07/box2d-tutorial-collision-filtering/">this tutorial</a>.</p>
</div>
<div class="example">
<h4>Example:</h4>
<div class="example-content">
<pre class="code prettyprint"><code>// Setup bits for each available group
var PLAYER = Math.pow(2,0),
ENEMY = Math.pow(2,1),
GROUND = Math.pow(2,2)
// Put shapes into their groups
player1Shape.collisionGroup = PLAYER;
player2Shape.collisionGroup = PLAYER;
enemyShape .collisionGroup = ENEMY;
groundShape .collisionGroup = GROUND;
// Assign groups that each shape collide with.
// Note that the players can collide with ground and enemies, but not with other players.
player1Shape.collisionMask = ENEMY | GROUND;
player2Shape.collisionMask = ENEMY | GROUND;
enemyShape .collisionMask = PLAYER | GROUND;
groundShape .collisionMask = PLAYER | ENEMY;
</code></pre><pre class="code prettyprint"><code>// How collision check is done
if(shapeA.collisionGroup & shapeB.collisionMask)!=0 && (shapeB.collisionGroup & shapeA.collisionMask)!=0){
// The shapes will collide
}
</code></pre>
</div>
</div>
</div>
<div id="property_collisionMask" class="property item inherited">
<h3 class="name"><code>collisionMask</code></h3>
<span class="type">Number</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#property_collisionMask">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l109"><code>src/shapes/Shape.js:109</code></a>
</p>
</div>
<div class="description">
<p>Collision mask of this shape. See .collisionGroup.</p>
</div>
</div>
<div id="property_collisionResponse" class="property item inherited">
<h3 class="name"><code>collisionResponse</code></h3>
<span class="type">Boolean</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#property_collisionResponse">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l103"><code>src/shapes/Shape.js:103</code></a>
</p>
</div>
<div class="description">
<p>Whether to produce contact forces when in contact with other bodies. Note that contacts will be generated, but they will be disabled. That means that this shape will move through other body shapes, but it will still trigger contact events, etc.</p>
</div>
</div>
<div id="property_elementWidth" class="property item">
<h3 class="name"><code>elementWidth</code></h3>
<span class="type">Number</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_shapes_Heightfield.js.html#l71"><code>src/shapes/Heightfield.js:71</code></a>
</p>
</div>
<div class="description">
<p>The width of each element</p>
</div>
</div>
<div id="property_heights" class="property item">
<h3 class="name"><code>heights</code></h3>
<span class="type">Array</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_shapes_Heightfield.js.html#l53"><code>src/shapes/Heightfield.js:53</code></a>
</p>
</div>
<div class="description">
<p>An array of numbers, or height values, that are spread out along the x axis.</p>
</div>
</div>
<div id="property_id" class="property item inherited">
<h3 class="name"><code>id</code></h3>
<span class="type">Number</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#property_id">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l58"><code>src/shapes/Shape.js:58</code></a>
</p>
</div>
<div class="description">
<p>Shape object identifier.</p>
</div>
</div>
<div id="property_material" class="property item inherited">
<h3 class="name"><code>material</code></h3>
<span class="type"><a href="../classes/Material.html" class="crosslink">Material</a></span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#property_material">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l116"><code>src/shapes/Shape.js:116</code></a>
</p>
</div>
<div class="description">
<p>Material to use in collisions for this Shape. If this is set to null, the world will use default material properties instead.</p>
</div>
</div>
<div id="property_maxValue" class="property item">
<h3 class="name"><code>maxValue</code></h3>
<span class="type">Number</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_shapes_Heightfield.js.html#l59"><code>src/shapes/Heightfield.js:59</code></a>
</p>
</div>
<div class="description">
<p>Max value of the heights</p>
</div>
</div>
<div id="property_minValue" class="property item">
<h3 class="name"><code>minValue</code></h3>
<span class="type">Number</span>
<div class="meta">
<p>
Defined in
<a href="../files/src_shapes_Heightfield.js.html#l65"><code>src/shapes/Heightfield.js:65</code></a>
</p>
</div>
<div class="description">
<p>Max value of the heights</p>
</div>
</div>
<div id="property_position" class="property item inherited">
<h3 class="name"><code>position</code></h3>
<span class="type">Array</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#property_position">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l27"><code>src/shapes/Shape.js:27</code></a>
</p>
</div>
<div class="description">
<p>Body-local position of the shape.</p>
</div>
</div>
<div id="property_sensor" class="property item inherited">
<h3 class="name"><code>sensor</code></h3>
<span class="type">Boolean</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#property_sensor">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l130"><code>src/shapes/Shape.js:130</code></a>
</p>
</div>
<div class="description">
<p>Set to true if you want this shape to be a sensor. A sensor does not generate contacts, but it still reports contact events. This is good if you want to know if a shape is overlapping another shape, without them generating contacts.</p>
</div>
</div>
<div id="property_type" class="property item inherited">
<h3 class="name"><code>type</code></h3>
<span class="type">Number</span>
<div class="meta">
<p>Inherited from
<a href="../classes/Shape.html#property_type">Shape</a>:
<a href="../files/src_shapes_Shape.js.html#l42"><code>src/shapes/Shape.js:42</code></a>
</p>
</div>
<div class="description">
<p>The type of the shape. One of:</p>
<ul>
<li><a href="../classes/Shape.html#property_CIRCLE" class="crosslink">Shape.CIRCLE</a></li>
<li><a href="../classes/Shape.html#property_PARTICLE" class="crosslink">Shape.PARTICLE</a></li>
<li><a href="../classes/Shape.html#property_PLANE" class="crosslink">Shape.PLANE</a></li>
<li><a href="../classes/Shape.html#property_CONVEX" class="crosslink">Shape.CONVEX</a></li>
<li><a href="../classes/Shape.html#property_LINE" class="crosslink">Shape.LINE</a></li>
<li><a href="../classes/Shape.html#property_BOX" class="crosslink">Shape.BOX</a></li>
<li><a href="../classes/Shape.html#property_CAPSULE" class="crosslink">Shape.CAPSULE</a></li>
<li><a href="../classes/Shape.html#property_HEIGHTFIELD" class="crosslink">Shape.HEIGHTFIELD</a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="../assets/vendor/prettify/prettify-min.js"></script>
<script>prettyPrint();</script>
<script src="../assets/js/yui-prettify.js"></script>
<script src="../assets/../api.js"></script>
<script src="../assets/js/api-filter.js"></script>
<script src="../assets/js/api-list.js"></script>
<script src="../assets/js/api-search.js"></script>
<script src="../assets/js/apidocs.js"></script>
</body>
</html>