rahulch

Untitled

Mar 5th, 2019
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 1.55 KB | None | 0 0
  1. import Qt3D.Core 2.12
  2. import Qt3D.Render 2.12
  3. import Qt3D.Extras 2.12
  4. import Qt3D.Input 2.12
  5.  
  6. Entity {
  7.     id: sceneRoot
  8.  
  9.     components: [external_forward_renderer, inputSettings, orbitCamera]
  10.  
  11.     Camera {
  12.         id: camera
  13.         projectionType: CameraLens.PerspectiveProjection
  14.         fieldOfView: 45
  15.         aspectRatio: 1820 / 1080
  16.         nearPlane: 0.1
  17.         farPlane: 1000.0
  18.         position: Qt.vector3d(0.014, 0.956, 2.178)
  19.         upVector: Qt.vector3d(0.0, 1.0, 0.0)
  20.         viewCenter: Qt.vector3d(0.0, 0.7, 0.0)
  21.     }
  22.  
  23.     Entity {
  24.         components: [
  25.             DirectionalLight {
  26.                 intensity: 0.9
  27.                 worldDirection: Qt.vector3d(0, 0.6, -1)
  28.             }
  29.         ]
  30.     }
  31.  
  32.     RenderSettings {
  33.         id: external_forward_renderer
  34.         activeFrameGraph: ForwardRenderer {
  35.             camera: camera
  36.             clearColor: Qt.rgba(0, 0.5, 1, 1)
  37.         }
  38.     }
  39.  
  40.     Mesh {
  41.         id: roboMesh
  42.         source: "file:///home/rahul.c/code/dms_qt/src/qml/images/robo-obj-pose4/source/d2f0cff60afc40f5afe79156ec7db657.obj"
  43.     }
  44.  
  45.     Entity {
  46.         id: circleEntity
  47.         property Material roboMaterial: PhongAlphaMaterial {
  48.             alpha: 0.4
  49.             ambient: "black"
  50.             diffuse: "black"
  51.             specular: "black"
  52.             shininess: 10000
  53.         }
  54.  
  55.         components: [roboMesh, roboMaterial]
  56.     }
  57.  
  58.     InputSettings {
  59.         id: inputSettings
  60.     }
  61.  
  62.     OrbitCameraController{
  63.         id: orbitCamera
  64.         camera: camera
  65.     }
  66. }
Add Comment
Please, Sign In to add comment