Changes

Jump to navigation Jump to search

Category:Physics Engine/Misc

112 bytes removed, 08:54, 18 July 2012
no edit summary
Line 1: Line 1: −
=== INFINITY  ===
+
==== INFINITY  ====
    
<!-- code start-->  
 
<!-- code start-->  
 
<pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">infinity = physics.misc.INFINITY()
 
<pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">infinity = physics.misc.INFINITY()
</pre><!-- code end-->  
+
</pre><!-- code end--> <!-- table start -->  
<!-- table start -->  
  −
 
   
{| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable sortable"
 
{| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable sortable"
 
|-
 
|-
Line 25: Line 23:  
<br>  
 
<br>  
   −
===== momentForBox  =====
+
==== momentForBox  ====
    
<!-- code start-->  
 
<!-- code start-->  
 
<pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">inertia = physics.misc.momentForBox(mass, width, height)
 
<pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">inertia = physics.misc.momentForBox(mass, width, height)
</pre><!-- code end-->  
+
</pre><!-- code end--> <!-- table start -->  
<!-- table start -->  
  −
 
   
{| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable sortable"
 
{| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable sortable"
 
|-
 
|-
Line 55: Line 51:  
|}
 
|}
 
<!-- table end -->  
 
<!-- table end -->  
<br> This routine computes the moment of inertia for a solid box. This is a useful helper routine for computing the moment of inertia as an input to the [[#BodyCall|physics.Body(...) constructor]].  
+
<br> This routine computes the moment of inertia for a solid box. This is a useful helper routine for computing the moment of inertia as an input to the [[Category:Physics_Engine/Bodies|physics.Body(...) constructor]].  
    
Introduced in platform.apiLevel = '2.0'  
 
Introduced in platform.apiLevel = '2.0'  
Line 61: Line 57:  
----
 
----
   −
===== momentForCircle  =====
+
==== momentForCircle  ====
    
<!-- code start-->  
 
<!-- code start-->  
 
<pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">inertia = physics.misc.momentForCircle(mass, innerRadius, outerRadius, offBody)
 
<pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">inertia = physics.misc.momentForCircle(mass, innerRadius, outerRadius, offBody)
</pre><!-- code end-->  
+
</pre><!-- code end--> <!-- table start -->  
<!-- table start -->  
  −
 
   
{| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable sortable"
 
{| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable sortable"
 
|-
 
|-
Line 95: Line 89:  
|}
 
|}
 
<!-- table end -->  
 
<!-- table end -->  
<br> This routine computes the moment of inertia for a [[#circle|circle]]. A solid circle has an inner radius of 0. This is a useful helper routine for computing the moment of inertia as an input to the [[#BodyCall|physics.Body(...) constructor]].  
+
<br> This routine computes the moment of inertia for a circle. A solid circle has an inner radius of 0. This is a useful helper routine for computing the moment of inertia as an input to the physics.Body(...) constructor.  
    
Introduced in platform.apiLevel = '2.0'  
 
Introduced in platform.apiLevel = '2.0'  
Line 101: Line 95:  
----
 
----
   −
===== momentForPoly  =====
+
==== momentForPoly  ====
    
<!-- code start-->  
 
<!-- code start-->  
 
<pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">inertia = physics.misc.momentForPoly(mass, vertices, offset)
 
<pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">inertia = physics.misc.momentForPoly(mass, vertices, offset)
</pre><!-- code end-->  
+
</pre><!-- code end--> <!-- table start -->  
<!-- table start -->  
  −
 
   
{| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable sortable"
 
{| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable sortable"
 
|-
 
|-
Line 118: Line 110:  
| The mass of the polygon
 
| The mass of the polygon
 
|-
 
|-
| vertices '''in''' <nowiki>{</nowiki>physics.Vect<nowiki>}</nowiki>
+
| vertices '''in''' physics.Vect
 
| A list of vertices defining the shape of the polygon
 
| A list of vertices defining the shape of the polygon
 
|-
 
|-
Line 130: Line 122:  
|}
 
|}
 
<!-- table end -->  
 
<!-- table end -->  
<br> This routine computes the moment of inertia for a [[#polygon|polygon]]. This is a useful helper routine for computing the moment of inertia as an input to the [[#BodyCall|physics.Body(...) constructor]].  
+
<br> This routine computes the moment of inertia for a polygon. This is a useful helper routine for computing the moment of inertia as an input to the physics.Body(...) constructor.  
    
Introduced in platform.apiLevel = '2.0'  
 
Introduced in platform.apiLevel = '2.0'  
Line 136: Line 128:  
----
 
----
   −
===== momentForSegment  =====
+
==== momentForSegment  ====
    
<!-- code start-->  
 
<!-- code start-->  
 
<pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">inertia = physics.misc.momentForSegment(mass, endPointA, endPointB)
 
<pre style="margin-left:20px; font-size:1.4em; background-color:#fdfdfd">inertia = physics.misc.momentForSegment(mass, endPointA, endPointB)
</pre><!-- code end-->  
+
</pre><!-- code end--> <!-- table start -->  
<!-- table start -->  
  −
 
   
{| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable sortable"
 
{| border="1" width="100%" cellspacing="0" cellpadding="4" style="border-color:#eee" class="wikitable sortable"
 
|-
 
|-
Line 166: Line 156:  
|}
 
|}
 
<!-- table end -->  
 
<!-- table end -->  
<br> This routine computes the moment of inertia for a [[#segment|segment]]. The end points can be in either world or local coordinates. This is a useful helper routine for computing the moment of inertia as an input to the [[#BodyCall|physics.Body(...) constructor]].  
+
<br> This routine computes the moment of inertia for a segment. The end points can be in either world or local coordinates. This is a useful helper routine for computing the moment of inertia as an input to the physics.Body(...) constructor.  
    
Introduced in platform.apiLevel = '2.0'
 
Introduced in platform.apiLevel = '2.0'

Navigation menu