summaryrefslogtreecommitdiff
path: root/doc/sims/dynamics/RegularPolygon.html
blob: b0e8cc9edd7004e1485b6de3b0c0994f456a2e5c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html>
        <head>
          <title>Scaladoc for sims.dynamics.RegularPolygon</title>
          <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
		      <script type="text/javascript" src="../../lib/jquery.js"></script>
          
		  <style type="text/css">
		    @import url(../../lib/template.css) screen;
		  </style>
		  <script type="text/javascript" src="../../lib/template.js"></script>
    
        </head>
        <body class="type">
      
      <p id="owner"><a href="../package.html">sims</a>.<a href="package.html">dynamics</a></p>

      <div id="definition">
        <img src="../../lib/class_big.png" />
        <h1>RegularPolygon</h1>
      </div>

      <h4 class="signature">
      <span class="kind">class</span>
      <span class="symbol">
        <span class="name">RegularPolygon</span><span class="params">(<span name="n">n: <span class="extype" name="scala.Int">Int</span></span>, <span name="radius">radius: <span class="extype" name="scala.Double">Double</span></span>, <span name="density">density: <span class="extype" name="scala.Double">Double</span></span>)</span><span class="result"> extends <a href="Shape.html" class="extype" name="sims.dynamics.Shape">Shape</a> with <a href="../geometry/ConvexPolygon.html" class="extype" name="sims.geometry.ConvexPolygon">ConvexPolygon</a> with <span class="extype" name="scala.Product">Product</span></span>
      </span>
      </h4>
      <div class="fullcomment" id="comment">
      <div class="comment cmt"><p>A regular polygon with <code>n</code> sides whose excircle has a radius <code>radius</code>.</p></div>
      <dl class="paramcmts block"><dt class="param">n</dt><dd class="cmt"><p>nmber of sides.</p></dd><dt class="param">radius</dt><dd class="cmt"><p>radius of the excircle</p></dd><dt class="param">density</dt><dd class="cmt"><p>density of this regular polygon</p></dd></dl>
      
      
      <div class="block">
                known subclasses: <a href="../../graphyx/graphics/GraphicalRegularPolygon.html">GraphicalRegularPolygon</a>
              </div>
    </div>
      
      <div id="template">
      
        <div id="mbrsel">
              <div id="ancestors">
                <h3>Inherits</h3>
                <ol><li class="in" name="scala.Product">Product</li><li class="in" name="scala.Equals">Equals</li><li class="in" name="sims.geometry.ConvexPolygon">ConvexPolygon</li><li class="in" name="sims.dynamics.Shape">Shape</li><li class="in" name="scala.AnyRef">AnyRef</li><li class="in" name="scala.Any">Any</li></ol>
              </div>
            </div>
        
        
        
        <div class="members" id="values">
              <h3>Value Members</h3>
              <ol><li name="sims.geometry.ConvexPolygon#AABB">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">AABB</span><span class="result">: <a href="../collision/AABB.html" class="extype" name="sims.collision.AABB">AABB</a></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Returns this polygon's axis aligned bounding box</p><div class="fullcomment">
      <div class="comment cmt"><p>Returns this polygon's axis aligned bounding box.</p></div>
      
      
      <div class="block">
            definition classes: <a href="../geometry/ConvexPolygon.html">ConvexPolygon</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.RegularPolygon#I">
      <h4 class="signature">
      <span class="kind">val</span>
      <span class="symbol">
        <span class="name">I</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Moment of inertia for a rotation about this shape's COM</p><div class="fullcomment">
      <div class="comment cmt"><p>Moment of inertia for a rotation about this shape's COM.</p></div>
      
      
      
      
    </div>
    </li><li name="sims.dynamics.Shape#asBody">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">asBody</span><span class="result">: <a href="Body.html" class="extype" name="sims.dynamics.Body">Body</a></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Creates a new body made out of tis shape</p><div class="fullcomment">
      <div class="comment cmt"><p>Creates a new body made out of tis shape.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.Shape#body">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">body</span><span class="result">: <a href="Body.html" class="extype" name="sims.dynamics.Body">Body</a></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Returns this shape's containing body</p><div class="fullcomment">
      <div class="comment cmt"><p>Returns this shape's containing body.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.RegularPolygon#canEqual">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">canEqual</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
      </span>
      </h4>
      
    </li><li name="sims.dynamics.Shape#collidable">
      <h4 class="signature">
      <span class="kind">var</span>
      <span class="symbol">
        <span class="name">collidable</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Flag determining this shapes ability to collide with other shapes</p><div class="fullcomment">
      <div class="comment cmt"><p>Flag determining this shapes ability to collide with other shapes.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.geometry.ConvexPolygon#contains">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">contains</span><span class="params">(<span name="point">point: <a href="../geometry/Vector2D.html" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Checks if the point <code>point</code> is contained in this polygon</p><div class="fullcomment">
      <div class="comment cmt"><p>Checks if the point <code>point</code> is contained in this polygon.
