Package | Box2DAS.Collision.Shapes |
Class | public class b2Shape |
Inheritance | b2Shape b2Base Object |
Subclasses | b2CircleShape, b2EdgeShape, b2LoopShape, b2PolygonShape |
Property | Defined By | ||
---|---|---|---|
bytes : ByteArray [static] | b2Base | ||
initialized : Boolean = false [static] | b2Base | ||
lib : Object [static] | b2Base | ||
loader : CLibInit [static] | b2Base | ||
m_area : Number | b2Shape | ||
mem : MemUser [static] | b2Base | ||
m_radius : Number | b2Shape | ||
m_type : int | b2Shape | ||
_ptr : Number | b2Base | ||
valid : Boolean [read-only]
Does the object point to a C++ equivalent (i.e. | b2Base |
Method | Defined By | ||
---|---|---|---|
b2Shape | |||
ComputeMass(massData:b2MassData, density:Number):void | b2Shape | ||
b2Shape | |||
b2Shape | |||
deref(adr:int):* [static]
dereference a C++ pointer or AS3_Val that is pointing to an AS3 object. | b2Base | ||
destroy():void
Destroy base function just sets _ptr = 0. | b2Base | ||
b2Shape | |||
getArr():Array [static] | b2Base | ||
GetType():int | b2Shape | ||
initialize(defs:Boolean = true):void [static]
Initialize the C++ module. | b2Base | ||
b2Shape | |||
readVertices(adr:int, num:int):Vector.<V2>
Read C++ memory and convert it into a vertex array. | b2Base | ||
b2Shape | |||
writeVertices(adr:int, v:Vector.<V2>):void
Write a vertex array of the format [new V2(x,y), new V2(x,y), ...] to C++ memory. | b2Base |
Constant | Defined By | ||
---|---|---|---|
e_circle : int = 0 [static] | b2Shape | ||
e_polygon : int = 1 [static] | b2Shape | ||
e_typeCount : int = 2 [static] | b2Shape | ||
e_unknown : int = -1 [static] | b2Shape |
m_area | property |
m_area:Number
public function get m_area():Number
public function set m_area(value:Number):void
m_radius | property |
m_radius:Number
public function get m_radius():Number
public function set m_radius(value:Number):void
m_type | property |
m_type:int
public function get m_type():int
public function set m_type(value:int):void
ComputeAABB | () | method |
ComputeMass | () | method |
public function ComputeMass(massData:b2MassData, density:Number):void
Parameters
massData:b2MassData | |
density:Number |
ComputeSubmergedArea | () | method |
public function ComputeSubmergedArea(normal:V2, offset:Number, xf:XF, c:V2):Number
Parameters
normal:V2 | |
offset:Number | |
xf:XF | |
c:V2 |
Number |
create | () | method |
public function create(b:b2Body, f:b2FixtureDef = null):b2Fixture
Parameters
b:b2Body | |
f:b2FixtureDef (default = null )
|
b2Fixture |
Draw | () | method |
public function Draw(g:Graphics, xf:XF, scale:Number = 1, options:Object = null):void
Parameters
g:Graphics | |
xf:XF | |
scale:Number (default = 1 )
| |
options:Object (default = null )
|
GetType | () | method |
public function GetType():int
Returnsint |
RayCast | () | method |
public function RayCast(output:*, input:*, transform:XF):Boolean
Parameters
output:* | |
input:* | |
transform:XF |
Boolean |
TestPoint | () | method |
e_circle | Constant |
public static const e_circle:int = 0
e_polygon | Constant |
public static const e_polygon:int = 1
e_typeCount | Constant |
public static const e_typeCount:int = 2
e_unknown | Constant |
public static const e_unknown:int = -1