Description: This tutorial is the continuation of the first tutorial 3D Picking Part1, where we used a bounding box rendered “behind the scenes” to find an object user has clicked on. Problem of this method was that bounding box doesn’t match model very much. So the solution is to either render full model in color mode or use multiple bounding boxes. Either way or another, previous tutorial used color picking for finding what a user has clicked on. This time we will use completely different approach and it’s ray-casting pick.
To Search:
File list (Check if you may need any files):
19.) 3D Picking Pt. 2
.....................\19.) 3D Picking Pt. 2
.....................\.....................\19.) 3D Picking Pt. 2.vcproj
.....................\.....................\common_header.h
.....................\.....................\dirLight.cpp
.....................\.....................\dirLight.h
.....................\.....................\flyingCamera.cpp
.....................\.....................\flyingCamera.h
.....................\.....................\fog.cpp
.....................\.....................\fog.h
.....................\.....................\framebuffer.cpp
.....................\.....................\framebuffer.h
.....................\.....................\freeTypeFont.cpp
.....................\.....................\freeTypeFont.h
.....................\.....................\objModel.cpp
.....................\.....................\objModel.h
.....................\.....................\openGLControl.cpp
.....................\.....................\openGLControl.h
.....................\.....................\picking.cpp
.....................\.....................\picking.h
.....................\.....................\pointLight.cpp
.....................\.....................\pointLight.h
.....................\.....................\renderScene.cpp
.....................\.....................\shaders.cpp
.....................\.....................\shaders.h
.....................\.....................\skybox.cpp
.....................\.....................\skybox.h
.....................\.....................\spotLight.cpp
.....................\.....................\spotLight.h
.....................\.....................\static_geometry.cpp
.....................\.....................\static_geometry.h
.....................\.....................\texture.cpp
.....................\.....................\texture.h
.....................\.....................\vertexBufferObject.cpp
.....................\.....................\vertexBufferObject.h
.....................\.....................\win_OpenGLApp.cpp
.....................\.....................\win_OpenGLApp.h
.....................\19.) 3D Picking Pt. 2.sln
.....................\19.) 3D Picking Pt. 2.suo
.....................\bin
.....................\...\19.) 3D Picking Pt. 2.exe
.....................\...\FreeImage.dll
.....................\...\data
.....................\...\....\models
.....................\...\....\......\Spongebob
.....................\...\....\......\.........\sb_ball_bind.dff.mtl
.....................\...\....\......\.........\sb_ball_bind.dff.obj
.....................\...\....\......\.........\spongebob.png
.....................\...\....\......\.........\spongebob_bind.mtl
.....................\...\....\......\.........\spongebob_bind.obj
.....................\...\....\......\Thor
.....................\...\....\......\....\Marvel Ultimate Alliance-f456880.dds
.....................\...\....\......\....\Marvel Ultimate Alliance-f457900.dds
.....................\...\....\......\....\Marvel Ultimate Alliance-f458160.dds
.....................\...\....\......\....\thor.mtl
.....................\...\....\......\....\thor.obj
.....................\...\....\......\alien2_obj
.....................\...\....\......\..........\alien2.mtl
.....................\...\....\......\..........\alien2.obj
.....................\...\....\......\..........\alien2Tex1.BMP
.....................\...\....\shaders
.....................\...\....\.......\color.frag
.....................\...\....\.......\color.vert
.....................\...\....\.......\dirLight.frag
.....................\...\....\.......\fog.frag
.....................\...\....\.......\font2D.frag
.....................\...\....\.......\main_shader.frag
.....................\...\....\.......\main_shader.geom
.....................\...\....\.......\main_shader.vert
.....................\...\....\.......\ortho2D.frag
.....................\...\....\.......\ortho2D.vert
.....................\...\....\.......\pointLight.frag
.....................\...\....\.......\spotLight.frag
...................