Files
esengine/source/docs/classes/_physics_shapes_box_.es.box.html
2020-11-20 14:07:34 +08:00

1050 lines
65 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Box | @esengine/egret-framework</title>
<meta name="description" content="Documentation for @esengine/egret-framework">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="../assets/css/main.css">
</head>
<body>
<header>
<div class="tsd-page-toolbar">
<div class="container">
<div class="table-wrap">
<div class="table-cell" id="tsd-search" data-index="../assets/js/search.json" data-base="..">
<div class="field">
<label for="tsd-search-field" class="tsd-widget search no-caption">Search</label>
<input id="tsd-search-field" type="text" />
</div>
<ul class="results">
<li class="state loading">Preparing search index...</li>
<li class="state failure">The search index is not available</li>
</ul>
<a href="../index.html" class="title">@esengine/egret-framework</a>
</div>
<div class="table-cell" id="tsd-widgets">
<div id="tsd-filter">
<a href="#" class="tsd-widget options no-caption" data-toggle="options">Options</a>
<div class="tsd-filter-group">
<div class="tsd-select" id="tsd-filter-visibility">
<span class="tsd-select-label">All</span>
<ul class="tsd-select-list">
<li data-value="public">Public</li>
<li data-value="protected">Public/Protected</li>
<li data-value="private" class="selected">All</li>
</ul>
</div>
<input type="checkbox" id="tsd-filter-inherited" checked />
<label class="tsd-widget" for="tsd-filter-inherited">Inherited</label>
<input type="checkbox" id="tsd-filter-externals" checked />
<label class="tsd-widget" for="tsd-filter-externals">Externals</label>
<input type="checkbox" id="tsd-filter-only-exported" />
<label class="tsd-widget" for="tsd-filter-only-exported">Only exported</label>
</div>
</div>
<a href="#" class="tsd-widget menu no-caption" data-toggle="menu">Menu</a>
</div>
</div>
</div>
</div>
<div class="tsd-page-title">
<div class="container">
<ul class="tsd-breadcrumb">
<li>
<a href="../globals.html">Globals</a>
</li>
<li>
<a href="../modules/_physics_shapes_box_.html">&quot;Physics/Shapes/Box&quot;</a>
</li>
<li>
<a href="../modules/_physics_shapes_box_.es.html">es</a>
</li>
<li>
<a href="_physics_shapes_box_.es.box.html">Box</a>
</li>
</ul>
<h1>Class Box</h1>
</div>
</div>
</header>
<div class="container container-main">
<div class="row">
<div class="col-8 col-content">
<section class="tsd-panel tsd-comment">
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>多边形的特殊情况。在进行SAT碰撞检查时我们只需要检查2个轴而不是8个轴</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<a href="_physics_shapes_polygon_.es.polygon.html" class="tsd-signature-type">Polygon</a>
<ul class="tsd-hierarchy">
<li>
<span class="target">Box</span>
</li>
</ul>
</li>
</ul>
</section>
<section class="tsd-panel-group tsd-index-group">
<h2>Index</h2>
<section class="tsd-panel tsd-index-panel">
<div class="tsd-index-content">
<section class="tsd-index-section ">
<h3>Constructors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite"><a href="_physics_shapes_box_.es.box.html#constructor" class="tsd-kind-icon">constructor</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Properties</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#_areedgenormalsdirty" class="tsd-kind-icon">_are<wbr>Edge<wbr>Normals<wbr>Dirty</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#_edgenormals" class="tsd-kind-icon">_edge<wbr>Normals</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#_originalpoints" class="tsd-kind-icon">_original<wbr>Points</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#_polygoncenter" class="tsd-kind-icon">_polygon<wbr>Center</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#bounds" class="tsd-kind-icon">bounds</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#center" class="tsd-kind-icon">center</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="_physics_shapes_box_.es.box.html#height" class="tsd-kind-icon">height</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#isbox" class="tsd-kind-icon">is<wbr>Box</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#isunrotated" class="tsd-kind-icon">is<wbr>Unrotated</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#points" class="tsd-kind-icon">points</a></li>
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#position" class="tsd-kind-icon">position</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="_physics_shapes_box_.es.box.html#width" class="tsd-kind-icon">width</a></li>
</ul>
</section>
<section class="tsd-index-section tsd-is-inherited">
<h3>Accessors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#edgenormals" class="tsd-kind-icon">edge<wbr>Normals</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Methods</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#buildedgenormals" class="tsd-kind-icon">build<wbr>Edge<wbr>Normals</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#collideswithline" class="tsd-kind-icon">collides<wbr>With<wbr>Line</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="_physics_shapes_box_.es.box.html#collideswithshape" class="tsd-kind-icon">collides<wbr>With<wbr>Shape</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="_physics_shapes_box_.es.box.html#containspoint" class="tsd-kind-icon">contains<wbr>Point</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="_physics_shapes_box_.es.box.html#overlaps" class="tsd-kind-icon">overlaps</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite"><a href="_physics_shapes_box_.es.box.html#pointcollideswithshape" class="tsd-kind-icon">point<wbr>Collides<wbr>With<wbr>Shape</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#recalculatebounds" class="tsd-kind-icon">recalculate<wbr>Bounds</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#recalculatecenterandedgenormals" class="tsd-kind-icon">recalculate<wbr>Center<wbr>And<wbr>Edge<wbr>Normals</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><a href="_physics_shapes_box_.es.box.html#setpoints" class="tsd-kind-icon">set<wbr>Points</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="_physics_shapes_box_.es.box.html#updatebox" class="tsd-kind-icon">update<wbr>Box</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-private tsd-is-static"><a href="_physics_shapes_box_.es.box.html#buildbox" class="tsd-kind-icon">build<wbr>Box</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="_physics_shapes_box_.es.box.html#buildsymmetricalpolygon" class="tsd-kind-icon">build<wbr>Symmetrical<wbr>Polygon</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="_physics_shapes_box_.es.box.html#findpolygoncenter" class="tsd-kind-icon">find<wbr>Polygon<wbr>Center</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="_physics_shapes_box_.es.box.html#getclosestpointonpolygontopoint" class="tsd-kind-icon">get<wbr>Closest<wbr>Point<wbr>OnPolygon<wbr>ToPoint</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="_physics_shapes_box_.es.box.html#getfarthestpointindirection" class="tsd-kind-icon">get<wbr>Farthest<wbr>Point<wbr>InDirection</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="_physics_shapes_box_.es.box.html#recenterpolygonverts" class="tsd-kind-icon">recenter<wbr>Polygon<wbr>Verts</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static"><a href="_physics_shapes_box_.es.box.html#rotatepolygonverts" class="tsd-kind-icon">rotate<wbr>Polygon<wbr>Verts</a></li>
</ul>
</section>
</div>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Constructors</h2>
<section class="tsd-panel tsd-member tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">new <wbr>Box<span class="tsd-signature-symbol">(</span>width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_physics_shapes_box_.es.box.html" class="tsd-signature-type">Box</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#constructor">constructor</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Box.ts#L8">src/Physics/Shapes/Box.ts:8</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>width: <span class="tsd-signature-type">number</span></h5>
</li>
<li>
<h5>height: <span class="tsd-signature-type">number</span></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="_physics_shapes_box_.es.box.html" class="tsd-signature-type">Box</a></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Properties</h2>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="_areedgenormalsdirty" class="tsd-anchor"></a>
<h3>_are<wbr>Edge<wbr>Normals<wbr>Dirty</h3>
<div class="tsd-signature tsd-kind-icon">_are<wbr>Edge<wbr>Normals<wbr>Dirty<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#_areedgenormalsdirty">_areEdgeNormalsDirty</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L12">src/Physics/Shapes/Polygon.ts:12</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="_edgenormals" class="tsd-anchor"></a>
<h3>_edge<wbr>Normals</h3>
<div class="tsd-signature tsd-kind-icon">_edge<wbr>Normals<span class="tsd-signature-symbol">:</span> <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#_edgenormals">_edgeNormals</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L37">src/Physics/Shapes/Polygon.ts:37</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="_originalpoints" class="tsd-anchor"></a>
<h3>_original<wbr>Points</h3>
<div class="tsd-signature tsd-kind-icon">_original<wbr>Points<span class="tsd-signature-symbol">:</span> <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#_originalpoints">_originalPoints</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L16">src/Physics/Shapes/Polygon.ts:16</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>多边形的原始数据</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="_polygoncenter" class="tsd-anchor"></a>
<h3>_polygon<wbr>Center</h3>
<div class="tsd-signature tsd-kind-icon">_polygon<wbr>Center<span class="tsd-signature-symbol">:</span> <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#_polygoncenter">_polygonCenter</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L17">src/Physics/Shapes/Polygon.ts:17</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="bounds" class="tsd-anchor"></a>
<h3>bounds</h3>
<div class="tsd-signature tsd-kind-icon">bounds<span class="tsd-signature-symbol">:</span> <a href="_math_rectangle_.es.rectangle.html" class="tsd-signature-type">Rectangle</a></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_shape_.es.shape.html">Shape</a>.<a href="_physics_shapes_shape_.es.shape.html#bounds">bounds</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Shape.ts#L16">src/Physics/Shapes/Shape.ts:16</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>缓存的形状边界 内部字段</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="center" class="tsd-anchor"></a>
<h3>center</h3>
<div class="tsd-signature tsd-kind-icon">center<span class="tsd-signature-symbol">:</span> <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_shape_.es.shape.html">Shape</a>.<a href="_physics_shapes_shape_.es.shape.html#center">center</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Shape.ts#L14">src/Physics/Shapes/Shape.ts:14</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>这不是中心。这个值不一定是物体的中心。对撞机更准确。
应用任何转换旋转的localOffset
内部字段</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="height" class="tsd-anchor"></a>
<h3>height</h3>
<div class="tsd-signature tsd-kind-icon">height<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Box.ts#L8">src/Physics/Shapes/Box.ts:8</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="isbox" class="tsd-anchor"></a>
<h3>is<wbr>Box</h3>
<div class="tsd-signature tsd-kind-icon">is<wbr>Box<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#isbox">isBox</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L21">src/Physics/Shapes/Polygon.ts:21</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>用于优化未旋转box碰撞</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="isunrotated" class="tsd-anchor"></a>
<h3>is<wbr>Unrotated</h3>
<div class="tsd-signature tsd-kind-icon">is<wbr>Unrotated<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol"> = true</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#isunrotated">isUnrotated</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L22">src/Physics/Shapes/Polygon.ts:22</a></li>
</ul>
</aside>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="points" class="tsd-anchor"></a>
<h3>points</h3>
<div class="tsd-signature tsd-kind-icon">points<span class="tsd-signature-symbol">:</span> <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#points">points</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L11">src/Physics/Shapes/Polygon.ts:11</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>组成多边形的点
保持顺时针与凸边形</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a name="position" class="tsd-anchor"></a>
<h3>position</h3>
<div class="tsd-signature tsd-kind-icon">position<span class="tsd-signature-symbol">:</span> <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></div>
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_shape_.es.shape.html">Shape</a>.<a href="_physics_shapes_shape_.es.shape.html#position">position</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Shape.ts#L8">src/Physics/Shapes/Shape.ts:8</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>有一个单独的位置字段可以让我们改变形状的位置来进行碰撞检查而不是改变entity.position。
触发碰撞器/边界/散列更新的位置。
内部字段</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-member tsd-kind-property tsd-parent-kind-class">
<a name="width" class="tsd-anchor"></a>
<h3>width</h3>
<div class="tsd-signature tsd-kind-icon">width<span class="tsd-signature-symbol">:</span> <span class="tsd-signature-type">number</span></div>
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Box.ts#L7">src/Physics/Shapes/Box.ts:7</a></li>
</ul>
</aside>
</section>
</section>
<section class="tsd-panel-group tsd-member-group tsd-is-inherited">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a name="edgenormals" class="tsd-anchor"></a>
<h3>edge<wbr>Normals</h3>
<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon"><span class="tsd-signature-symbol">get</span> edgeNormals<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#edgenormals">edgeNormals</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L43">src/Physics/Shapes/Polygon.ts:43</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>边缘法线用于SAT碰撞检测。缓存它们用于避免squareRoots
box只有两个边缘 因为其他两边是平行的</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></h4>
</li>
</ul>
</section>
</section>
<section class="tsd-panel-group tsd-member-group ">
<h2>Methods</h2>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="buildedgenormals" class="tsd-anchor"></a>
<h3>build<wbr>Edge<wbr>Normals</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">build<wbr>Edge<wbr>Normals<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#buildedgenormals">buildEdgeNormals</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L76">src/Physics/Shapes/Polygon.ts:76</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>建立多边形边缘法线
它们仅由edgeNormals getter惰性创建和更新</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited">
<a name="collideswithline" class="tsd-anchor"></a>
<h3>collides<wbr>With<wbr>Line</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">collides<wbr>With<wbr>Line<span class="tsd-signature-symbol">(</span>start<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a>, end<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a>, hit<span class="tsd-signature-symbol">: </span><a href="_physics_raycasthit_.es.raycasthit.html" class="tsd-signature-type">RaycastHit</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#collideswithline">collidesWithLine</a></p>
<p>Overrides <a href="_physics_shapes_shape_.es.shape.html">Shape</a>.<a href="_physics_shapes_shape_.es.shape.html#collideswithline">collidesWithLine</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L296">src/Physics/Shapes/Polygon.ts:296</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>start: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></h5>
</li>
<li>
<h5>end: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></h5>
</li>
<li>
<h5>hit: <a href="_physics_raycasthit_.es.raycasthit.html" class="tsd-signature-type">RaycastHit</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a name="collideswithshape" class="tsd-anchor"></a>
<h3>collides<wbr>With<wbr>Shape</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">collides<wbr>With<wbr>Shape<span class="tsd-signature-symbol">(</span>other<span class="tsd-signature-symbol">: </span><a href="_physics_shapes_shape_.es.shape.html" class="tsd-signature-type">Shape</a>, result<span class="tsd-signature-symbol">: </span><a href="_physics_shapes_collisionresult_.es.collisionresult.html" class="tsd-signature-type">CollisionResult</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#collideswithshape">collidesWithShape</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Box.ts#L69">src/Physics/Shapes/Box.ts:69</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>other: <a href="_physics_shapes_shape_.es.shape.html" class="tsd-signature-type">Shape</a></h5>
</li>
<li>
<h5>result: <a href="_physics_shapes_collisionresult_.es.collisionresult.html" class="tsd-signature-type">CollisionResult</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a name="containspoint" class="tsd-anchor"></a>
<h3>contains<wbr>Point</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">contains<wbr>Point<span class="tsd-signature-symbol">(</span>point<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#containspoint">containsPoint</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Box.ts#L80">src/Physics/Shapes/Box.ts:80</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>point: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a name="overlaps" class="tsd-anchor"></a>
<h3>overlaps</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">overlaps<span class="tsd-signature-symbol">(</span>other<span class="tsd-signature-symbol">: </span><a href="_physics_shapes_shape_.es.shape.html" class="tsd-signature-type">Shape</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#overlaps">overlaps</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Box.ts#L56">src/Physics/Shapes/Box.ts:56</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>other: <a href="_physics_shapes_shape_.es.shape.html" class="tsd-signature-type">Shape</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a name="pointcollideswithshape" class="tsd-anchor"></a>
<h3>point<wbr>Collides<wbr>With<wbr>Shape</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<li class="tsd-signature tsd-kind-icon">point<wbr>Collides<wbr>With<wbr>Shape<span class="tsd-signature-symbol">(</span>point<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a>, result<span class="tsd-signature-symbol">: </span><a href="_physics_shapes_collisionresult_.es.collisionresult.html" class="tsd-signature-type">CollisionResult</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">boolean</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Overrides <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#pointcollideswithshape">pointCollidesWithShape</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Box.ts#L87">src/Physics/Shapes/Box.ts:87</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>point: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></h5>
</li>
<li>
<h5>result: <a href="_physics_shapes_collisionresult_.es.collisionresult.html" class="tsd-signature-type">CollisionResult</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">boolean</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited">
<a name="recalculatebounds" class="tsd-anchor"></a>
<h3>recalculate<wbr>Bounds</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">recalculate<wbr>Bounds<span class="tsd-signature-symbol">(</span>collider<span class="tsd-signature-symbol">: </span><a href="_ecs_components_physics_colliders_collider_.es.collider.html" class="tsd-signature-type">Collider</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#recalculatebounds">recalculateBounds</a></p>
<p>Overrides <a href="_physics_shapes_shape_.es.shape.html">Shape</a>.<a href="_physics_shapes_shape_.es.shape.html#recalculatebounds">recalculateBounds</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L213">src/Physics/Shapes/Polygon.ts:213</a></li>
</ul>
</aside>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>collider: <a href="_ecs_components_physics_colliders_collider_.es.collider.html" class="tsd-signature-type">Collider</a></h5>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="recalculatecenterandedgenormals" class="tsd-anchor"></a>
<h3>recalculate<wbr>Center<wbr>And<wbr>Edge<wbr>Normals</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">recalculate<wbr>Center<wbr>And<wbr>Edge<wbr>Normals<span class="tsd-signature-symbol">(</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#recalculatecenterandedgenormals">recalculateCenterAndEdgeNormals</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L67">src/Physics/Shapes/Polygon.ts:67</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>重新计算多边形中心
如果点数改变必须调用该方法</p>
</div>
</div>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a name="setpoints" class="tsd-anchor"></a>
<h3>set<wbr>Points</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<li class="tsd-signature tsd-kind-icon">set<wbr>Points<span class="tsd-signature-symbol">(</span>points<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#setpoints">setPoints</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L53">src/Physics/Shapes/Polygon.ts:53</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>重置点并重新计算中心和边缘法线</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>points: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></h5>
<div class="tsd-comment tsd-typography">
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class">
<a name="updatebox" class="tsd-anchor"></a>
<h3>update<wbr>Box</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">update<wbr>Box<span class="tsd-signature-symbol">(</span>width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Box.ts#L39">src/Physics/Shapes/Box.ts:39</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>更新框点,重新计算中心,设置宽度/高度</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>width: <span class="tsd-signature-type">number</span></h5>
</li>
<li>
<h5>height: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-private tsd-is-static">
<a name="buildbox" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> <span class="tsd-flag ts-flagPrivate">Private</span> build<wbr>Box</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-private tsd-is-static">
<li class="tsd-signature tsd-kind-icon">build<wbr>Box<span class="tsd-signature-symbol">(</span>width<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, height<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Box.ts#L21">src/Physics/Shapes/Box.ts:21</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>在一个盒子的形状中建立多边形需要的点的帮助方法</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>width: <span class="tsd-signature-type">number</span></h5>
</li>
<li>
<h5>height: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a name="buildsymmetricalpolygon" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> build<wbr>Symmetrical<wbr>Polygon</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<li class="tsd-signature tsd-kind-icon">build<wbr>Symmetrical<wbr>Polygon<span class="tsd-signature-symbol">(</span>vertCount<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, radius<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#buildsymmetricalpolygon">buildSymmetricalPolygon</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L101">src/Physics/Shapes/Polygon.ts:101</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>建立一个对称的多边形(六边形八角形n角形)并返回点</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>vertCount: <span class="tsd-signature-type">number</span></h5>
</li>
<li>
<h5>radius: <span class="tsd-signature-type">number</span></h5>
<div class="tsd-comment tsd-typography">
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">any</span><span class="tsd-signature-symbol">[]</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a name="findpolygoncenter" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> find<wbr>Polygon<wbr>Center</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<li class="tsd-signature tsd-kind-icon">find<wbr>Polygon<wbr>Center<span class="tsd-signature-symbol">(</span>points<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#findpolygoncenter">findPolygonCenter</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L126">src/Physics/Shapes/Polygon.ts:126</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>找到多边形的中心。注意,这对于正则多边形是准确的。不规则多边形没有中心。</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>points: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></h5>
<div class="tsd-comment tsd-typography">
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a name="getclosestpointonpolygontopoint" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> get<wbr>Closest<wbr>Point<wbr>OnPolygon<wbr>ToPoint</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<li class="tsd-signature tsd-kind-icon">get<wbr>Closest<wbr>Point<wbr>OnPolygon<wbr>ToPoint<span class="tsd-signature-symbol">(</span>points<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span>, point<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a>, distanceSquared<span class="tsd-signature-symbol">: </span><a href="_utils_ref_.es.ref.html" class="tsd-signature-type">Ref</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span>, edgeNormal<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#getclosestpointonpolygontopoint">getClosestPointOnPolygonToPoint</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L166">src/Physics/Shapes/Polygon.ts:166</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>迭代多边形的所有边,并得到任意边上离点最近的点。
通过最近点的平方距离和它所在的边的法线返回。
点应该在多边形的空间中(点-多边形.位置)</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>points: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></h5>
</li>
<li>
<h5>point: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></h5>
</li>
<li>
<h5>distanceSquared: <a href="_utils_ref_.es.ref.html" class="tsd-signature-type">Ref</a><span class="tsd-signature-symbol">&lt;</span><span class="tsd-signature-type">number</span><span class="tsd-signature-symbol">&gt;</span></h5>
</li>
<li>
<h5>edgeNormal: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></h5>
<div class="tsd-comment tsd-typography">
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a name="getfarthestpointindirection" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> get<wbr>Farthest<wbr>Point<wbr>InDirection</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<li class="tsd-signature tsd-kind-icon">get<wbr>Farthest<wbr>Point<wbr>InDirection<span class="tsd-signature-symbol">(</span>points<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span>, direction<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#getfarthestpointindirection">getFarthestPointInDirection</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L142">src/Physics/Shapes/Polygon.ts:142</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>不知道辅助顶点所以取每个顶点如果你知道辅助顶点执行climbing算法</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>points: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></h5>
</li>
<li>
<h5>direction: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></h5>
<div class="tsd-comment tsd-typography">
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a name="recenterpolygonverts" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> recenter<wbr>Polygon<wbr>Verts</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<li class="tsd-signature tsd-kind-icon">recenter<wbr>Polygon<wbr>Verts<span class="tsd-signature-symbol">(</span>points<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#recenterpolygonverts">recenterPolygonVerts</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L116">src/Physics/Shapes/Polygon.ts:116</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>重定位多边形的点</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>points: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></h5>
<div class="tsd-comment tsd-typography">
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
<section class="tsd-panel tsd-member tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a name="rotatepolygonverts" class="tsd-anchor"></a>
<h3><span class="tsd-flag ts-flagStatic">Static</span> rotate<wbr>Polygon<wbr>Verts</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<li class="tsd-signature tsd-kind-icon">rotate<wbr>Polygon<wbr>Verts<span class="tsd-signature-symbol">(</span>radians<span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">number</span>, originalPoints<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span>, rotatedPoints<span class="tsd-signature-symbol">: </span><a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><span class="tsd-signature-type">void</span></li>
</ul>
<ul class="tsd-descriptions">
<li class="tsd-description">
<aside class="tsd-sources">
<p>Inherited from <a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>.<a href="_physics_shapes_polygon_.es.polygon.html#rotatepolygonverts">rotatePolygonVerts</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L203">src/Physics/Shapes/Polygon.ts:203</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>旋转原始点并复制旋转的值到旋转的点</p>
</div>
</div>
<h4 class="tsd-parameters-title">Parameters</h4>
<ul class="tsd-parameters">
<li>
<h5>radians: <span class="tsd-signature-type">number</span></h5>
</li>
<li>
<h5>originalPoints: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></h5>
</li>
<li>
<h5>rotatedPoints: <a href="_math_vector2_.es.vector2.html" class="tsd-signature-type">Vector2</a><span class="tsd-signature-symbol">[]</span></h5>
<div class="tsd-comment tsd-typography">
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <span class="tsd-signature-type">void</span></h4>
</li>
</ul>
</section>
</section>
</div>
<div class="col-4 col-menu menu-sticky-wrap menu-highlight">
<nav class="tsd-navigation primary">
<ul>
<li class="globals ">
<a href="../globals.html"><em>Globals</em></a>
</li>
<li class="current tsd-kind-module">
<a href="../modules/_physics_shapes_box_.html">&quot;<wbr>Physics/<wbr>Shapes/<wbr>Box&quot;</a>
<ul>
<li class="current tsd-kind-namespace tsd-parent-kind-module">
<a href="../modules/_physics_shapes_box_.es.html">es</a>
</li>
</ul>
</li>
</ul>
</nav>
<nav class="tsd-navigation secondary menu-sticky">
<ul class="before-current">
</ul>
<ul class="current">
<li class="current tsd-kind-class tsd-parent-kind-namespace">
<a href="_physics_shapes_box_.es.box.html" class="tsd-kind-icon">Box</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class tsd-is-overwrite">
<a href="_physics_shapes_box_.es.box.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#_areedgenormalsdirty" class="tsd-kind-icon">_are<wbr>Edge<wbr>Normals<wbr>Dirty</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#_edgenormals" class="tsd-kind-icon">_edge<wbr>Normals</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#_originalpoints" class="tsd-kind-icon">_original<wbr>Points</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#_polygoncenter" class="tsd-kind-icon">_polygon<wbr>Center</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#bounds" class="tsd-kind-icon">bounds</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#center" class="tsd-kind-icon">center</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="_physics_shapes_box_.es.box.html#height" class="tsd-kind-icon">height</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#isbox" class="tsd-kind-icon">is<wbr>Box</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#isunrotated" class="tsd-kind-icon">is<wbr>Unrotated</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#points" class="tsd-kind-icon">points</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#position" class="tsd-kind-icon">position</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="_physics_shapes_box_.es.box.html#width" class="tsd-kind-icon">width</a>
</li>
<li class=" tsd-kind-get-signature tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#edgenormals" class="tsd-kind-icon">edge<wbr>Normals</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#buildedgenormals" class="tsd-kind-icon">build<wbr>Edge<wbr>Normals</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#collideswithline" class="tsd-kind-icon">collides<wbr>With<wbr>Line</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a href="_physics_shapes_box_.es.box.html#collideswithshape" class="tsd-kind-icon">collides<wbr>With<wbr>Shape</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a href="_physics_shapes_box_.es.box.html#containspoint" class="tsd-kind-icon">contains<wbr>Point</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a href="_physics_shapes_box_.es.box.html#overlaps" class="tsd-kind-icon">overlaps</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite">
<a href="_physics_shapes_box_.es.box.html#pointcollideswithshape" class="tsd-kind-icon">point<wbr>Collides<wbr>With<wbr>Shape</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-overwrite tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#recalculatebounds" class="tsd-kind-icon">recalculate<wbr>Bounds</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#recalculatecenterandedgenormals" class="tsd-kind-icon">recalculate<wbr>Center<wbr>And<wbr>Edge<wbr>Normals</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited">
<a href="_physics_shapes_box_.es.box.html#setpoints" class="tsd-kind-icon">set<wbr>Points</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="_physics_shapes_box_.es.box.html#updatebox" class="tsd-kind-icon">update<wbr>Box</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-private tsd-is-static">
<a href="_physics_shapes_box_.es.box.html#buildbox" class="tsd-kind-icon">build<wbr>Box</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a href="_physics_shapes_box_.es.box.html#buildsymmetricalpolygon" class="tsd-kind-icon">build<wbr>Symmetrical<wbr>Polygon</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a href="_physics_shapes_box_.es.box.html#findpolygoncenter" class="tsd-kind-icon">find<wbr>Polygon<wbr>Center</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a href="_physics_shapes_box_.es.box.html#getclosestpointonpolygontopoint" class="tsd-kind-icon">get<wbr>Closest<wbr>Point<wbr>OnPolygon<wbr>ToPoint</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a href="_physics_shapes_box_.es.box.html#getfarthestpointindirection" class="tsd-kind-icon">get<wbr>Farthest<wbr>Point<wbr>InDirection</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a href="_physics_shapes_box_.es.box.html#recenterpolygonverts" class="tsd-kind-icon">recenter<wbr>Polygon<wbr>Verts</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-inherited tsd-is-static">
<a href="_physics_shapes_box_.es.box.html#rotatepolygonverts" class="tsd-kind-icon">rotate<wbr>Polygon<wbr>Verts</a>
</li>
</ul>
</li>
</ul>
<ul class="after-current">
</ul>
</nav>
</div>
</div>
</div>
<footer class="with-border-bottom">
<div class="container">
<h2>Legend</h2>
<div class="tsd-legend-group">
<ul class="tsd-legend">
<li class="tsd-kind-class"><span class="tsd-kind-icon">Class</span></li>
<li class="tsd-kind-constructor tsd-parent-kind-class"><span class="tsd-kind-icon">Constructor</span></li>
<li class="tsd-kind-property tsd-parent-kind-class"><span class="tsd-kind-icon">Property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class"><span class="tsd-kind-icon">Method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-namespace"><span class="tsd-kind-icon">Namespace</span></li>
<li class="tsd-kind-variable"><span class="tsd-kind-icon">Variable</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-property tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited property</span></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-inherited"><span class="tsd-kind-icon">Inherited method</span></li>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</span></li>
</ul>
</div>
</div>
</footer>
<div class="container tsd-generator">
<p>Generated using <a href="https://typedoc.org/" target="_blank">TypeDoc</a></p>
</div>
<div class="overlay"></div>
<script src="../assets/js/main.js"></script>
<script>if (location.protocol == 'file:') document.write('<script src="../assets/js/search.js"><' + '/script>');</script>
</body>
</html>