Ignore:
Timestamp:
04/05/12 14:54:00 (13 years ago)
Author:
Eric.Larour
Message:

Diverse

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified issm/trunk-jpl/src/c/modules/TriMeshx/TriMeshx.cpp

    r11880 r11944  
    2020        /*output: */
    2121        double* index=NULL;
     22        Matrix* index_matrix=NULL;
    2223        double* x=NULL;
    2324        double* y=NULL;
    2425        double* segments=NULL;
     26        Matrix* segments_matrix=NULL;
    2527        double* segmentmarkerlist=NULL;
    2628
     
    9092                 backcounter=counter;
    9193        }
     94
    9295       
    9396        /*Build regions: */
     
    124127
    125128        sprintf(options,"%s%lf","pQzDq30ia",area); /*replace V by Q to quiet down the logging*/
     129
    126130 
    127131        triangulate(options, &in, &out, NULL);
     132
    128133        /*report(&out, 0, 1, 1, 1, 1, 0);*/
     134
    129135
    130136        /*Allocate index, x and y: */
     
    151157        }
    152158
     159
     160
    153161        /*Associate elements with segments: */
    154162        AssociateSegmentToElement(&segments,out.numberofsegments,index,out.numberoftriangles);
     
    159167        }
    160168
    161         printf("%i %i %i\n",out.numberoftriangles,out.numberofpoints,out.numberofsegments);
    162169
    163170        /*Output : */
    164         *pindex=new Matrix(index,out.numberoftriangles,3,1);
     171        index_matrix=new Matrix(index,out.numberoftriangles,3,1);
     172        index_matrix->Convert(DENSE_SEQUENTIAL);
     173        *pindex=index_matrix;
     174       
     175        segments_matrix=new Matrix(segments,out.numberofsegments,3,1); segments_matrix->Convert(DENSE_SEQUENTIAL);
     176        *psegments=segments_matrix;
     177
    165178        *px=new Vector(x,out.numberofpoints);
    166179        *py=new Vector(y,out.numberofpoints);
    167         *psegments=new Matrix(segments,out.numberofsegments,3,1);
    168180        *psegmentmarkerlist=new Vector(segmentmarkerlist,out.numberofsegments);
     181
    169182}
Note: See TracChangeset for help on using the changeset viewer.