图形计算合集

Constructor

new ()

创建一个图形空间,用于管理所有图形的碰撞管理

Variables

@:value([])list:Array<Shape> = []

所有图形列表

@:value([])shapeResults:Map<Shape, Results_differ_data_ShapeCollision> = []

碰撞结果

@:value([])typeList:Map<String, Array<Shape>> = []

分类的图形列表

@:value([])typeMaps:Map<Shape, String> = []

类型绑定

Methods

@:value({ type : null })add (shape:Shape, ?type:String):Void

添加互动图形

Parameters:

shape
null

type

remove (shape:Shape):Void

删除互动图形

Parameters:

null

shape

@:value({ into : null, type : null })test (shape:Shape, ?type:String, ?into:Null<Results_differ_data_ShapeCollision>):Results_differ_data_ShapeCollision

测试图形碰撞

Parameters:

shape
into

用于接收碰撞结果

type

与什么类型进行碰撞

into

碰撞图形结果预设对象,使用该角色,可以减少垃圾回收

Returns:

Bool

@:value({ into : null, type : null })testRay (shape:Ray, ?type:String, ?into:Null<Results_differ_data_RayCollision>):Results_differ_data_RayCollision

测试射线碰撞

Parameters:

shape
into

用于接收碰撞结果

type

与什么类型进行碰撞

into

碰撞图形结果预设对象,使用该角色,可以减少垃圾回收

Returns:

Bool