Class CollisionIndexPair
Represents a pair of collision indices for collision detection.
public class CollisionIndexPair : IMakeXmlSource
- Inheritance
-
CollisionIndexPair
- Implements
- Inherited Members
- Extension Methods
Constructors
CollisionIndexPair(ICollisionIndex, ICollisionIndex)
Initializes a new instance of the CollisionIndexPair class with two collision indices.
public CollisionIndexPair(ICollisionIndex indexA, ICollisionIndex indexB)
Parameters
indexA
ICollisionIndexThe first collision index.
indexB
ICollisionIndexThe second collision index.
CollisionIndexPair(XElement, string, params object[])
Initializes a new instance of the CollisionIndexPair class from XML.
public CollisionIndexPair(XElement src, string baseDirectory, params object[] res)
Parameters
src
XElementThe XML element containing the pair data.
baseDirectory
stringThe base directory for resolving relative paths.
res
object[]Additional resources for initialization.
Fields
XName
The XML element name for serialization.
public static string XName
Field Value
Properties
CollisionFlag
Gets or sets the collision flag indicating the collision status between the two objects.
public CollisionFlag CollisionFlag { get; }
Property Value
IndexA
Gets the first collision index in the pair.
public ICollisionIndex IndexA { get; }
Property Value
IndexB
Gets the second collision index in the pair.
public ICollisionIndex IndexB { get; }
Property Value
MatAB
Gets or sets the transformation matrix from object A to object B.
public Mat4d MatAB { get; set; }
Property Value
SafeDistance
Gets or sets the safe distance between the two collision indices.
public double SafeDistance { get; set; }
Property Value
Methods
Equals(object)
Determines whether the specified object is equal to the current object.
public override bool Equals(object obj)
Parameters
obj
objectThe object to compare with the current object.
Returns
GetHashCode()
Serves as the default hash function.
public override int GetHashCode()
Returns
- int
A hash code for the current object.
MakeXmlSource(string, string)
Creates an XML representation of the object. This method may also generate additional resources such as related files.
public XElement MakeXmlSource(string baseDirectory, string relFile)
Parameters
baseDirectory
stringThe base directory for resolving relative paths
relFile
stringThe relative file path for the XML source
Returns
- XElement
An XML element representing the object's state