| 112 | } |
| 113 | |
| 114 | void NpAggregate::addActorInternal(PxActor& actor, NpScene& s, const PxBVHStructure* bvhStructure) |
| 115 | { |
| 116 | if (actor.getType() != PxActorType::eARTICULATION_LINK) |
| 117 | { |
| 118 | Scb::Actor& scb = NpActor::getScbFromPxActor(actor); |
| 119 | |
| 120 | mAggregate.addActor(scb); |
| 121 | |
| 122 | s.addActorInternal(actor, bvhStructure); |
| 123 | } |
| 124 | else if (!actor.getScene()) // This check makes sure that a link of an articulation gets only added once. |
| 125 | { |
| 126 | NpArticulationLink& al = static_cast<NpArticulationLink&>(actor); |
| 127 | PxArticulationBase& npArt = al.getRoot(); |
| 128 | for(PxU32 i=0; i < npArt.getNbLinks(); i++) |
| 129 | { |
| 130 | PxArticulationLink* link; |
| 131 | npArt.getLinks(&link, 1, i); |
| 132 | mAggregate.addActor(static_cast<NpArticulationLink*>(link)->getScbActorFast()); |
| 133 | } |
| 134 | |
| 135 | s.addArticulationInternal(npArt); |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | bool NpAggregate::addActor(PxActor& actor, const PxBVHStructure* bvhStructure) |
| 140 | { |
nothing calls this directly
no test coverage detected