예제 #1
0
	void removeFluidContainmentSphere()
	{
		assert(scene->isWritable());

		if(physicslib_fluid_containment_sphere_actor != NULL)
		{
			if(scene && physicslib_fluid_containment_sphere_actor)
			{
				assert(scene->isWritable());
				scene->releaseActor(*physicslib_fluid_containment_sphere_actor);
			}

			physicslib_fluid_containment_sphere_actor = NULL;
			physicslib_fluid_containment_sphere_shape = NULL;
		}
	}
예제 #2
0
	~Data()
	{
		removeFluidContainmentSphere();

#ifdef PROJECT_CLAW_PROTO
		unitMaterial = NULL;
#endif

		if(physicslib_fluid_containment_actor != NULL)
		{
			if(scene && physicslib_fluid_containment_actor)
			{
				assert(scene->isWritable());
				scene->releaseActor(*physicslib_fluid_containment_actor);
			}

			physicslib_fluid_containment_actor = NULL;
			physicslib_fluid_containment_shape = NULL;
		}

		if(sdk && scene)
		{
#ifndef NDEBUG
			int actors = scene->getNbActors();
			assert(actors == 1 || actors == 2);

#ifndef NX_DISABLE_FLUIDS
			int fluids = scene->getNbFluids();
			assert(fluids == 0);
#endif
#endif
			scene->shutdownWorkerThreads();
			sdk->releaseScene(*scene);
		}

		if(sdk)
			sdk->release();
	}