GeometryModel3D


これも、テスト用のメモ。

private GeometryModel3D GetG3d()
{
    MeshGeometry3D mg3d = new MeshGeometry3D();
    mg3d.Positions = new Point3DCollection { new Point3D(0, 0, 0), new Point3D(1, 0, 0), new Point3D(1, 1, 0), new Point3D(0, 1, 0) };
    mg3d.TriangleIndices = new Int32Collection { 0, 1, 2, 0, 2, 3 };
    mg3d.TextureCoordinates = new PointCollection { new Point(0, 1), new Point(1, 1), new Point(1, 0), new Point(0, 0) };
    mg3d.Normals = new Vector3DCollection { new Vector3D(0, 0, 1), new Vector3D(0, 0, 1), new Vector3D(0, 0, 1), new Vector3D(0, 0, 1) };

    GeometryModel3D gm3d = new GeometryModel3D();
    gm3d.Geometry = mg3d;

    SolidColorBrush vb = new SolidColorBrush(Colors.Blue);

    gm3d.Material = new DiffuseMaterial(vb);

    return gm3d;
}

コメントを残す

以下に詳細を記入するか、アイコンをクリックしてログインしてください。

WordPress.com ロゴ

WordPress.com アカウントを使ってコメントしています。 ログアウト /  変更 )

Facebook の写真

Facebook アカウントを使ってコメントしています。 ログアウト /  変更 )

%s と連携中


%d人のブロガーが「いいね」をつけました。