これも、テスト用のメモ。
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;
}
コメントを残す