Esempio n. 1
0
void BvhTriangleSystem::integrate(float dt)
{
    masssystem::integrateAllAnchored((float3 *)deviceX(),
                                     (float3 *)deviceV(),
                                     (float3 *)deviceVa(),
                                     dt,
                                     numPoints());
    CudaBase::CheckCudaError("triangle system integrate");
}
Esempio n. 2
0
void BvhTetrahedronSystem::update()
{
    masssystem::useAnchoredVelocity((float3 *)deviceV(), 
                                (float3 *)deviceVa(),
								(uint *)deviceAnchor(),
								numPoints());
	formTetrahedronAabbs();
    CudaLinearBvh::update();
}
Esempio n. 3
0
void BvhTriangleSystem::formTetrahedronAabbs()
{
    void * cvs = deviceX();
    void * vsrc = deviceVa();
    void * idx = deviceTretradhedronIndices();
    void * dst = leafAabbs();
    trianglesys::formTetrahedronAabbs((Aabb *)dst, (float3 *)cvs, (float3 *)vsrc, 1.f/60.f, (uint4 *)idx, numTriangles());
    CudaBase::CheckCudaError("triangle system form aabb");
}