Struct ConvexHullWide
- Namespace
- BepuPhysics.Collidables
- Assembly
- BepuPhysics.dll
public struct ConvexHullWide : IShapeWide<ConvexHull>- Implements
- Inherited Members
Fields
Hulls
public Buffer<ConvexHull> HullsField Value
- Buffer<ConvexHull>
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 ConvexHull)
Broadcasts a scalar shape into a bundle containing the same shape in every lane.
public void Broadcast(in ConvexHull shape)Parameters
- shapeConvexHull
- Scalar shape to broadcast. 
EstimateEpsilonScale(in Vector<int>, out Vector<float>)
Provides an estimate of the scale of a shape.
public void EstimateEpsilonScale(in Vector<int> terminatedLanes, out Vector<float> epsilonScale)Parameters
- terminatedLanesVector<int>
- Mask of lanes which are inactive. 
- epsilonScaleVector<float>
- Approximate scale of the shape for use in epsilons. 
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
- orientationsQuaternionWide
- Orientations of the shapes in the bundle. 
- countInBundleint
- Number 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. 
- minVector3Wide
- Minimum bounds of the shapes. 
- maxVector3Wide
- Maximum 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 poses, ref RayWide rayWide, out Vector<int> intersected, out Vector<float> t, out Vector3Wide normal)Parameters
- posesRigidPoseWide
- Poses of the shape bundle during the ray test. 
- rayWideRayWide
- Ray to test against the shape bundle. 
- intersectedVector<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. 
- normalVector3Wide
- Normal of the impact surface, if any. 
WriteFirst(in ConvexHull)
Places the specified AOS-formatted shape into the first lane of the wide 'this' reference.
public void WriteFirst(in ConvexHull source)Parameters
- sourceConvexHull
- AOS-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 ConvexHull)
Places the specified AOS-formatted shape into the selected slot of the wide 'this' reference.
public void WriteSlot(int index, in ConvexHull source)Parameters
- indexint
- Index of the slot to put the data into. 
- sourceConvexHull
- Source of the data to insert.