nape.shape.Shape

type
class
extends
nape.phys.Interactor
subclasses
nape.shape.Circle, nape.shape.Polygon
Base type for Nape Shape's

Instance Properties hide inherited show inherited

readonly var angDrag : Float

Coeffecient of angular fluid drag for this Shape.

readonly var area : Float

Area of the Hhape.

var body : Null<nape.phys.Body> = null

+ Body this Shape is assigned to.

readonly var bounds : nape.geom.AABB

+ World space bounding box for this shape.

readonly var castBody : Null<Body>

inherited from nape.phys.Interactor
Fast equivalent to cast(interactor, Body)

readonly var castCircle : Null<Circle>

Faster equivalent to casting this to Circle type

readonly var castCompound : Null<Compound>

inherited from nape.phys.Interactor
Fast equivalent to cast(interactor, Compound)

readonly var castPolygon : Null<Polygon>

Faster equivalent to casting this to Polygon type

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 filter : nape.dynamics.InteractionFilter = new InteractionFilter()

InteractionFilter used by this shape.

var fluidEnabled : Bool = false

+ Whether this shape is able to interact as a fluid.

var fluidProperties : nape.phys.FluidProperties = new FluidProperties();

+ FluidProperties used by this shape.

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.

readonly var inertia : Float

Non-mass weighted moment of inertia for Shape.

var localCOM : nape.geom.Vec2

+ Local space centre of mass of this Shape.

var material : nape.phys.Material = new Material()

Material used by this shape.

var sensorEnabled : Bool = false

+ Whether this shape is able to interact as sensor.

readonly var type : ShapeType

Type of shape.

readonly var userData : Dynamic<Dynamic> = {}

inherited from nape.phys.Interactor
+ Dynamic object for user to store additional data.

readonly var worldCOM : nape.geom.Vec2

+ World space centre of mass of this Shape.

Instance Methods hide inherited show inherited

function contains(point:nape.geom.Vec2):Bool

+ Test containment of world-space coordinate in Shape.

function copy():Shape

+ Produce an exact copy of this Shape.

isBody():Bool

inherited from nape.phys.Interactor
+ Fast equivalent to Std.is(interactor, Body)

inline function isCircle():Bool

+ Faster equivalent to type == ShapeType.CIRCLE

isCompound():Bool

inherited from nape.phys.Interactor
+ Fast equivalent to Std.is(interactor, Compound)

inline function isPolygon():Bool

+ Faster equivalent to type == ShapeType.POLYGON

isShape():Bool

inherited from nape.phys.Interactor
+ Fast equivalent to Std.is(interactor, Shape)

function rotate(angle:Float):Shape

+ Rotate this shape in its local coordinate system.

function scale(scalex:Float, scaley:Float):Shape

+ Scale this shape in its local coordinate system.

function transform(matrix:nape.geom.Mat23):Shape

+ Apply local transformation matrix to Shape.

function translate(translation:nape.geom.Vec2):Shape

+ Translate this shape in its local coordinate system.