[vtkusers] how to parse RECTILINEAR_GRID

이정규 glazex2 at naver.com
Wed Mar 17 18:27:01 EDT 2010


It seems like topology is fixed(exactly same to STRUCTURED_GRID) and
coordinates are nothing more than provided values.
Assuming that X_COORDINATES, Y_COORDINATES and Z_COORDINATES are stored in
coordinates[0],coordinates[1] and coordinates[2] respectively, the following
piece of code
will construct vertices.

for(int i=0;i<zdimensions;i++)
{
z=coordinates[2][i];
for(int j=0;j<dimensions[1];j++)
{
y=coordinates[1][j];
for(int k=0;k<dimensions[0];k++)
{
x=coordinates[0][[k]];
pt p1 = new pt(x,y,z);
vertices.push_back(p1);
}
}
}
Thanks,

--
Jeonggyu Lee
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100317/25ce5a1b/attachment.htm>


More information about the vtkusers mailing list