Esempio n. 1
0
		public Mesh(Geometry geometry, Material material)
			: base("<GeneratedMesh Geometry=" + geometry + ", material=" + material + ">")
		{
			Geometry = geometry;
			Material = material;
			LocalTransform = Matrix.Identity;
		}
Esempio n. 2
0
		private static void ComputeVertices(Vector3D size, Material material, Geometry geometry)
		{
			if (material.Shader.Flags == ShaderFlags.Colored)
				geometry.SetData(ComputeColorVertices(size, material.DefaultColor), ColorBoxIndices);
			else if (material.Shader.Flags == ShaderFlags.LitTextured)
				geometry.SetData(ComputeNormalUVVertices(size), UVBoxIndices);
			else
				geometry.SetData(ComputeUVVertices(size), UVBoxIndices);
		}