Struct VertexSupportMap
Implements a SIMD accelerated support map for a set of vertices.
public struct VertexSupportMap : ISupportMappable, IEquatable<VertexSupportMap>
- Implements
- Inherited Members
Constructors
VertexSupportMap(IEnumerable<JVector>)
public VertexSupportMap(IEnumerable<JVector> vertices)
Parameters
verticesIEnumerable<JVector>
VertexSupportMap(ReadOnlySpan<JVector>)
public VertexSupportMap(ReadOnlySpan<JVector> vertices)
Parameters
verticesReadOnlySpan<JVector>
Methods
Equals(VertexSupportMap)
Indicates whether the current object is equal to another object of the same type.
public readonly bool Equals(VertexSupportMap other)
Parameters
otherVertexSupportMapAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override readonly bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
GetCenter(out JVector)
Computes a point deep within the shape, used as an initial search point in GJK-based algorithms.
public readonly void GetCenter(out JVector point)
Parameters
pointJVectorA point guaranteed to be inside the convex hull, typically the center of mass.
GetHashCode()
Returns the hash code for this instance.
public override readonly int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
SupportMap(in JVector, out JVector)
Computes the point on the shape that is furthest in the specified direction.
public readonly void SupportMap(in JVector direction, out JVector result)
Parameters
directionJVectorThe search direction in local space. Does not need to be normalized.
resultJVectorThe point on the shape's surface furthest along
direction.
Operators
operator ==(VertexSupportMap, VertexSupportMap)
public static bool operator ==(VertexSupportMap left, VertexSupportMap right)
Parameters
leftVertexSupportMaprightVertexSupportMap
Returns
operator !=(VertexSupportMap, VertexSupportMap)
public static bool operator !=(VertexSupportMap left, VertexSupportMap right)
Parameters
leftVertexSupportMaprightVertexSupportMap