예제 #1
0
void Sc::ParticleSystemSim::onRbShapeChange(const ParticlePacketShape& particleShape, const ShapeSim& shape)
{
	PX_ASSERT(mLLSim);
//	const PxsShapeCore& shapeCore = shape.getCore().getCore();
	const PxsBodyCore* bodyCore = shape.getBodySim() ? &shape.getBodySim()->getBodyCore().getCore() : NULL;
	
	mLLSim->onRbShapeChangeV(*particleShape.getLowLevelParticleShape(), (PxvShapeHandle)&shape.getCore().getCore(), (PxvBodyHandle)bodyCore);
}
예제 #2
0
void Sc::ActorCore::reinsertShapes()
{
	PX_ASSERT(mSim);
	if(!mSim)
		return;

	ShapeSim* sim = NULL;
	for (ShapeIterator shapeIterator(*mSim); NULL != (sim = shapeIterator.getNext()); )
		sim->reinsertBroadPhase();
}
예제 #3
0
void Sc::ParticleSystemSim::removeInteraction(const ParticlePacketShape& particleShape, const ShapeSim& shape, bool isDyingRb, const PxU32 ccdPass) 
{
	PX_ASSERT(mLLSim);
	const PxsShapeCore& shapeCore = shape.getCore().getCore();
	bool isDynamic = shape.actorIsDynamic();
	PxsRigidCore& rigidCore = shape.getPxsRigidCore();
	if(isDynamic)
		getInteractionScene().getLowLevelContext()->getBodyTransformVault().removeBody(static_cast<PxsBodyCore&>(rigidCore));
	
	mLLSim->removeInteractionV(*particleShape.getLowLevelParticleShape(), (PxvShapeHandle)&shapeCore, (PxvBodyHandle)&rigidCore, isDynamic, isDyingRb, (ccdPass > 0));
	mInteractionCount--; 
}
void Sc::ParticleSystemSim::addInteraction(const ParticlePacketShape& particleShape, const ShapeSim& shape, const PxU32 ccdPass)
{
	PX_ASSERT(mLLSim);
	const PxsShapeCore& shapeCore = shape.getCore().getCore();
	bool isDynamic = shape.actorIsDynamic();
	PxsRigidCore& rigidCore = shape.getPxsRigidCore();
	if(isDynamic)
		getScene().getParticleContext()->getBodyTransformVaultFast().addBody(static_cast<PxsBodyCore&>(rigidCore));
		
	mLLSim->addInteractionV(*particleShape.getLowLevelParticleShape(), size_t(&shapeCore), size_t(&rigidCore), isDynamic, (ccdPass > 0));
	mInteractionCount++; 
}
void Sc::ParticleSystemSim::onRbShapeChange(const ParticlePacketShape& particleShape, const ShapeSim& shape)
{
	PX_ASSERT(mLLSim);
	mLLSim->onRbShapeChangeV(*particleShape.getLowLevelParticleShape(), size_t(&shape.getCore().getCore()));
}