Struct TriangleWide
- Namespace
 - BepuPhysics.Collidables
 
- Assembly
 - BepuPhysics.dll
 
public struct TriangleWide : IShapeWide<Triangle>
  - Implements
 
- Inherited Members
 
Fields
A
public Vector3Wide A
  Field Value
- Vector3Wide
 
B
public Vector3Wide B
  Field Value
- Vector3Wide
 
BackfaceNormalDotRejectionThreshold
Minimum dot product between the detected local normal and the face normal of a triangle necessary to create contacts.
public const float BackfaceNormalDotRejectionThreshold = -0.01
  Field Value
C
public Vector3Wide C
  Field Value
- Vector3Wide
 
DegenerateTriangleEpsilon
Epsilon to apply to testing triangles for degeneracy (which will be scaled by a pair-determined epsilon scale). Degenerate triangles do not have well defined normals and should not contribute
public const float DegenerateTriangleEpsilon = 1E-06
  Field Value
Properties
AllowOffsetMemoryAccess
Gets whether this type supports accessing its memory by lane offsets. If false, WriteSlot must be used instead of WriteFirst.
public bool AllowOffsetMemoryAccess { get; }
  Property Value
InternalAllocationSize
Gets the number of bytes required for allocations within the wide shape.
public int InternalAllocationSize { get; }
  Property Value
MinimumWideRayCount
Gets the lower bound on the number of rays to execute in a wide fashion. Ray bundles with fewer rays will fall back to the single ray code path.
public static int MinimumWideRayCount { get; }
  Property Value
Methods
Broadcast(in Triangle)
Broadcasts a scalar shape into a bundle containing the same shape in every lane.
public void Broadcast(in Triangle shape)
  Parameters
shapeTriangleScalar shape to broadcast.
ComputeDegenerateTriangleEpsilon(in Vector<float>, in Vector<float>, out Vector<float>, out Vector<float>)
public static void ComputeDegenerateTriangleEpsilon(in Vector<float> abLengthSquared, in Vector<float> caLengthSquared, out Vector<float> epsilonScale, out Vector<float> epsilon)
  Parameters
abLengthSquaredVector<float>caLengthSquaredVector<float>epsilonScaleVector<float>epsilonVector<float>
ComputeNondegenerateTriangleMask(in Vector3Wide, in Vector3Wide, in Vector<float>, out Vector<float>, out Vector<int>)
public static void ComputeNondegenerateTriangleMask(in Vector3Wide ab, in Vector3Wide ca, in Vector<float> triangleNormalLength, out Vector<float> epsilonScale, out Vector<int> nondegenerateMask)
  Parameters
abVector3WidecaVector3WidetriangleNormalLengthVector<float>epsilonScaleVector<float>nondegenerateMaskVector<int>
ComputeNondegenerateTriangleMask(in Vector<float>, in Vector<float>, in Vector<float>, out Vector<float>, out Vector<int>)
public static void ComputeNondegenerateTriangleMask(in Vector<float> abLengthSquared, in Vector<float> caLengthSquared, in Vector<float> triangleNormalLength, out Vector<float> epsilonScale, out Vector<int> nondegenerateMask)
  Parameters
abLengthSquaredVector<float>caLengthSquaredVector<float>triangleNormalLengthVector<float>epsilonScaleVector<float>nondegenerateMaskVector<int>
ComputeTriangleEpsilonScale(in Vector<float>, in Vector<float>, out Vector<float>)
public static void ComputeTriangleEpsilonScale(in Vector<float> abLengthSquared, in Vector<float> caLengthSquared, out Vector<float> epsilonScale)
  Parameters
GetBounds(ref QuaternionWide, int, out Vector<float>, out Vector<float>, out Vector3Wide, out Vector3Wide)
Computes the bounds of all shapes in the bundle.
public void GetBounds(ref QuaternionWide orientations, int countInBundle, out Vector<float> maximumRadius, out Vector<float> maximumAngularExpansion, out Vector3Wide min, out Vector3Wide max)
  Parameters
orientationsQuaternionWideOrientations of the shapes in the bundle.
countInBundleintNumber of lanes filled in the bundle.
maximumRadiusVector<float>Computed maximum radius of the shapes in the bundle.
maximumAngularExpansionVector<float>Computed maximum bounds expansion that can be caused by angular motion.
minVector3WideMinimum bounds of the shapes.
maxVector3WideMaximum bounds of the shapes.
Initialize(in Buffer<byte>)
For types with a nonzero internal allocation size, provides memory to the shape for internal allocations. Memory should be assumed to be stack allocated.
public void Initialize(in Buffer<byte> memory)
  Parameters
memoryBuffer<byte>Memory to use for internal allocations in the wide shape.
RayTest(ref RigidPoseWide, ref RayWide, out Vector<int>, out Vector<float>, out Vector3Wide)
Tests a ray against the shape.
public void RayTest(ref RigidPoseWide pose, ref RayWide ray, out Vector<int> intersected, out Vector<float> t, out Vector3Wide normal)
  Parameters
poseRigidPoseWiderayRayWideintersectedVector<int>Mask representing hit state in each lane. -1 means the ray in that lane hit, 0 means a miss.
tVector<float>Distance along the ray direction to the hit point, if any, in units of the ray direction's length. In other words, hitLocation = origin + direction * t.
normalVector3WideNormal of the impact surface, if any.
RayTest(ref Vector3Wide, ref Vector3Wide, ref Vector3Wide, ref Vector3Wide, ref Vector3Wide, out Vector<int>, out Vector<float>, out Vector3Wide)
public static void RayTest(ref Vector3Wide a, ref Vector3Wide b, ref Vector3Wide c, ref Vector3Wide origin, ref Vector3Wide direction, out Vector<int> intersected, out Vector<float> t, out Vector3Wide normal)
  Parameters
aVector3WidebVector3WidecVector3WideoriginVector3WidedirectionVector3WideintersectedVector<int>tVector<float>normalVector3Wide
WriteFirst(in Triangle)
Places the specified AOS-formatted shape into the first lane of the wide 'this' reference.
public void WriteFirst(in Triangle source)
  Parameters
sourceTriangleAOS-formatted shape to gather from.
Remarks
Note that we are effectively using the TShapeWide as a stride. The base address is offset by the user of this function, so the implementation only ever considers the first slot.
WriteSlot(int, in Triangle)
Places the specified AOS-formatted shape into the selected slot of the wide 'this' reference.
public void WriteSlot(int index, in Triangle source)