コード例 #1
0
ファイル: CircleMapping.cpp プロジェクト: fredroy/sofa
 void apply( Out::VecCoord& out, const In::VecCoord& in )
 {
     out.resize(in.size());
     dx.resize(in.size());
     for(unsigned int i=0; i<out.size(); i++)
     {
         double c = cos(in[i]);
         double s = sin(in[i]);
         out[i] = p0+rx*c+ry*s;
         dx[i] = rx*(-s)+ry*c;
     }
 }
コード例 #2
0
void BarycentricMapperRegularGridTopology<CudaVec3f1Types,CudaVec3f1Types>::apply( Out::VecCoord& out, const In::VecCoord& in )
{
    unsigned int gridsize[3] = { (unsigned int)topology->getNx(), (unsigned int)topology->getNy(), (unsigned int)topology->getNz() };
    out.fastResize(map.size());
    RegularGridMapperCuda3f1_apply(map.size(), gridsize, map.deviceRead(), out.deviceWrite(), in.deviceRead());
}
コード例 #3
0
void BarycentricMapperMeshTopology<CudaVec3f1Types,CudaVec3f1Types>::apply( Out::VecCoord& out, const In::VecCoord& in )
{
    out.fastResize(size);
    MeshMapperCuda3f1_apply(size, maxNIn, map.deviceRead(), out.deviceWrite(), in.deviceRead());
}
コード例 #4
0
void BarycentricMapperSparseGridTopology<CudaVec3f1Types,CudaVec3f1Types>::apply( Out::VecCoord& out, const In::VecCoord& in )
{
    out.fastResize(map.size());
    buildHexa();
    SparseGridMapperCuda3f1_apply(map.size(), CudaHexa.deviceRead(), map.deviceRead(), out.deviceWrite(), in.deviceRead());
}
コード例 #5
0
ファイル: LineMapping.cpp プロジェクト: 151706061/sofa
 void apply( Out::VecCoord& out, const In::VecCoord& in )
 {
     out.resize(in.size());
     for(unsigned int i=0; i<out.size(); i++)
         out[i] = p0+dx*in[i];
 }