Files
esengine/source/docs/classes/_physics_shapes_polygon_.es.polygon.html

953 lines
56 KiB
HTML
Raw Normal View History

2020-11-20 14:07:34 +08:00
<!doctype html>
<html class="default no-js">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Polygon | @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_polygon_.html">&quot;Physics/Shapes/Polygon&quot;</a>
</li>
<li>
<a href="../modules/_physics_shapes_polygon_.es.html">es</a>
</li>
<li>
<a href="_physics_shapes_polygon_.es.polygon.html">Polygon</a>
</li>
</ul>
<h1>Class Polygon</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>多边形</p>
</div>
</div>
</section>
<section class="tsd-panel tsd-hierarchy">
<h3>Hierarchy</h3>
<ul class="tsd-hierarchy">
<li>
<a href="_physics_shapes_shape_.es.shape.html" class="tsd-signature-type">Shape</a>
<ul class="tsd-hierarchy">
<li>
<span class="target">Polygon</span>
<ul class="tsd-hierarchy">
<li>
<a href="_physics_shapes_box_.es.box.html" class="tsd-signature-type">Box</a>
</li>
</ul>
</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"><a href="_physics_shapes_polygon_.es.polygon.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"><a href="_physics_shapes_polygon_.es.polygon.html#_areedgenormalsdirty" class="tsd-kind-icon">_are<wbr>Edge<wbr>Normals<wbr>Dirty</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="_physics_shapes_polygon_.es.polygon.html#_edgenormals" class="tsd-kind-icon">_edge<wbr>Normals</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="_physics_shapes_polygon_.es.polygon.html#_originalpoints" class="tsd-kind-icon">_original<wbr>Points</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="_physics_shapes_polygon_.es.polygon.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_polygon_.es.polygon.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_polygon_.es.polygon.html#center" class="tsd-kind-icon">center</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="_physics_shapes_polygon_.es.polygon.html#isbox" class="tsd-kind-icon">is<wbr>Box</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="_physics_shapes_polygon_.es.polygon.html#isunrotated" class="tsd-kind-icon">is<wbr>Unrotated</a></li>
<li class="tsd-kind-property tsd-parent-kind-class"><a href="_physics_shapes_polygon_.es.polygon.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_polygon_.es.polygon.html#position" class="tsd-kind-icon">position</a></li>
</ul>
</section>
<section class="tsd-index-section ">
<h3>Accessors</h3>
<ul class="tsd-index-list">
<li class="tsd-kind-get-signature tsd-parent-kind-class"><a href="_physics_shapes_polygon_.es.polygon.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"><a href="_physics_shapes_polygon_.es.polygon.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"><a href="_physics_shapes_polygon_.es.polygon.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_polygon_.es.polygon.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_polygon_.es.polygon.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_polygon_.es.polygon.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_polygon_.es.polygon.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"><a href="_physics_shapes_polygon_.es.polygon.html#recalculatebounds" class="tsd-kind-icon">recalculate<wbr>Bounds</a></li>
<li class="tsd-kind-method tsd-parent-kind-class"><a href="_physics_shapes_polygon_.es.polygon.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"><a href="_physics_shapes_polygon_.es.polygon.html#setpoints" class="tsd-kind-icon">set<wbr>Points</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="_physics_shapes_polygon_.es.polygon.html#buildsymmetricalpolygon" class="tsd-kind-icon">build<wbr>Symmetrical<wbr>Polygon</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="_physics_shapes_polygon_.es.polygon.html#findpolygoncenter" class="tsd-kind-icon">find<wbr>Polygon<wbr>Center</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="_physics_shapes_polygon_.es.polygon.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-static"><a href="_physics_shapes_polygon_.es.polygon.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-static"><a href="_physics_shapes_polygon_.es.polygon.html#recenterpolygonverts" class="tsd-kind-icon">recenter<wbr>Polygon<wbr>Verts</a></li>
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><a href="_physics_shapes_polygon_.es.polygon.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">
<a name="constructor" class="tsd-anchor"></a>
<h3>constructor</h3>
<ul class="tsd-signatures tsd-kind-constructor tsd-parent-kind-class">
<li class="tsd-signature tsd-kind-icon">new <wbr>Polygon<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>, isBox<span class="tsd-signature-symbol">?: </span><span class="tsd-signature-type">boolean</span><span class="tsd-signature-symbol">)</span><span class="tsd-signature-symbol">: </span><a href="_physics_shapes_polygon_.es.polygon.html" class="tsd-signature-type">Polygon</a></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/Polygon.ts#L22">src/Physics/Shapes/Polygon.ts:22</a></li>
</ul>
</aside>
<div class="tsd-comment tsd-typography">
<div class="lead">
<p>从点构造一个多边形
多边形应该以顺时针方式指定 不能重复第一个/最后一个点它们以0 0为中心</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><span class="tsd-flag ts-flagOptional">Optional</span> isBox: <span class="tsd-signature-type">boolean</span></h5>
<div class="tsd-comment tsd-typography">
<div class="lead">
</div>
</div>
</li>
</ul>
<h4 class="tsd-returns-title">Returns <a href="_physics_shapes_polygon_.es.polygon.html" class="tsd-signature-type">Polygon</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">
<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">
<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">
<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">
<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">
<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">
<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">
<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">
<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="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">
<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">
<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">
<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">
<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">
<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>
<section class="tsd-panel-group tsd-member-group ">
<h2>Accessors</h2>
<section class="tsd-panel tsd-member tsd-kind-get-signature tsd-parent-kind-class">
<a name="edgenormals" class="tsd-anchor"></a>
<h3>edge<wbr>Normals</h3>
<ul class="tsd-signatures tsd-kind-get-signature tsd-parent-kind-class">
<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">
<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">
<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">
<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">
<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">
<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">
<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>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_shape_.es.shape.html">Shape</a>.<a href="_physics_shapes_shape_.es.shape.html#collideswithshape">collidesWithShape</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L279">src/Physics/Shapes/Polygon.ts:279</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_shape_.es.shape.html">Shape</a>.<a href="_physics_shapes_shape_.es.shape.html#containspoint">containsPoint</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L305">src/Physics/Shapes/Polygon.ts:305</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>point: <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 <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_shape_.es.shape.html">Shape</a>.<a href="_physics_shapes_shape_.es.shape.html#overlaps">overlaps</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L262">src/Physics/Shapes/Polygon.ts:262</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_shape_.es.shape.html">Shape</a>.<a href="_physics_shapes_shape_.es.shape.html#pointcollideswithshape">pointCollidesWithShape</a></p>
<ul>
<li>Defined in <a href="https://github.com/esengine/egret-framework/blob/562bacb/source/src/Physics/Shapes/Polygon.ts#L321">src/Physics/Shapes/Polygon.ts:321</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">
<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">
<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>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">
<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">
<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">
<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">
<a name="setpoints" class="tsd-anchor"></a>
<h3>set<wbr>Points</h3>
<ul class="tsd-signatures tsd-kind-method tsd-parent-kind-class">
<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">
<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 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-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">
<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-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-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">
<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-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-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">
<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-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-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">
<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-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-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">
<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-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-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">
<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_polygon_.html">&quot;<wbr>Physics/<wbr>Shapes/<wbr>Polygon&quot;</a>
<ul>
<li class="current tsd-kind-namespace tsd-parent-kind-module">
<a href="../modules/_physics_shapes_polygon_.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_polygon_.es.polygon.html" class="tsd-kind-icon">Polygon</a>
<ul>
<li class=" tsd-kind-constructor tsd-parent-kind-class">
<a href="_physics_shapes_polygon_.es.polygon.html#constructor" class="tsd-kind-icon">constructor</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="_physics_shapes_polygon_.es.polygon.html#_areedgenormalsdirty" class="tsd-kind-icon">_are<wbr>Edge<wbr>Normals<wbr>Dirty</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="_physics_shapes_polygon_.es.polygon.html#_edgenormals" class="tsd-kind-icon">_edge<wbr>Normals</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="_physics_shapes_polygon_.es.polygon.html#_originalpoints" class="tsd-kind-icon">_original<wbr>Points</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="_physics_shapes_polygon_.es.polygon.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_polygon_.es.polygon.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_polygon_.es.polygon.html#center" class="tsd-kind-icon">center</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="_physics_shapes_polygon_.es.polygon.html#isbox" class="tsd-kind-icon">is<wbr>Box</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="_physics_shapes_polygon_.es.polygon.html#isunrotated" class="tsd-kind-icon">is<wbr>Unrotated</a>
</li>
<li class=" tsd-kind-property tsd-parent-kind-class">
<a href="_physics_shapes_polygon_.es.polygon.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_polygon_.es.polygon.html#position" class="tsd-kind-icon">position</a>
</li>
<li class=" tsd-kind-get-signature tsd-parent-kind-class">
<a href="_physics_shapes_polygon_.es.polygon.html#edgenormals" class="tsd-kind-icon">edge<wbr>Normals</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="_physics_shapes_polygon_.es.polygon.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">
<a href="_physics_shapes_polygon_.es.polygon.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_polygon_.es.polygon.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_polygon_.es.polygon.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_polygon_.es.polygon.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_polygon_.es.polygon.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">
<a href="_physics_shapes_polygon_.es.polygon.html#recalculatebounds" class="tsd-kind-icon">recalculate<wbr>Bounds</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class">
<a href="_physics_shapes_polygon_.es.polygon.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">
<a href="_physics_shapes_polygon_.es.polygon.html#setpoints" class="tsd-kind-icon">set<wbr>Points</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a href="_physics_shapes_polygon_.es.polygon.html#buildsymmetricalpolygon" class="tsd-kind-icon">build<wbr>Symmetrical<wbr>Polygon</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a href="_physics_shapes_polygon_.es.polygon.html#findpolygoncenter" class="tsd-kind-icon">find<wbr>Polygon<wbr>Center</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a href="_physics_shapes_polygon_.es.polygon.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-static">
<a href="_physics_shapes_polygon_.es.polygon.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-static">
<a href="_physics_shapes_polygon_.es.polygon.html#recenterpolygonverts" class="tsd-kind-icon">recenter<wbr>Polygon<wbr>Verts</a>
</li>
<li class=" tsd-kind-method tsd-parent-kind-class tsd-is-static">
<a href="_physics_shapes_polygon_.es.polygon.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-interface tsd-has-type-parameter"><span class="tsd-kind-icon">Interface with type parameter</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>
</ul>
<ul class="tsd-legend">
<li class="tsd-kind-method tsd-parent-kind-class tsd-is-static"><span class="tsd-kind-icon">Static method</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>