Struct Arbiter
Definition
- Namespace:
- Tizen.NUI.Physics2D.Chipmunk
- Assembly:
- Tizen.NUI.Physics2D.dll
The Arbiter object encapsulates a pair of colliding shapes and all of the data
about their collision.
public struct Arbiter : IEquatable<Arbiter>
- Implements
-
Properties
View Source
The contact point set for an arbiter. This can be a very powerful feature, but use it
with caution!
Declaration
public ContactPointSet ContactPointSet { get; set; }
Property Value
View Source
Count
Get the number of contact points for this arbiter.
Declaration
public int Count { get; }
Property Value
View Source
Data
Declaration
public object Data { get; set; }
Property Value
View Source
Friction
Friction coefficient that will be applied to the pair of colliding objects.
Declaration
public double Friction { get; set; }
Property Value
View Source
Handle
Declaration
public System.IntPtr Handle { get; }
Property Value
Type |
Description |
System.IntPtr |
|
View Source
Returns true if this is the first step a pair of objects started colliding.
Declaration
public bool IsFirstContact { get; }
Property Value
View Source
IsRemoval
Returns true if the separate callback is due to a shape being removed from the space.
Declaration
public bool IsRemoval { get; }
Property Value
View Source
Normal
Get the normal of the collision.
Declaration
public Vect Normal { get; }
Property Value
View Source
Restitution
The restitution (elasticity) that will be applied to the pair of colliding objects.
Declaration
public double Restitution { get; set; }
Property Value
View Source
SurfaceVelocity
The relative surface velocity of the two shapes in contact.
Declaration
public Vect SurfaceVelocity { get; set; }
Property Value
View Source
TotalImpulse
Calculate the total impulse including the friction that was applied by this arbiter.
This function should only be called from a post-solve, post-step or cpBodyEachArbiter
callback.
Declaration
public Vect TotalImpulse { get; }
Property Value
View Source
TotalKE
Calculate the amount of energy lost in a collision including static, but not dynamic friction.
This function should only be called from a post-solve, post-step or cpBodyEachArbiter callback.
Declaration
public double TotalKE { get; }
Property Value
Methods
View Source
CallWildcardBeginA(Space)
If you want a custom callback to invoke the wildcard callback for the first collision
type, you must call this function explicitly. You must decide how to handle the
wildcard's return value since it may disagree with the other wildcard handler's return
value or your own.
Declaration
public void CallWildcardBeginA(Space space)
Parameters
Type |
Name |
Description |
Space |
space |
|
View Source
CallWildcardBeginB(Space)
If you want a custom callback to invoke the wildcard callback for the second collision
type, you must call this function explicitly. You must decide how to handle the
wildcard's return value since it may disagree with the other wildcard handler's return
value or your own.
Declaration
public void CallWildcardBeginB(Space space)
Parameters
Type |
Name |
Description |
Space |
space |
|
View Source
CallWildcardPostSolveA(Space)
If you want a custom callback to invoke the wildcard callback for the first collision
type, you must call this function explicitly.
Declaration
public void CallWildcardPostSolveA(Space space)
Parameters
Type |
Name |
Description |
Space |
space |
|
View Source
CallWildcardPostSolveB(Space)
If you want a custom callback to invoke the wildcard callback for the second collision
type, you must call this function explicitly.
Declaration
public void CallWildcardPostSolveB(Space space)
Parameters
Type |
Name |
Description |
Space |
space |
|
View Source
CallWildcardPreSolveA(Space)
If you want a custom callback to invoke the wildcard callback for the first collision
type, you must call this function explicitly. You must decide how to handle the
wildcard's return value since it may disagree with the other wildcard handler's return
value or your own.
Declaration
public bool CallWildcardPreSolveA(Space space)
Parameters
Type |
Name |
Description |
Space |
space |
|
Returns
View Source
CallWildcardPreSolveB(Space)
If you want a custom callback to invoke the wildcard callback for the second collision
type, you must call this function explicitly. You must decide how to handle the
wildcard's return value since it may disagree with the other wildcard handler's return
value or your own.
Declaration
public bool CallWildcardPreSolveB(Space space)
Parameters
Type |
Name |
Description |
Space |
space |
|
Returns
View Source
CallWildcardSeparateA(Space)
If you want a custom callback to invoke the wildcard callback for the first collision
type, you must call this function explicitly.
Declaration
public void CallWildcardSeparateA(Space space)
Parameters
Type |
Name |
Description |
Space |
space |
|
View Source
CallWildcardSeparateB(Space)
If you want a custom callback to invoke the wildcard callback for the second collision
type, you must call this function explicitly.
Declaration
public void CallWildcardSeparateB(Space space)
Parameters
Type |
Name |
Description |
Space |
space |
|
View Source
Equals(object)
Check if an arbiter is equal to the given object.
Declaration
public override bool Equals(object obj)
Parameters
Type |
Name |
Description |
object |
obj |
|
Returns
View Source
Equals(Arbiter)
Return true if an arbiter is equal to another.
Declaration
public bool Equals(Arbiter other)
Parameters
Type |
Name |
Description |
Arbiter |
other |
|
Returns
View Source
GetBodies(out Body, out Body)
Return the colliding bodies involved for this arbiter. The order of the
CollisionType values the bodies are associated with will match the
order set when the collision handler was registered.
Declaration
public void GetBodies(out Body a, out Body b)
Parameters
View Source
GetDepth(int)
Get the depth (amount of overlap) of the i
th contact point.
Declaration
public double GetDepth(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
View Source
GetHashCode()
Declaration
public override int GetHashCode()
Returns
View Source
GetPointA(int)
Get the position of the i
th contact point on the surface of the first
shape.
Declaration
public Vect GetPointA(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
View Source
GetPointB(int)
Get the position of the i
th contact point on the surface of the
second shape.
Declaration
public Vect GetPointB(int i)
Parameters
Type |
Name |
Description |
int |
i |
|
Returns
View Source
GetShapes(out Shape, out Shape)
Return the colliding shapes involved for this arbiter. The order of their
CollisionType values will match the order set when the collision
handler was registered.
Declaration
public void GetShapes(out Shape a, out Shape b)
Parameters
View Source
Ignore()
Mark a collision pair to be ignored until the two objects separate. Pre-solve and
post-solve callbacks will not be called, but the separate callback will be called.
Declaration
Returns
View Source
ToString()
Return the arbiter's handle prefixed by 'Handle: '.
Declaration
public override string ToString()
Returns
Operators
View Source
operator ==(Arbiter, Arbiter)
Check if one arbiter is equal to another.
Declaration
public static bool operator ==(Arbiter left, Arbiter right)
Parameters
Returns
View Source
operator !=(Arbiter, Arbiter)
Check if one arbiter is inequal to another.
Declaration
public static bool operator !=(Arbiter left, Arbiter right)
Parameters
Returns
Implements
IEquatable<>
Extension Methods