Tomy

06-07-2005, 11:21 PM

Hi,

I have a 3D Texture in which I need to browse. I have an array of points that form the path inside the volume. These points' values are relative to the volume data. For Example:

Point.X[i] = 0; Point[i].Y:= 0 and Point[i].Z := 0; is a point in the path that should lie at the location of the first voxel in the 3d texture. I will browse through the path by using

gluLookat(ScenePoint[i], ScenePoint[i+1], UpVector).

The texture is drawn from -1 to 1 in all three dimensions.

ScenePoint is calcutated by transforming the path points to the opengl scene coordinates as follows:

ScenePoint[i].X : Point[i].X*2/ volume_width - 1;

ScenePoint[i].Y : Point[i].Y*2/ volume_height - 1;

ScenePoint[i].Z : Point[i].Z*2/ volume_depth - 1;

Unfortunately, this did not work fine... the path I moved on is far away from the volume path I need to move on...

What did I do wrong? :confused:

I have a 3D Texture in which I need to browse. I have an array of points that form the path inside the volume. These points' values are relative to the volume data. For Example:

Point.X[i] = 0; Point[i].Y:= 0 and Point[i].Z := 0; is a point in the path that should lie at the location of the first voxel in the 3d texture. I will browse through the path by using

gluLookat(ScenePoint[i], ScenePoint[i+1], UpVector).

The texture is drawn from -1 to 1 in all three dimensions.

ScenePoint is calcutated by transforming the path points to the opengl scene coordinates as follows:

ScenePoint[i].X : Point[i].X*2/ volume_width - 1;

ScenePoint[i].Y : Point[i].Y*2/ volume_height - 1;

ScenePoint[i].Z : Point[i].Z*2/ volume_depth - 1;

Unfortunately, this did not work fine... the path I moved on is far away from the volume path I need to move on...

What did I do wrong? :confused: