Table of Contents

Class AnchoredCollidablePair

Namespace
Hi.Collision
Assembly
HiMech.dll

Represents a pair of anchored collidable objects for collision detection.

public class AnchoredCollidablePair : IMakeXmlSource
Inheritance
AnchoredCollidablePair
Implements
Inherited Members
Extension Methods

Constructors

AnchoredCollidablePair(IAnchoredCollidableBased, IAnchoredCollidableBased)

Initializes a new instance of the AnchoredCollidablePair class with two collidable objects.

public AnchoredCollidablePair(IAnchoredCollidableBased indexA, IAnchoredCollidableBased indexB)

Parameters

indexA IAnchoredCollidableBased

The first collidable object.

indexB IAnchoredCollidableBased

The second collidable object.

AnchoredCollidablePair(string, IAnchoredCollidableBased, IAnchoredCollidableBased)

Initializes a new instance of the AnchoredCollidablePair class with a name and two collidable objects.

public AnchoredCollidablePair(string name, IAnchoredCollidableBased indexA, IAnchoredCollidableBased indexB)

Parameters

name string

The name of the pair.

indexA IAnchoredCollidableBased

The first collidable object.

indexB IAnchoredCollidableBased

The second collidable object.

AnchoredCollidablePair(XElement, string, params object[])

Initializes a new instance of the AnchoredCollidablePair class from XML.

public AnchoredCollidablePair(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 collidable object in the pair.

public IAnchoredCollidableBased IndexA { get; }

Property Value

IAnchoredCollidableBased

IndexB

Gets the second collidable object in the pair.

public IAnchoredCollidableBased IndexB { get; }

Property Value

IAnchoredCollidableBased

MatAB

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

public Mat4d MatAB { get; set; }

Property Value

Mat4d

Name

Gets or sets the pair name for UI manipulation.

public string Name { get; set; }

Property Value

string

SafeDistance

Gets or sets the safe distance between the two collidable objects.

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