Advertisement
Guest User

Untitled

a guest
Mar 30th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
QML 0.69 KB | None | 0 0
  1. Entity {
  2.     id: sceneRoot
  3.  
  4.     property matrix4x4 marsMatrix
  5.          
  6.  
  7.         Entity {
  8.         id: marsEntity
  9.  
  10.         ...
  11.  
  12.         property Transform transformMars: Transform {
  13.             matrix: {
  14.                 sceneRoot.marsMatrix = sceneRoot.resetMatrix(sceneRoot.marsMatrix)
  15.                 sceneRoot.marsMatrix.translate(Qt.vector3d(mars.x, mars.y, mars.z))
  16.                 sceneRoot.marsMatrix.rotate(mars.tilt, tiltAxis)
  17.                 sceneRoot.marsMatrix.rotate(mars.roll, rollAxis)
  18.                 sceneRoot.marsMatrix.scale(mars.r)
  19.                 return sceneRoot.marsMatrix
  20.             }
  21.         }
  22.  
  23.         components: [ mars, materialMars, transformMars ]
  24.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement