Search
Preparing search index...
The search index is not available
CocosCreatorAPI
Options
All
Public
Public/Protected
All
Inherited
Externals
Only exported
Menu
Globals
collision
b2PolygonShape
Class b2PolygonShape
Hierarchy
b2Shape
b2PolygonShape
Index
Constructors
constructor
Properties
m_
centroid
m_
count
m_
normals
m_
radius
m_
type
m_
vertices
ComputeAABB_
s_v
Compute
Centroid_
s_e1
Compute
Centroid_
s_e2
Compute
Centroid_
s_p
Ref
Compute
Distance_
s_distance
Compute
Distance_
s_min
Distance
Compute
Distance_
s_normal
For
Max
Distance
Compute
Distance_
s_p
Local
Compute
Mass_
s_center
Compute
Mass_
s_e1
Compute
Mass_
s_e2
Compute
Mass_
s_s
Compute
Submerged
Area_
s_center
Compute
Submerged
Area_
s_into
Vec
Compute
Submerged
Area_
s_md
Compute
Submerged
Area_
s_normalL
Compute
Submerged
Area_
s_outo
Vec
Ray
Cast_
s_d
Ray
Cast_
s_p1
Ray
Cast_
s_p2
Set_
s_r
Set_
s_v
Test
Point_
s_p
Local
Validate_
s_e
Validate_
s_v
Methods
Clone
ComputeAABB
Compute
Distance
Compute
Mass
Compute
Submerged
Area
Copy
Dump
Get
Child
Count
Get
Type
Ray
Cast
Set
Set
AsBox
Setup
Distance
Proxy
Test
Point
Validate
Set
Compute
Centroid
Constructors
constructor
new b2
Polygon
Shape
(
)
:
b2PolygonShape
Returns
b2PolygonShape
Properties
Readonly
m_
centroid
m_
centroid
:
b2Vec2
= new b2Vec2(0, 0)
m_
count
m_
count
:
number
= 0
m_
normals
m_
normals
:
b2Vec2
[]
= []
m_
radius
m_
radius
:
number
= 0
Readonly
m_
type
m_
type
:
b2ShapeType
= b2ShapeType.e_unknown
m_
vertices
m_
vertices
:
b2Vec2
[]
= []
Static
Private
ComputeAABB_
s_v
ComputeAABB_
s_v
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Centroid_
s_e1
Compute
Centroid_
s_e1
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Centroid_
s_e2
Compute
Centroid_
s_e2
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Centroid_
s_p
Ref
Compute
Centroid_
s_p
Ref
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Distance_
s_distance
Compute
Distance_
s_distance
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Distance_
s_min
Distance
Compute
Distance_
s_min
Distance
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Distance_
s_normal
For
Max
Distance
Compute
Distance_
s_normal
For
Max
Distance
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Distance_
s_p
Local
Compute
Distance_
s_p
Local
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Mass_
s_center
Compute
Mass_
s_center
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Mass_
s_e1
Compute
Mass_
s_e1
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Mass_
s_e2
Compute
Mass_
s_e2
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Mass_
s_s
Compute
Mass_
s_s
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Submerged
Area_
s_center
Compute
Submerged
Area_
s_center
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Submerged
Area_
s_into
Vec
Compute
Submerged
Area_
s_into
Vec
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Submerged
Area_
s_md
Compute
Submerged
Area_
s_md
:
b2MassData
= new b2MassData()
Static
Private
Compute
Submerged
Area_
s_normalL
Compute
Submerged
Area_
s_normalL
:
b2Vec2
= new b2Vec2()
Static
Private
Compute
Submerged
Area_
s_outo
Vec
Compute
Submerged
Area_
s_outo
Vec
:
b2Vec2
= new b2Vec2()
Static
Private
Ray
Cast_
s_d
Ray
Cast_
s_d
:
b2Vec2
= new b2Vec2()
Static
Private
Ray
Cast_
s_p1
Ray
Cast_
s_p1
:
b2Vec2
= new b2Vec2()
Static
Private
Ray
Cast_
s_p2
Ray
Cast_
s_p2
:
b2Vec2
= new b2Vec2()
Static
Private
Set_
s_r
Set_
s_r
:
b2Vec2
= new b2Vec2()
Static
Private
Set_
s_v
Set_
s_v
:
b2Vec2
= new b2Vec2()
Static
Private
Test
Point_
s_p
Local
Test
Point_
s_p
Local
:
b2Vec2
= new b2Vec2()
Static
Private
Validate_
s_e
Validate_
s_e
:
b2Vec2
= new b2Vec2()
Static
Private
Validate_
s_v
Validate_
s_v
:
b2Vec2
= new b2Vec2()
Methods
Clone
Clone
(
)
:
b2PolygonShape
Returns
b2PolygonShape
ComputeAABB
ComputeAABB
(
aabb
:
b2AABB
, xf
:
b2Transform
, childIndex
:
number
)
:
void
Parameters
aabb:
b2AABB
xf:
b2Transform
childIndex:
number
Returns
void
Compute
Distance
Compute
Distance
(
xf
:
b2Transform
, p
:
b2Vec2
, normal
:
b2Vec2
, childIndex
:
number
)
:
number
Parameters
xf:
b2Transform
p:
b2Vec2
normal:
b2Vec2
childIndex:
number
Returns
number
Compute
Mass
Compute
Mass
(
massData
:
b2MassData
, density
:
number
)
:
void
Parameters
massData:
b2MassData
density:
number
Returns
void
Compute
Submerged
Area
Compute
Submerged
Area
(
normal
:
b2Vec2
, offset
:
number
, xf
:
b2Transform
, c
:
b2Vec2
)
:
number
Parameters
normal:
b2Vec2
offset:
number
xf:
b2Transform
c:
b2Vec2
Returns
number
Copy
Copy
(
other
:
b2PolygonShape
)
:
b2PolygonShape
Parameters
other:
b2PolygonShape
Returns
b2PolygonShape
Dump
Dump
(
log
:
(
format
:
string
,
...
args
:
any
[]
)
=>
void
)
:
void
Parameters
log:
(
format
:
string
,
...
args
:
any
[]
)
=>
void
(
format
:
string
,
...
args
:
any
[]
)
:
void
Parameters
format:
string
Rest
...
args:
any
[]
Returns
void
Returns
void
Get
Child
Count
Get
Child
Count
(
)
:
number
Returns
number
Get
Type
Get
Type
(
)
:
b2ShapeType
Returns
b2ShapeType
Ray
Cast
Ray
Cast
(
output
:
b2RayCastOutput
, input
:
b2RayCastInput
, xf
:
b2Transform
, childIndex
:
number
)
:
boolean
Parameters
output:
b2RayCastOutput
input:
b2RayCastInput
xf:
b2Transform
childIndex:
number
Returns
boolean
Set
Set
(
vertices
:
XY
[]
)
:
b2PolygonShape
Set
(
vertices
:
XY
[]
, count
:
number
)
:
b2PolygonShape
Set
(
vertices
:
number
[]
)
:
b2PolygonShape
Parameters
vertices:
XY
[]
Returns
b2PolygonShape
Parameters
vertices:
XY
[]
count:
number
Returns
b2PolygonShape
Parameters
vertices:
number
[]
Returns
b2PolygonShape
Set
AsBox
Set
AsBox
(
hx
:
number
, hy
:
number
, center
?:
XY
, angle
?:
number
)
:
b2PolygonShape
Parameters
hx:
number
hy:
number
Optional
center:
XY
Default value
angle:
number
= 0
Returns
b2PolygonShape
Setup
Distance
Proxy
Setup
Distance
Proxy
(
proxy
:
b2DistanceProxy
, index
:
number
)
:
void
Parameters
proxy:
b2DistanceProxy
index:
number
Returns
void
Test
Point
Test
Point
(
xf
:
b2Transform
, p
:
XY
)
:
boolean
Parameters
xf:
b2Transform
p:
XY
Returns
boolean
Validate
Validate
(
)
:
boolean
Returns
boolean
Set
Set
(
vertices
:
(
index
:
number
)
=>
XY
, count
:
number
)
:
b2PolygonShape
Parameters
vertices:
(
index
:
number
)
=>
XY
(
index
:
number
)
:
XY
Parameters
index:
number
Returns
XY
count:
number
Returns
b2PolygonShape
Static
Compute
Centroid
Compute
Centroid
(
vs
:
b2Vec2
[]
, count
:
number
, out
:
b2Vec2
)
:
b2Vec2
Parameters
vs:
b2Vec2
[]
count:
number
out:
b2Vec2
Returns
b2Vec2
Globals
node_
modules\@cocos\box2d\src\collision
b2
Polygon
Shape
constructor
m_
centroid
m_
count
m_
normals
m_
radius
m_
type
m_
vertices
ComputeAABB_
s_v
Compute
Centroid_
s_e1
Compute
Centroid_
s_e2
Compute
Centroid_
s_p
Ref
Compute
Distance_
s_distance
Compute
Distance_
s_min
Distance
Compute
Distance_
s_normal
For
Max
Distance
Compute
Distance_
s_p
Local
Compute
Mass_
s_center
Compute
Mass_
s_e1
Compute
Mass_
s_e2
Compute
Mass_
s_s
Compute
Submerged
Area_
s_center
Compute
Submerged
Area_
s_into
Vec
Compute
Submerged
Area_
s_md
Compute
Submerged
Area_
s_normalL
Compute
Submerged
Area_
s_outo
Vec
Ray
Cast_
s_d
Ray
Cast_
s_p1
Ray
Cast_
s_p2
Set_
s_r
Set_
s_v
Test
Point_
s_p
Local
Validate_
s_e
Validate_
s_v
Clone
ComputeAABB
Compute
Distance
Compute
Mass
Compute
Submerged
Area
Copy
Dump
Get
Child
Count
Get
Type
Ray
Cast
Set
Set
AsBox
Setup
Distance
Proxy
Test
Point
Validate
Set
Compute
Centroid
Generated using
TypeDoc