Hello,
I need help to do the following.
I’m extending my volume renderer with the raycasting algorithm. Currently I have viewport aligned slicer algorithm implemented.
So far raycasting is implemented as well but with one exception
that i cant move inside the volume because the bounding box that
i use to create the entry vectors will be clipped as soon as the
box moves outside the near plane. I know, thats because this part is outside the frustum. So my question is, how can I transform the viewport , in this case the nearplane, to the object coordinates of the bounding box.
I know that I can get the viewport with glGetIntegerv(GL_VIEWPORT, …). The bounding box is from
(0,0,0) to (1,1,1). So the transformed nearplane/viewport has to be 3d coordinates within the range of the boundingbox.
As far as I know, I can transform with the inversed transposed modelviewmatrix to object space, right ? but
then I need to clamp the values to the bounding box range
and where do I get the z coordinate ?
Someone understood what I’m trying to do ?
regards,
lobbel