<p>
A ray is created, originating from the point and following an arbitrary direction (X-Axis was chosen).
The number of intersections between the ray and this polygon's sides (including vertices) is counted.
The amount of intersections with vertices is substracted form the previuos number.
If the latter number is odd, the point is contained in the polygon.</p></div>
      
      
      <div class="block">
            definition classes: <a href="../geometry/ConvexPolygon.html">ConvexPolygon</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.RegularPolygon#density">
      <h4 class="signature">
      <span class="kind">val</span>
      <span class="symbol">
        <span class="name">density</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Density</p><div class="fullcomment">
      <div class="comment cmt"><p>Density. (Mass per area)</p></div>
      
      
      
      
    </div>
    </li><li name="sims.dynamics.RegularPolygon#equals">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">equals</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Any">Any</span></span>)</span><span class="result">: <span class="extype" name="scala.Boolean">Boolean</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">This method is used to compare the receiver object (<code>this</code>)
with the argument object (<code>arg0</code>) for equivalence</p><div class="fullcomment">
      <div class="comment cmt"><p>This method is used to compare the receiver object (<code>this</code>)
with the argument object (<code>arg0</code>) for equivalence.</p><p><p>
The default implementations of this method is an <a
href="http://en.wikipedia.org/wiki/Equivalence_relation">equivalence
relation</a>:
  <ul>
 <li>It is reflexive: for any instance <code>x</code> of type <code>Any</code>,
 <code>x.equals(x)</code> should return <code>true</code>.</li>
 <li>It is symmetric: for any instances <code>x</code> and <code>y</code> of type
 <code>Any</code>, <code>x.equals(y)</code> should return <code>true</code> if and only
 if <code>y.equals(x)</code> returns <code>true</code>.</li>
 <li>It is transitive: for any instances
 <code>x</code>, <code>y</code>, and <code>z</code> of type <code>AnyRef</code>
 if <code>x.equals(y)</code> returns <code>true</code> and
 <code>y.equals(z)</code> returns
 <code>true</code>, then <code>x.equals(z)</code> should return <code>true</code>.</li>
</ul>
</p></p><p><p>
If you override this method, you should verify that
your implementation remains an equivalence relation.
Additionally, when overriding this method it is often necessary to
override <code>hashCode</code> to ensure that objects that are
"equal" (<code>o1.equals(o2)</code> returns <code>true</code>)
hash to the same <a href="Int.html"><code>Int</code></a>
(<code>o1.hashCode.equals(o2.hashCode)</code>).
</p></div>
      <dl class="paramcmts block"><dt class="param">arg0</dt><dd class="cmt"><p>the object to compare against this object for equality.</p></dd><dt>returns</dt><dd class="cmt"><p><code>true</code> if the receiver object is equivalent to the argument; <code>false</code> otherwise.
</p></p></dd></dl>
      
      
      
    </div>
    </li><li name="sims.dynamics.Shape#friction">
      <h4 class="signature">
      <span class="kind">var</span>
      <span class="symbol">
        <span class="name">friction</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Part of the coefficient of friction for a collision between this shape and another</p><div class="fullcomment">
      <div class="comment cmt"><p>Part of the coefficient of friction for a collision between this shape and another.
The coefficient of friction is calculated out of the product of this part and the other shape's part.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.RegularPolygon#halfDiags">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">halfDiags</span><span class="result">: <span class="extype" name="scala.Array">Array</span>[<a href="../geometry/Vector2D.html" class="extype" name="sims.geometry.Vector2D">Vector2D</a>]</span>
      </span>
      </h4>
      
    </li><li name="sims.dynamics.RegularPolygon#hashCode">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">hashCode</span><span class="params">()</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Returns a hash code value for the object</p><div class="fullcomment">
      <div class="comment cmt"><p>Returns a hash code value for the object.</p><p><p>
