| 741 | |
| 742 | template<class T, class T2> |
| 743 | static PX_FORCE_INLINE void addActorT(T& actor, T2& scbActor, Ps::Array<PxRigidActor*>& actors, NpScene* scene, const Gu::BVHStructure* bvhStructure, bool hasPrunerStructure) |
| 744 | { |
| 745 | const bool noSimBuffered = scbActor.getActorFlags().isSet(PxActorFlag::eDISABLE_SIMULATION); |
| 746 | |
| 747 | PxBounds3 bounds[8+1]; // PT: +1 for safe reads in addPrunerData/inflateBounds |
| 748 | const bool canReuseBounds = !noSimBuffered && !scene->getScene().isPhysicsBuffering() && actor.getShapeManager().getNbShapes()<=8; |
| 749 | PxBounds3* uninflatedBounds = canReuseBounds ? bounds : NULL; |
| 750 | |
| 751 | scene->getScene().addActor(scbActor, noSimBuffered, uninflatedBounds, bvhStructure); |
| 752 | |
| 753 | actor.getShapeManager().setupAllSceneQuery(scene, actor, hasPrunerStructure, uninflatedBounds, bvhStructure); |
| 754 | if(!noSimBuffered) |
| 755 | actor.addConstraintsToScene(); |
| 756 | addRigidActorToArray(actor, actors); |
| 757 | } |
| 758 | |
| 759 | void NpScene::addRigidStatic(NpRigidStatic& actor, const Gu::BVHStructure* bvhStructure, bool hasPrunerStructure) |
| 760 | { |
no test coverage detected