| 1 | //************************************ bs::framework - Copyright 2018 Marko Pintera **************************************// |
|---|---|
| 2 | //*********** Licensed under the MIT license. See LICENSE.md for full terms. This notice is not to be removed. ***********// |
| 3 | #include "Physics/BsMeshCollider.h" |
| 4 | #include "Physics/BsPhysics.h" |
| 5 | |
| 6 | namespace bs |
| 7 | { |
| 8 | SPtr<MeshCollider> MeshCollider::create(PhysicsScene& scene, const Vector3& position, const Quaternion& rotation) |
| 9 | { |
| 10 | return scene.createMeshCollider(position, rotation); |
| 11 | } |
| 12 | |
| 13 | void MeshCollider::getListenerResources(Vector<HResource>& resources) |
| 14 | { |
| 15 | if(mMesh != nullptr) |
| 16 | resources.push_back(mMesh); |
| 17 | } |
| 18 | |
| 19 | void MeshCollider::notifyResourceLoaded(const HResource& resource) |
| 20 | { |
| 21 | onMeshChanged(); |
| 22 | } |
| 23 | |
| 24 | void MeshCollider::notifyResourceChanged(const HResource& resource) |
| 25 | { |
| 26 | onMeshChanged(); |
| 27 | } |
| 28 | } |