public static void InitGizmo(Device d3dDevice) { Attach attach = new ModelFile(Resources.x_null).Model.Attach; attach.ProcessVertexData(); XNullMesh = attach.CreateD3DMesh(); attach = new ModelFile(Resources.y_null).Model.Attach; attach.ProcessVertexData(); YNullMesh = attach.CreateD3DMesh(); attach = new ModelFile(Resources.z_null).Model.Attach; attach.ProcessVertexData(); ZNullMesh = attach.CreateD3DMesh(); attach = new ModelFile(Resources.x_move).Model.Attach; attach.ProcessVertexData(); XMoveMesh = attach.CreateD3DMesh(); XMaterial = ((BasicAttach)attach).Material[0]; attach = new ModelFile(Resources.y_move).Model.Attach; attach.ProcessVertexData(); YMoveMesh = attach.CreateD3DMesh(); YMaterial = ((BasicAttach)attach).Material[0]; attach = new ModelFile(Resources.z_move).Model.Attach; attach.ProcessVertexData(); ZMoveMesh = attach.CreateD3DMesh(); ZMaterial = ((BasicAttach)attach).Material[0]; attach = new ModelFile(Resources.xy_move).Model.Attach; attach.ProcessVertexData(); XYMoveMesh = attach.CreateD3DMesh(); DoubleAxisMaterial = ((BasicAttach)attach).Material[0]; attach = new ModelFile(Resources.zx_move).Model.Attach; attach.ProcessVertexData(); ZXMoveMesh = attach.CreateD3DMesh(); attach = new ModelFile(Resources.zy_move).Model.Attach; attach.ProcessVertexData(); ZYMoveMesh = attach.CreateD3DMesh(); attach = new ModelFile(Resources.x_rotation).Model.Attach; attach.ProcessVertexData(); XRotateMesh = attach.CreateD3DMesh(); attach = new ModelFile(Resources.y_rotation).Model.Attach; attach.ProcessVertexData(); YRotateMesh = attach.CreateD3DMesh(); attach = new ModelFile(Resources.z_rotation).Model.Attach; attach.ProcessVertexData(); ZRotateMesh = attach.CreateD3DMesh(); attach = new ModelFile(Resources.x_scale).Model.Attach; attach.ProcessVertexData(); XScaleMesh = attach.CreateD3DMesh(); attach = new ModelFile(Resources.y_scale).Model.Attach; attach.ProcessVertexData(); YScaleMesh = attach.CreateD3DMesh(); attach = new ModelFile(Resources.z_scale).Model.Attach; attach.ProcessVertexData(); ZScaleMesh = attach.CreateD3DMesh(); BoxMesh = Mesh.Box(1, 1, 1); HighlightMaterial = new NJS_MATERIAL() { DiffuseColor = Color.LightGoldenrodYellow, Exponent = 0f, UseTexture = false, IgnoreLighting = true, IgnoreSpecular = true }; ATexture = Resources.PointATexture.ToTexture(d3dDevice); BTexture = Resources.PointBTexture.ToTexture(d3dDevice); StandardMaterial = new NJS_MATERIAL() { DiffuseColor = Color.Gray, IgnoreLighting = true, IgnoreSpecular = true, UseAlpha = false, UseTexture = true, Exponent = 100f }; }