Guest User

Untitled

a guest
Mar 21st, 2018
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.07 KB | None | 0 0
  1. import Qt3D.Core 2.0
  2. import Qt3D.Render 2.0
  3. import Qt3D.Input 2.0
  4. import Qt3D.Extras 2.0
  5. import QtQuick 2.0 as QQ2
  6.  
  7. Entity {
  8. id: sceneRoot
  9.  
  10. Camera {
  11. id: camera
  12. projectionType: CameraLens.PerspectiveProjection
  13. fieldOfView: 45
  14. nearPlane : 0.1
  15. farPlane : 1000.0
  16. position: Qt.vector3d(0, 0, 20)
  17. upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
  18. viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 ) // here I should set the viewcenter to the centroid of "organModel"
  19. }
  20.  
  21. OrbitCameraController { camera: camera }
  22.  
  23. components: [
  24. RenderSettings {
  25. activeFrameGraph: ForwardRenderer {
  26. camera: camera
  27. clearColor: "transparent"
  28. }
  29. },
  30. InputSettings { }
  31. ]
  32.  
  33. PhongMaterial {
  34. id: material
  35. ambient: "darkRed"
  36. }
  37.  
  38. Mesh {
  39. id: organModel
  40. source: "qrc:/organModel.obj"
  41. }
  42.  
  43. Transform {
  44. id: transformLiver
  45. }
  46.  
  47. Entity {
  48. id: torusEntity
  49. components: [ liver, material, transformLiver ]
  50. }
  51.  
  52. }
Add Comment
Please, Sign In to add comment