The default hashing algorithm is platform dependent.</p><p>Note that it is allowed for two objects to have identical hash
codes (<code>o1.hashCode.equals(o2.hashCode)</code>) yet not be
equal (<code>o1.equals(o2)</code> returns <code>false</code>).  A
degenerate implementation could always return <code>0</code>.
However, it is required that if two objects are equal
(<code>o1.equals(o2)</code> returns <code>true</code>) that they
have identical hash codes
(<code>o1.hashCode.equals(o2.hashCode)</code>).  Therefore, when
overriding this method, be sure to verify that the behavior is
consistent with the <code>equals</code> method.
</p></p><p><p></p></div>
      
      
      
      
    </div>
    </li><li name="sims.dynamics.Shape#mass">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">mass</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Returns the mass of this shape</p><div class="fullcomment">
      <div class="comment cmt"><p>Returns the mass of this shape. The mass is given by volume times density.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.RegularPolygon#n">
      <h4 class="signature">
      <span class="kind">val</span>
      <span class="symbol">
        <span class="name">n</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
      </span>
      </h4>
      
    </li><li name="sims.dynamics.Shape#pos">
      <h4 class="signature">
      <span class="kind">var</span>
      <span class="symbol">
        <span class="name">pos</span><span class="result">: <a href="../geometry/Vector2D.html" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Position of this shape's COM (in world coordinates)</p><div class="fullcomment">
      <div class="comment cmt"><p>Position of this shape's COM (in world coordinates).</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.RegularPolygon#productArity">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">productArity</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
      </span>
      </h4>
      
    </li><li name="sims.dynamics.RegularPolygon#productElement">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">productElement</span><span class="params">(<span name="arg0">arg0: <span class="extype" name="scala.Int">Int</span></span>)</span><span class="result">: <span class="extype" name="scala.Any">Any</span></span>
      </span>
      </h4>
      
    </li><li name="scala.Product#productElements">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">productElements</span><span class="result">: <span class="extype" name="scala.collection.Iterator">Iterator</span>[<span class="extype" name="scala.Any">Any</span>]</span>
      </span>
      </h4>
      
    </li><li name="scala.Product#productIterator">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">productIterator</span><span class="result">: <span class="extype" name="scala.collection.Iterator">Iterator</span>[<span class="extype" name="scala.Any">Any</span>]</span>
      </span>
      </h4>
      
    </li><li name="sims.dynamics.RegularPolygon#productPrefix">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">productPrefix</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span>
      </span>
      </h4>
      
    </li><li name="sims.geometry.ConvexPolygon#project">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">project</span><span class="params">(<span name="axis">axis: <a href="../geometry/Vector2D.html" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span>)</span><span class="result">: <a href="../geometry/Projection.html" class="extype" name="sims.geometry.Projection">Projection</a></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Returns the projection of this polygon onto the line given by the directional vector <code>axis</code></p><div class="fullcomment">
      <div class="comment cmt"><p>Returns the projection of this polygon onto the line given by the directional vector <code>axis</code>.</p></div>
      <dl class="paramcmts block"><dt class="param">axis</dt><dd class="cmt"><p>directional vector of the line</p></dd><dt>returns</dt><dd class="cmt"><p>projection of this polygon</p></dd></dl>
      
      <div class="block">
            definition classes: <a href="../geometry/ConvexPolygon.html">ConvexPolygon</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.RegularPolygon#radius">
      <h4 class="signature">
      <span class="kind">val</span>
      <span class="symbol">
        <span class="name">radius</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span>
      </span>
      </h4>
      
    </li><li name="sims.dynamics.Shape#refLocalPos">
      <h4 class="signature">
      <span class="kind">var</span>
      <span class="symbol">
        <span class="name">refLocalPos</span><span class="result">: <a href="../geometry/Vector2D.html" class="extype" name="sims.geometry.Vector2D">Vector2D</a></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Local position of this shape's body COM to its COM at a body rotation of zero</p><div class="fullcomment">
      <div class="comment cmt"><p>Local position of this shape's body COM to its COM at a body rotation of zero.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.Shape#restitution">
      <h4 class="signature">
      <span class="kind">var</span>
      <span class="symbol">
        <span class="name">restitution</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Part of the coefficient of restitution for a collision between this shape and another</p><div class="fullcomment">
      <div class="comment cmt"><p>Part of the coefficient of restitution for a collision between this shape and another.
The coefficient of restitution is calculated out of the product of this part and the other shape's part.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.Shape#rotation">
      <h4 class="signature">
      <span class="kind">var</span>
      <span class="symbol">
        <span class="name">rotation</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Rotation of this shape about its COM</p><div class="fullcomment">
      <div class="comment cmt"><p>Rotation of this shape about its COM.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.Shape#rotation0">
      <h4 class="signature">
      <span class="kind">var</span>
      <span class="symbol">
        <span class="name">rotation0</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Initial rotation</p><div class="fullcomment">
      <div class="comment cmt"><p>Initial rotation. Rotation of this shape before it was added to a body.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.geometry.ConvexPolygon#sides">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">sides</span><span class="result">: <span class="extype" name="scala.Array">Array</span>[<a href="../geometry/Segment.html" class="extype" name="sims.geometry.Segment">Segment</a>]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Returns all sides of this polygon</p><div class="fullcomment">
      <div class="comment cmt"><p>Returns all sides of this polygon. The sides are ordered counter-clockwise, the first vertex of the side
