PackageBox2DAS.Common
Classpublic class b2Base
Inheritanceb2Base Inheritance Object
Subclasses b2AABB, b2Body, b2BodyDef, b2BroadPhase, b2Contact, b2ContactEdge, b2ContactID, b2ContactImpulse, b2ContactManager, b2DistanceInput, b2DistanceOutput, b2DistanceProxy, b2EventDispatcher, b2Filter, b2FixtureDef, b2Jacobian, b2JointDef, b2JointEdge, b2Manifold, b2ManifoldPoint, b2MassData, b2Mat22, b2Shape, b2SimplexCache, b2Sweep, b2Transform, b2Vec2, b2Vec3



Public Properties
 PropertyDefined By
  bytes : ByteArray
[static]
b2Base
  initialized : Boolean = false
[static]
b2Base
  lib : Object
[static]
b2Base
  loader : CLibInit
[static]
b2Base
  mem : MemUser
[static]
b2Base
  _ptr : Number
b2Base
  valid : Boolean
[read-only] Does the object point to a C++ equivalent (i.e.
b2Base
Public Methods
 MethodDefined By
  
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
  
getArr():Array
[static]
b2Base
  
initialize(defs:Boolean = true):void
[static] Initialize the C++ module.
b2Base
  
readVertices(adr:int, num:int):Vector.<V2>
Read C++ memory and convert it into a vertex array.
b2Base
  
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
Property Detail
_ptrproperty
public var _ptr:Number

bytesproperty 
public static var bytes:ByteArray

initializedproperty 
public static var initialized:Boolean = false

libproperty 
public static var lib:Object

loaderproperty 
public static var loader:CLibInit

memproperty 
public static var mem:MemUser

validproperty 
valid:Boolean  [read-only]

Does the object point to a C++ equivalent (i.e. is it created and not destroyed)?


Implementation
    public function get valid():Boolean
Method Detail
deref()method
public static function deref(adr:int):*

dereference a C++ pointer or AS3_Val that is pointing to an AS3 object.

Parameters

adr:int

Returns
*
destroy()method 
public function destroy():void

Destroy base function just sets _ptr = 0. This should be overridden to actually destroy the object.

getArr()method 
public static function getArr():Array

Returns
Array
initialize()method 
public static function initialize(defs:Boolean = true):void

Initialize the C++ module. Pass false as the second parameter if you don't plan on using the static defs in the b2Def class.

Parameters

defs:Boolean (default = true)

readVertices()method 
public function readVertices(adr:int, num:int):Vector.<V2>

Read C++ memory and convert it into a vertex array.

Parameters

adr:int
 
num:int

Returns
Vector.<V2>
writeVertices()method 
public function 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.

Parameters

adr:int
 
v:Vector.<V2>