Changes

Jump to navigation Jump to search

Category:Physics Engine/Misc

11 bytes removed, 09:00, 18 July 2012
no edit summary
Line 51: 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 [[Category:Physics_Engine/Bodies|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 physics.Body(...) constructor.  
    
Introduced in platform.apiLevel = '2.0'  
 
Introduced in platform.apiLevel = '2.0'  
Line 100: Line 100:  
<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--> <!-- table start -->  
 
</pre><!-- code end--> <!-- 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"
 
|-
 
|-
 
! Parameter  
 
! Parameter  
Line 110: Line 110:  
| The mass of the polygon
 
| The mass of the polygon
 
|-
 
|-
| vertices '''in''' physics.Vect
+
| 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 158: Line 159:  
<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.  
 
<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'  
 +
 
 +
[[Category:Physics_Engine]]

Navigation menu