giving the side index.</p></div>
      
      
      <div class="block">
            definition classes: <a href="../geometry/ConvexPolygon.html">ConvexPolygon</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.RegularPolygon#toString">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">toString</span><span class="params">()</span><span class="result">: <span class="extype" name="java.lang.String">String</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Returns a string representation of the object</p><div class="fullcomment">
      <div class="comment cmt"><p>Returns a string representation of the object.
<p>
The default representation is platform dependent.
</p></div>
      
      
      
      
    </div>
    </li><li name="sims.dynamics.Shape#transientShapes">
      <h4 class="signature">
      <span class="kind">val</span>
      <span class="symbol">
        <span class="name">transientShapes</span><span class="result">: <span class="extype" name="scala.collection.mutable.Set">Set</span>[<a href="Shape.html" class="extype" name="sims.dynamics.Shape">Shape</a>]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Shapes with which this shape cannot collide</p><div class="fullcomment">
      <div class="comment cmt"><p>Shapes with which this shape cannot collide.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.Shape#uid">
      <h4 class="signature">
      <span class="kind">val</span>
      <span class="symbol">
        <span class="name">uid</span><span class="result">: <span class="extype" name="scala.Int">Int</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Unique identification number</p><div class="fullcomment">
      <div class="comment cmt"><p>Unique identification number.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.RegularPolygon#vertices">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">vertices</span><span class="result">: <span class="extype" name="scala.collection.Seq">Seq</span>[<a href="../geometry/Vector2D.html" class="extype" name="sims.geometry.Vector2D">Vector2D</a>]</span>
      </span>
      </h4>
      <p class="shortcomment cmt">Returns positions of all vertices of this Polygon</p><div class="fullcomment">
      <div class="comment cmt"><p>Returns positions of all vertices of this Polygon. Vertices are ordered counter-clockwise.</p></div>
      
      
      
      
    </div>
    </li><li name="sims.dynamics.RegularPolygon#volume">
      <h4 class="signature">
      <span class="kind">val</span>
      <span class="symbol">
        <span class="name">volume</span><span class="result">: <span class="extype" name="scala.Double">Double</span></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Volume</p><div class="fullcomment">
      <div class="comment cmt"><p>Volume. The volume is actually equivalent to this shape's area (SiMS is in 2D)
and is used with this shape's density to calculate its mass.</p></div>
      
      
      
      
    </div>
    </li><li name="sims.dynamics.Shape#~">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">~</span><span class="params">(<span name="b">b: <a href="Body.html" class="extype" name="sims.dynamics.Body">Body</a></span>)</span><span class="result">: <a href="Body.html" class="extype" name="sims.dynamics.Body">Body</a></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Creates a new body out of this shape and the shapes of body <code>b</code></p><div class="fullcomment">
      <div class="comment cmt"><p>Creates a new body out of this shape and the shapes of body <code>b</code>.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li><li name="sims.dynamics.Shape#~">
      <h4 class="signature">
      <span class="kind">def</span>
      <span class="symbol">
        <span class="name">~</span><span class="params">(<span name="s">s: <a href="Shape.html" class="extype" name="sims.dynamics.Shape">Shape</a></span>)</span><span class="result">: <a href="Body.html" class="extype" name="sims.dynamics.Body">Body</a></span>
      </span>
      </h4>
      <p class="shortcomment cmt">Creates a new body out of this shape and the shape <code>s</code></p><div class="fullcomment">
      <div class="comment cmt"><p>Creates a new body out of this shape and the shape <code>s</code>.</p></div>
      
      
      <div class="block">
            definition classes: <a href="Shape.html">Shape</a>
          </div>
      
    </div>
    </li></ol>
            </div>
        
        <div class="members" id="constructors">
              <h3>Instance constructors</h3>
              <ol><li name="sims.dynamics.RegularPolygon#this">
      <h4 class="signature">
      <span class="kind">new</span>
      <span class="symbol">
        <span class="name">RegularPolygon</span><span class="params">(<span name="n">n: <span class="extype" name="scala.Int">Int</span></span>, <span name="radius">radius: <span class="extype" name="scala.Double">Double</span></span>, <span name="density">density: <span class="extype" name="scala.Double">Double</span></span>)</span>
      </span>
      </h4>
      
    </li><li name="sims.dynamics.Shape#this">
      <h4 class="signature">
      <span class="kind">new</span>
      <span class="symbol">
        <span class="name">RegularPolygon</span><span class="params">()</span>
      </span>
      </h4>
      
    </li></ol>
            </div>
        
      </div>
      
    </body>
      </html>