MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/PhysX / addActorInternal

Method addActorInternal

physx/source/physx/src/NpAggregate.cpp:114–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112}
113
114void 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
139bool NpAggregate::addActor(PxActor& actor, const PxBVHStructure* bvhStructure)
140{

Callers

nothing calls this directly

Calls 7

getTypeMethod · 0.45
addActorMethod · 0.45
getSceneMethod · 0.45
getRootMethod · 0.45
getNbLinksMethod · 0.45
getLinksMethod · 0.45

Tested by

no test coverage detected