Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Qt3D.Core 2.0
- import Qt3D.Render 2.0
- import Qt3D.Input 2.0
- import Qt3D.Extras 2.0
- import QtQuick 2.0 as QQ2
- Entity {
- id: sceneRoot
- Camera {
- id: camera
- projectionType: CameraLens.PerspectiveProjection
- fieldOfView: 45
- nearPlane : 0.1
- farPlane : 1000.0
- position: Qt.vector3d(0, 0, 20)
- upVector: Qt.vector3d( 0.0, 1.0, 0.0 )
- viewCenter: Qt.vector3d( 0.0, 0.0, 0.0 ) // here I should set the viewcenter to the centroid of "organModel"
- }
- OrbitCameraController { camera: camera }
- components: [
- RenderSettings {
- activeFrameGraph: ForwardRenderer {
- camera: camera
- clearColor: "transparent"
- }
- },
- InputSettings { }
- ]
- PhongMaterial {
- id: material
- ambient: "darkRed"
- }
- Mesh {
- id: organModel
- source: "qrc:/organModel.obj"
- }
- Transform {
- id: transformLiver
- }
- Entity {
- id: torusEntity
- components: [ liver, material, transformLiver ]
- }
- }
Add Comment
Please, Sign In to add comment