| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
- //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
- #pragma once
- #include "BsPhysXPrerequisites.h"
- #include "BsMeshCollider.h"
- #include "PxPhysics.h"
- namespace BansheeEngine
- {
- /** @addtogroup PhysX
- * @{
- */
- /** PhysX implementation of a MeshCollider. */
- class PhysXMeshCollider : public MeshCollider
- {
- public:
- PhysXMeshCollider(physx::PxPhysics* physx, const Vector3& position, const Quaternion& rotation);
- ~PhysXMeshCollider();
- /** @copydoc MeshCollider::setScale */
- void setScale(const Vector3& scale) override;
- private:
- /** Returns the PhysX collider implementation common to all colliders. */
- FPhysXCollider* getInternal() const;
- /** @copydoc MeshCollider::onMeshChanged */
- void onMeshChanged() override;
- /** Applies mesh geometry using the set mesh and scale. */
- void applyGeometry();
- /** Sets new geometry to the underlying shape. Rebuilds the shape if necessary. */
- void setGeometry(const physx::PxGeometry& geometry);
- };
- /** @} */
- }
|