- type
- class
- extends
- Interactor
Compound represents a grouping of physics objects into a single object.
This compound owns its constituents and works in the callback system and with respect to adding/removing from a Space as a single object.
When you add a compound to a Space, all of it's constituents get added and furthermore, those constituents cannot be added seperately.
This compound owns its constituents and works in the callback system and with respect to adding/removing from a Space as a single object.
____Cmp1_____ / / \ \ Body1 Body2--Joint Cmp2 | | \ | Shp1 Shp2 Body3 | Shp3For example if you have a complex car built with several bodies and constraints you might store this in a Compound providing an easy way of removing/adding/copying the Car as well as being able to get a single callback for when the car collides with something.
When you add a compound to a Space, all of it's constituents get added and furthermore, those constituents cannot be added seperately.
Instance Properties hide inherited show inherited
readonly var bodies : BodyList = []
readonly var castBody : Null<Body>
inherited from nape.phys.Interactor
Fast equivalent to cast(interactor, Body)
readonly var castCompound : Null<Compound>
inherited from nape.phys.Interactor
Fast equivalent to cast(interactor, Compound)
readonly var castShape : Null<nape.shape.Shape>
inherited from nape.phys.Interactor
Fast equivalent to cast(interactor, Shape)
readonly var cbTypes : nape.callbacks.CbTypeList = []
inherited from nape.phys.Interactor
Set of CbType's assigned to this Interactor.
var compound : Null<Compound> = null
Compound that this compound belongs to.
readonly var compounds : CompoundList = []
readonly var constraints : nape.constraint.ConstraintList = []
var group : Null<nape.dynamics.InteractionGroup> = null
inherited from nape.phys.Interactor
InteractionGroup assigned to this Interactor.
readonly var id : Int
inherited from nape.phys.Interactor
Unique id of this Interactor.
var space : Null<nape.space.Space> = null
readonly var userData : Dynamic<Dynamic> = {}
inherited from nape.phys.Interactor
Instance Methods hide inherited show inherited
function COM(weak:Bool = false):nape.geom.Vec2
function copy():Compound
isBody():Bool
inherited from nape.phys.Interactor
isCompound():Bool
inherited from nape.phys.Interactor
isShape():Bool
inherited from nape.phys.Interactor