Class AnchoredCollidablePair
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
IAnchoredCollidableBasedThe first collidable object.
indexB
IAnchoredCollidableBasedThe 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
stringThe name of the pair.
indexA
IAnchoredCollidableBasedThe first collidable object.
indexB
IAnchoredCollidableBasedThe 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
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 collidable object in the pair.
public IAnchoredCollidableBased IndexA { get; }
Property Value
IndexB
Gets the second collidable object in the pair.
public IAnchoredCollidableBased IndexB { get; }
Property Value
MatAB
Gets or sets the transformation matrix from object A to object B.
public Mat4d MatAB { get; set; }
Property Value
Name
Gets or sets the pair name for UI manipulation.
public string Name { get; set; }
Property Value
SafeDistance
Gets or sets the safe distance between the two collidable objects.
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