Skip to content

Riverlance/objecthandler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Object Handler

Object Handler is a 3D model viewer written in C++.





Based on the work of http://learnopengl.com/ and http://open.gl/.


Features

Main
  • Supported object files: ASSIMP supported object file extensions (obj, fbx, 3ds, ...)
  • Modern OpenGL (VAO, VBO, EBO, ...), instead of the old and deprecated immediate mode
  • Phong shading
  • Shading with GLSL
  • Normal vectors being generated automatically (flag aiProcess_GenNormals)
  • All polygons as triangles (flag aiProcess_Triangulate)
Camera
  • Camera rotation: Pitch constraint or Pitch constraint break (default)
  • 7 camera positions: front, right, back, left, top, bottom, diagonal
  • Camera controls: move, rotate, zoom, change camera view
Control
  • Devices: Mouse, Keyboard, Joystick (including more than one at the same time; e.g., mouse + keyboard, or joystick 1 + joystick 2 + keyboard, ...)
  • Smooth sensibility (SDL pollEvents and pumpEvents)
  • Sensibility for mouse, keyboard and joystick
  • View modes: fill (textured) by default, line (wireframe) or point (vertices)
  • Themes: dark by default or light
Advanced
  • Working with Release x64, Release x86, Debug x64, Debug x86
  • Debug opens a console window with util informations for debugging, including meshes/triangles/vertices count, action logs, and so on
  • Code working with warning level 4
  • Ready to go project: 1. Clone/Download this repository, 2. Compile with VS14 (2015), 3. Run

Technologies

  • OpenGL 3.3 (GLEW 2.0.0)
  • SDL 2
  • SOIL 2
  • GLM 0.9.9.5
  • Assimp 4.1.0
  • Microsoft Visual Studio 14.0 (2015)

Shortcuts


Device

Shortcut

Action

Mouse

Ctrl + Hold Left Button + [Move]

Increase/Decrease camera zoom

Shift + Hold Left Button + [Move]

Move camera

Hold Left Button + [Move]

Rotate camera

Hold Middle Button + [Move]

Move camera

Alt + Hold Right Button + [Move]

Increase/Decrease camera zoom

[Wheel Slide]

Increase/Decrease camera zoom

Keyboard

Ctrl + [Arrow]

Increase/Decrease camera zoom

Shift + [Arrow]

Move camera

[Arrow]

Rotate camera

W | A | S | D

Move camera

Ctrl + K

Next camera

Ctrl + M

Next view mode

Ctrl + T

Next application theme

Shift + 1

Increase mouse camera move sensitivity

Shift + 2

Increase mouse camera rotate sensitivity

Shift + 3

Increase mouse camera zoom sensitivity

Shift + 4

Increase keyboard camera move sensitivity

Shift + 5

Increase keyboard camera rotate sensitivity

Shift + 6

Increase keyboard camera zoom sensitivity

Shift + 7

Increase joystick camera move sensitivity

Shift + 8

Increase joystick camera rotate sensitivity

Shift + 9

Increase joystick camera zoom sensitivity

Alt + 1

Decrease mouse camera move sensitivity

Alt + 2

Decrease mouse camera rotate sensitivity

Alt + 3

Decrease mouse camera zoom sensitivity

Alt + 4

Decrease keyboard camera move sensitivity

Alt + 5

Decrease keyboard camera rotate sensitivity

Alt + 6

Decrease keyboard camera zoom sensitivity

Alt + 7

Decrease joystick camera move sensitivity

Alt + 8

Decrease joystick camera rotate sensitivity

Alt + 9

Decrease joystick camera zoom sensitivity

Ctrl + 1

Reset mouse camera move sensitivity to default value

Ctrl + 2

Reset mouse camera rotate sensitivity to default value

Ctrl + 3

Reset mouse camera zoom sensitivity to default value

Ctrl + 4

Reset keyboard camera move sensitivity to default value

Ctrl + 5

Reset keyboard camera rotate sensitivity to default value

Ctrl + 6

Reset keyboard camera zoom sensitivity to default value

Ctrl + 7

Reset joystick camera move sensitivity to default value

Ctrl + 8

Reset joystick camera rotate sensitivity to default value

Ctrl + 9

Reset joystick camera zoom sensitivity to default value

[Keypad Num 8]

Set to front camera

[Keypad Num 4]

Set to right camera

[Keypad Num 2]

Set to back camera

[Keypad Num 6]

Set to left camera

[Keypad - (minus)]

Set to bottom camera

[Keypad + (plus)]

Set to top camera

[Keypad / (divide)]

Set to diagonal camera

[Keypad * (multiply)]

Next camera

Joystick
(Sony Wireless
Joystick Dualshock 4
Model CUH-ZCT2U
)

[Cross Direction]

Move camera

[Ball 1 Slide]

Move camera

[Ball 2 Slide]

Rotate camera

[Ball 1 Button]

Next application theme

[Ball 2 Button]

Next view mode

[X Button]

Set to back camera

[O Button]

Set to left camera

[Square Button]

Set to right camera

[Triangle Button]

Set to front camera

[L1 Button]

Set to top camera

[R1 Button]

Set to bottom camera

[L2 Button]

Decrease camera zoom

[R2 Button]

Increase camera zoom

[Start]

Next camera

[Select]

Set to diagonal camera



Progress showoff












































































































To update

  • Grid

About

A 3D model viewer written in C++.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published