C# Class FarseerPhysics.Collision.Shapes.EdgeShape

A line segment (edge) Shape. These can be connected in chains or loops to other edge Shapes. The connectivity information is used to ensure correct contact normals.
Inheritance: Shape
Exibir arquivo Open project: prime31/Nez Class Usage Examples

Public Properties

Property Type Description
hasVertex0 bool
hasVertex3 bool
vertex0 UnityEngine.Vector2
vertex3 UnityEngine.Vector2

Public Methods

Method Description
CompareTo ( EdgeShape shape ) : bool
EdgeShape ( Vector2 start, Vector2 end ) : FarseerPhysics.Common

Create a new EdgeShape with the specified start and end.

Set ( Vector2 start, Vector2 end ) : void

Set this as an isolated edge.

clone ( ) : Shape
computeAABB ( AABB &aabb, Transform &transform, int childIndex ) : void
computeSubmergedArea ( Vector2 &normal, float offset, Transform &xf, Vector2 &sc ) : float
rayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool
testPoint ( Transform &transform, Vector2 &point ) : bool

Protected Methods

Method Description
computeProperties ( ) : void

Private Methods

Method Description
EdgeShape ( ) : FarseerPhysics.Common

Method Details

CompareTo() public method

public CompareTo ( EdgeShape shape ) : bool
shape EdgeShape
return bool

EdgeShape() public method

Create a new EdgeShape with the specified start and end.
public EdgeShape ( Vector2 start, Vector2 end ) : FarseerPhysics.Common
start UnityEngine.Vector2 The start of the edge.
end UnityEngine.Vector2 The end of the edge.
return FarseerPhysics.Common

Set() public method

Set this as an isolated edge.
public Set ( Vector2 start, Vector2 end ) : void
start UnityEngine.Vector2 The start.
end UnityEngine.Vector2 The end.
return void

clone() public method

public clone ( ) : Shape
return Shape

computeAABB() public method

public computeAABB ( AABB &aabb, Transform &transform, int childIndex ) : void
aabb AABB
transform UnityEngine.Transform
childIndex int
return void

computeProperties() protected method

protected computeProperties ( ) : void
return void

computeSubmergedArea() public method

public computeSubmergedArea ( Vector2 &normal, float offset, Transform &xf, Vector2 &sc ) : float
normal UnityEngine.Vector2
offset float
xf UnityEngine.Transform
sc UnityEngine.Vector2
return float

rayCast() public method

public rayCast ( RayCastOutput &output, RayCastInput &input, Transform &transform, int childIndex ) : bool
output RayCastOutput
input RayCastInput
transform UnityEngine.Transform
childIndex int
return bool

testPoint() public method

public testPoint ( Transform &transform, Vector2 &point ) : bool
transform UnityEngine.Transform
point UnityEngine.Vector2
return bool

Property Details

hasVertex0 public_oe property

Is true if the edge is connected to an adjacent vertex before vertex 1.
public bool hasVertex0
return bool

hasVertex3 public_oe property

Is true if the edge is connected to an adjacent vertex after vertex2.
public bool hasVertex3
return bool

vertex0 public_oe property

Optional adjacent vertices. These are used for smooth collision.
public Vector2,UnityEngine vertex0
return UnityEngine.Vector2

vertex3 public_oe property

Optional adjacent vertices. These are used for smooth collision.
public Vector2,UnityEngine vertex3
return UnityEngine.Vector2