Table of Contents

Class CollisionIndexPair

Namespace
Hi.Collision
Assembly
HiMech.dll

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 ICollisionIndex

The first collision index.

indexB ICollisionIndex

The 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 XElement

The XML element containing the pair data.

baseDirectory string

The 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

string

Properties

CollisionFlag

Gets or sets the collision flag indicating the collision status between the two objects.

public CollisionFlag CollisionFlag { get; }

Property Value

CollisionFlag

IndexA

Gets the first collision index in the pair.

public ICollisionIndex IndexA { get; }

Property Value

ICollisionIndex

IndexB

Gets the second collision index in the pair.

public ICollisionIndex IndexB { get; }

Property Value

ICollisionIndex

MatAB

Gets or sets the transformation matrix from object A to object B.

public Mat4d MatAB { get; set; }

Property Value

Mat4d

SafeDistance

Gets or sets the safe distance between the two collision indices.

public double SafeDistance { get; set; }

Property Value

double

Methods

Equals(object)

Determines whether the specified object is equal to the current object.

public override bool Equals(object obj)

Parameters

obj object

The object to compare with the current object.

Returns

bool

true if the specified object is equal to the current object; otherwise, false.

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 string

The base directory for resolving relative paths

relFile string

The relative file path for the XML source

Returns

XElement

An XML element representing the object's state