コード例 #1
0
 /// <summary>
 /// Pushes a rendering transform suitable for astronomical distances
 /// </summary>
 public static void PushAstroRenderTransform( IUniCamera camera, TransformType transformType, UniTransform transform )
 {
     Graphics.Renderer.PushTransform( transformType );
     SetAstroRenderTransform( camera, transformType, transform );
 }
コード例 #2
0
        /// <summary>
        /// Sets the rendering transform (<see cref="IRenderer.SetTransform(TransformType,InvariantMatrix44)"/>)
        /// </summary>
        public static void SetRenderTransform( IUniCamera camera, TransformType transformType, UniTransform transform )
        {
            float x = ( float )Units.Convert.UniToRender( transform.Position.X - camera.Position.X );
            float y = ( float )Units.Convert.UniToRender( transform.Position.Y - camera.Position.Y );
            float z = ( float )Units.Convert.UniToRender( transform.Position.Z - camera.Position.Z );

            Graphics.Renderer.SetTransform( transformType, new Point3( x, y, z ), transform.XAxis, transform.YAxis, transform.ZAxis );
        }