106 return primitiveIndices_.size();
111 return candidatePrimitiveIndices_.size();
125 return activeParentCollisions_;
161 void updatePrimitiveList();
163 [[nodiscard]]
bool mayPrimitiveContactPlane(
165 size_t primitiveIndex,
166 T contactMargin)
const;
168 [[nodiscard]] T primitiveParentSpaceBound(
size_t primitiveIndex)
const;
170 void validateContactMargin(T contactMargin)
const;
172 void validateJointStateParents(std::span<
const JointStateT<T>> states)
const;
174 [[nodiscard]]
bool checkCollision(
size_t primitiveIndex, Result& result)
const;
177 std::vector<size_t> primitiveIndices_;
178 std::vector<size_t> candidatePrimitiveIndices_;
179 std::vector<T> primitiveParentSpaceBounds_;
180 std::vector<Result> activeParentCollisions_;
181 std::vector<size_t> parentContactIndices_;
182 std::vector<T> parentSurfaceDistances_;
std::vector< PlaneCollisionDebugEntryT< T > > getCollisionDebugInfo() const
Query detailed collision state for all currently-colliding primitives.
void updateActiveParentCollisions()
Select the deepest active collision under each parent joint from current candidates.
T getPlaneOffset() const
Return the plane offset after normalization by setPlane().
std::vector< PlaneCollisionContactPointT< T > > getContactPointsByParentWithDetails(std::span< const JointStateT< T > > states, T contactMargin)
Return one detailed world-space primitive surface point per parent joint at or near the plane.
const std::vector< Result > & activeParentCollisions() const
Return the current deepest active collisions, one per parent joint.
std::vector< Vector3< T > > getContactPointsByParent(std::span< const JointStateT< T > > states, T contactMargin)
Return one world-space primitive surface point per parent joint at or near the plane.
void update(std::span< const JointStateT< T > > states, T contactMargin)
Update candidate primitive state for explicit joint states and signed plane-distance margin.
const Vector3< T > & getPlaneNormal() const
Return the normalized plane normal used by collision and contact queries.
void update(const SkeletonStateT< T > &state, T contactMargin)
Update candidate primitive state for a skeleton state and signed plane-distance margin.
PlaneCollisionQueryT(const CollisionGeometry &cg, const Vector3< T > &planeNormal, T planeOffset)
Construct a query over explicit collision geometry.
void setPlane(const Vector3< T > &planeNormal, T planeOffset)
Set the collision plane after normalizing planeNormal and the matching offset.
std::vector< Vector3< T > > getContactPoints(std::span< const JointStateT< T > > states, T contactMargin)
Return world-space primitive surface points at or near the plane for explicit joint states.
size_t primitiveCount() const
Number of character-attached collision primitives owned by this query.
std::vector< size_t > getCollidingPrimitives() const
Return collision primitive indices that penetrate the plane in the current query state.
size_t candidatePrimitiveCount() const
Number of primitives retained by the most recent broad-phase update.
PlaneCollisionQueryT(const Character &character, const Vector3< T > &planeNormal, T planeOffset)
Construct a query over a character's collision geometry and initialize it at the zero pose.
CollisionGeometryT< float > CollisionGeometry
PlaneCollisionDebugEntryT< double > PlaneCollisionDebugEntryd
PlaneCollisionContactPointT< double > PlaneCollisionContactPointd
PlaneCollisionContactPointT< float > PlaneCollisionContactPoint
constexpr size_t kInvalidIndex
Sentinel value indicating an invalid or unset size_t index.
PlaneCollisionDebugEntryT< float > PlaneCollisionDebugEntry
A character model with skeletal structure, mesh, and optional components.
Represents collision geometry states using a Structure of Arrays (SoA) format.
Represents the state of a joint with local and global transformations.
Per-primitive collision debug information returned by plane-collision queries.
Vector3< float > position
Collision information for one primitive selected by the current query state.
T surfaceDistance() const
Signed distance from the primitive surface point to the plane.
Represents the complete state of a skeleton.