PackageBox2DAS.Collision.Shapes
Classpublic class b2Shape
Inheritanceb2Shape Inheritance b2Base Inheritance Object
Subclasses b2CircleShape, b2EdgeShape, b2LoopShape, b2PolygonShape



Public Properties
 PropertyDefined By
 Inheritedbytes : ByteArray
[static]
b2Base
 Inheritedinitialized : Boolean = false
[static]
b2Base
 Inheritedlib : Object
[static]
b2Base
 Inheritedloader : CLibInit
[static]
b2Base
  m_area : Number
b2Shape
 Inheritedmem : MemUser
[static]
b2Base
  m_radius : Number
b2Shape
  m_type : int
b2Shape
 Inherited_ptr : Number
b2Base
 Inheritedvalid : Boolean
[read-only] Does the object point to a C++ equivalent (i.e.
b2Base
Public Methods
 MethodDefined By
  
ComputeAABB(aabb:AABB, xf:XF):void
b2Shape
  
ComputeMass(massData:b2MassData, density:Number):void
b2Shape
  
ComputeSubmergedArea(normal:V2, offset:Number, xf:XF, c:V2):Number
b2Shape
  
b2Shape
 Inherited
deref(adr:int):*
[static] dereference a C++ pointer or AS3_Val that is pointing to an AS3 object.
b2Base
 Inherited
destroy():void
Destroy base function just sets _ptr = 0.
b2Base
  
Draw(g:Graphics, xf:XF, scale:Number = 1, options:Object = null):void
b2Shape
 Inherited
getArr():Array
[static]
b2Base
  
GetType():int
b2Shape
 Inherited
initialize(defs:Boolean = true):void
[static] Initialize the C++ module.
b2Base
  
RayCast(output:*, input:*, transform:XF):Boolean
b2Shape
 Inherited
readVertices(adr:int, num:int):Vector.<V2>
Read C++ memory and convert it into a vertex array.
b2Base
  
TestPoint(xf:XF, p:V2):Boolean
b2Shape
 Inherited
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
Public Constants
 ConstantDefined 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
Property Detail
m_areaproperty
m_area:Number


Implementation
    public function get m_area():Number
    public function set m_area(value:Number):void
m_radiusproperty 
m_radius:Number


Implementation
    public function get m_radius():Number
    public function set m_radius(value:Number):void
m_typeproperty 
m_type:int


Implementation
    public function get m_type():int
    public function set m_type(value:int):void
Method Detail
ComputeAABB()method
public function ComputeAABB(aabb:AABB, xf:XF):void

Parameters

aabb:AABB
 
xf:XF

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

Returns
Number
create()method 
public function create(b:b2Body, f:b2FixtureDef = null):b2Fixture

Parameters

b:b2Body
 
f:b2FixtureDef (default = null)

Returns
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

Returns
int
RayCast()method 
public function RayCast(output:*, input:*, transform:XF):Boolean

Parameters

output:*
 
input:*
 
transform:XF

Returns
Boolean
TestPoint()method 
public function TestPoint(xf:XF, p:V2):Boolean

Parameters

xf:XF
 
p:V2

Returns
Boolean
Constant Detail
e_circleConstant
public static const e_circle:int = 0

e_polygonConstant 
public static const e_polygon:int = 1

e_typeCountConstant 
public static const e_typeCount:int = 2

e_unknownConstant 
public static const e_unknown:int = -1