nape.shape.Circle

type
class
extends
Shape
Shape subtype representing a Circle

Constructor

function new(radius:Float, localCOM:nape.geom.Vec2 = (0,0), material:nape.phys.Material = new Material(), filter:nape.dynamics.InteractionFilter = new InteractionFilter())
+ Construct a new Circle

Instance Properties hide inherited show inherited

readonly var angDrag : Float

inherited from nape.shape.Shape
Coeffecient of angular fluid drag for this Shape.

readonly var area : Float

inherited from nape.shape.Shape
Area of the Hhape.

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

inherited from nape.shape.Shape
+ Body this Shape is assigned to.

readonly var bounds : nape.geom.AABB

inherited from nape.shape.Shape
+ 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>

inherited from nape.shape.Shape
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>

inherited from nape.shape.Shape
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()

inherited from nape.shape.Shape
InteractionFilter used by this shape.

var fluidEnabled : Bool = false

inherited from nape.shape.Shape
+ Whether this shape is able to interact as a fluid.

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

inherited from nape.shape.Shape
+ 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

inherited from nape.shape.Shape
Non-mass weighted moment of inertia for Shape.

var localCOM : nape.geom.Vec2

inherited from nape.shape.Shape
+ Local space centre of mass of this Shape.

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

inherited from nape.shape.Shape
Material used by this shape.

var radius : Float

+ Radius of circle

var sensorEnabled : Bool = false

inherited from nape.shape.Shape
+ Whether this shape is able to interact as sensor.

readonly var type : ShapeType

inherited from nape.shape.Shape
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

inherited from nape.shape.Shape
+ World space centre of mass of this Shape.

Instance Methods hide inherited show inherited

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

inherited from nape.shape.Shape
+ Test containment of world-space coordinate in Shape.

copy():Shape

inherited from nape.shape.Shape
+ Produce an exact copy of this Shape.

isBody():Bool

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

isCircle():Bool

inherited from nape.shape.Shape
+ Faster equivalent to type == ShapeType.CIRCLE

isCompound():Bool

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

isPolygon():Bool

inherited from nape.shape.Shape
+ Faster equivalent to type == ShapeType.POLYGON

isShape():Bool

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

rotate(angle:Float):Shape

inherited from nape.shape.Shape
+ Rotate this shape in its local coordinate system.

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

inherited from nape.shape.Shape
+ Scale this shape in its local coordinate system.

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

inherited from nape.shape.Shape
+ Apply local transformation matrix to Shape.

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

inherited from nape.shape.Shape
+ Translate this shape in its local coordinate system.