rahulch

Untitled

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