29#ifndef CUSTOM_CONVEX_H
30#define CUSTOM_CONVEX_H
32#include "PxPhysicsAPI.h"
44 const physx::PxReal contactDistance,
const physx::PxReal meshContactMargin,
const physx::PxReal toleranceLength,
49 virtual bool sweep(
const physx::PxVec3& unitDir,
const physx::PxReal maxDist,
79 CustomCone(
float _height,
float _radius,
float _margin) :
CustomConvex(_margin), height(_height), radius(_radius) {}
Class representing 3D range or axis aligned bounding box.
Definition PxBounds3.h:58
A geometry object.
Definition PxGeometry.h:79
Utility class to compute and manipulate mass and inertia tensor properties.
Definition PxMassProperties.h:65
Definition PxRenderOutput.h:50
3 Element vector class.
Definition PxVec3.h:50
#define DECLARE_CUSTOM_GEOMETRY_TYPE
Used in pair with IMPLEMENT_CUSTOM_GEOMETRY_TYPE to overwrite Callbacks::getCustomType() callback.
Definition PxCustomGeometry.h:291
Definition CustomConvex.h:76
virtual physx::PxVec3 supportLocal(const physx::PxVec3 &dir) const
Return the farthest point on the user defined shape's core in given direction.
Definition CustomConvex.cpp:248
virtual DECLARE_CUSTOM_GEOMETRY_TYPE void computeMassProperties(const physx::PxGeometry &geometry, physx::PxMassProperties &massProperties) const
Compute custom geometry mass properties. For geometries usable with dynamic rigidbodies.
Definition CustomConvex.cpp:238
Definition CustomConvex.h:35
virtual bool overlap(const physx::PxGeometry &geom0, const physx::PxTransform &pose0, const physx::PxGeometry &geom1, const physx::PxTransform &pose1, physx::PxOverlapThreadContext *) const
Overlap. Test if geometries overlap.
Definition CustomConvex.cpp:155
virtual physx::PxBounds3 getLocalBounds(const physx::PxGeometry &) const
Return local bounds.
Definition CustomConvex.cpp:44
virtual bool generateContacts(const physx::PxGeometry &geom0, const physx::PxGeometry &geom1, const physx::PxTransform &pose0, const physx::PxTransform &pose1, const physx::PxReal contactDistance, const physx::PxReal meshContactMargin, const physx::PxReal toleranceLength, physx::PxContactBuffer &contactBuffer) const
Contacts generation. Generate collision contacts between two geometries in given poses.
Definition CustomConvex.cpp:52
virtual void visualize(const physx::PxGeometry &, physx::PxRenderOutput &, const physx::PxTransform &, const physx::PxBounds3 &) const
Visualize custom geometry for debugging. Optional.
Definition CustomConvex.h:52
virtual physx::PxReal getMargin() const
Return the user defined shape margin. Margin should be greater than or equal to 0.
Definition CustomConvex.cpp:206
virtual bool usePersistentContactManifold(const physx::PxGeometry &, physx::PxReal &) const
Compatible with PhysX's PCM feature. Allows to optimize contact generation.
Definition CustomConvex.h:53
Definition CustomConvex.h:60
virtual DECLARE_CUSTOM_GEOMETRY_TYPE void computeMassProperties(const physx::PxGeometry &geometry, physx::PxMassProperties &massProperties) const
Compute custom geometry mass properties. For geometries usable with dynamic rigidbodies.
Definition CustomConvex.cpp:217
virtual physx::PxVec3 supportLocal(const physx::PxVec3 &dir) const
Return the farthest point on the user defined shape's core in given direction.
Definition CustomConvex.cpp:226
Custom geometry callbacks structure. User should inherit this and implement all pure virtual function...
Definition PxCustomGeometry.h:102
Stores results of raycast queries.
Definition PxGeometryHit.h:151
Stores results of sweep queries.
Definition PxGeometryHit.h:175
Abstract interface for a user defined shape GJK mapping support. A user defined shape consists of a c...
Definition PxGjkQuery.h:55
A per-thread context passed to low-level query functions.
Definition PxGeometryQueryContext.h:52