void BvhTetrahedronSystem::formTetrahedronAabbs() { void * cvs = deviceX(); void * vsrc = deviceV(); void * idx = deviceTretradhedronIndices(); void * dst = leafAabbs(); tetrasys::formTetrahedronAabbs((Aabb *)dst, (float3 *)cvs, (float3 *)vsrc, 1.f/60.f, (uint4 *)idx, numTetrahedrons()); CudaBase::CheckCudaError("tetrahedron system form aabb"); }
void BvhTetrahedronSystem::update() { masssystem::useAnchoredVelocity((float3 *)deviceV(), (float3 *)deviceVa(), (uint *)deviceAnchor(), numPoints()); formTetrahedronAabbs(); CudaLinearBvh::update(); }
void BvhTriangleSystem::integrate(float dt) { masssystem::integrateAllAnchored((float3 *)deviceX(), (float3 *)deviceV(), (float3 *)deviceVa(), dt, numPoints()); CudaBase::CheckCudaError("triangle system integrate"); }
void BvhTetrahedronSystem::formTetrahedronAabbsImpulsed() { void * pos = deviceX(); void * vel = deviceV(); void * deltaVel = deviceImpulse(); void * idx = deviceTretradhedronIndices(); void * dst = leafAabbs(); tetrasys::formTetrahedronAabbsImpulsed((Aabb *)dst, (float3 *)pos, (float3 *)vel, (float3 *)deltaVel, 1.f/60.f, (uint4 *)idx, numTetrahedrons()); CudaBase::CheckCudaError("tetrahedron system form aabb"); }