root/as3/MultiTouchSprite/trunk/demo/lib/Box2D/Collision/Shapes/b2ShapeDef.as

リビジョン 3986, 1.9 kB (コミッタ: alternadotin, コミット時期: 3 年 前)

ディレクトリの変更

Line 
1 /*
2 * Copyright (c) 2006-2007 Erin Catto http://www.gphysics.com
3 *
4 * This software is provided 'as-is', without any express or implied
5 * warranty.  In no event will the authors be held liable for any damages
6 * arising from the use of this software.
7 * Permission is granted to anyone to use this software for any purpose,
8 * including commercial applications, and to alter it and redistribute it
9 * freely, subject to the following restrictions:
10 * 1. The origin of this software must not be misrepresented; you must not
11 * claim that you wrote the original software. If you use this software
12 * in a product, an acknowledgment in the product documentation would be
13 * appreciated but is not required.
14 * 2. Altered source versions must be plainly marked as such, and must not be
15 * misrepresented as being the original software.
16 * 3. This notice may not be removed or altered from any source distribution.
17 */
18
19 package Box2D.Collision.Shapes{
20
21
22
23 import Box2D.Common.Math.*;
24 import Box2D.Common.*;
25 import Box2D.Collision.Shapes.b2Shape;
26
27
28
29 /// A shape definition is used to construct a shape. This class defines an
30 /// abstract shape definition. You can reuse shape definitions safely.
31 public class b2ShapeDef
32 {
33         /// Holds the shape type for down-casting.
34         public var type:int = b2Shape.e_unknownShape;
35        
36         /// Use this to store application specify shape data.
37         public var userData:* = null;
38        
39         /// The shape's friction coefficient, usually in the range [0,1].
40         public var friction:Number = 0.2;
41        
42         /// The shape's restitution (elasticity) usually in the range [0,1].
43         public var restitution:Number = 0.0;
44        
45         /// The shape's density, usually in kg/m^2.
46         public var density:Number = 0.0;
47        
48         /// A sensor shape collects contact information but never generates a collision
49         /// response.
50         public var isSensor:Boolean = false;
51        
52         /// Contact filtering data.
53         public var filter: b2FilterData = new b2FilterData();
54 };
55
56 }
Note: リポジトリブラウザについてのヘルプは TracBrowser を参照してください。