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