Drawing and Hidden Line Removal

Hi all.

I'd like to develop program using OCC, based on HLR sample project.

The objective is : show given object with visible part with shading and hidden part with transparent. 

 

I attatch a picture that explains my topic.

example : I load two models : pipe and plate.

with given camera pose, half of the pipe is occluded by plate.

Then now, I'd like to display the visible part of the pipe as originally shaded, and hidden part of the pipe as transparent. 

 

How can I do this?

In my opinion, I i get the depth values of the pixels, I could handle this. 

Is there any way to do this? 

The best reply that i want is, how can I create function like :

for(int i; window width)

   for(int j; window height)

       float z_value = get_zvalue(i,j);

 

Attachments: 
Guido van Hilst not specified's picture

Hi Daewoon,

I have made a small example that shows how to use hidden line in occ:

See: HiddenLine

​Best regards, Guido