public void SubdivisionSphereTessellatorTest() { Mesh simpleSphere = SubdivisionSphereTessellatorSimple.Compute(1); Assert.AreEqual(IndicesType.UnsignedInt, simpleSphere.Indices.Datatype); Assert.AreEqual(1, simpleSphere.Attributes.Count); Assert.IsNotNull(simpleSphere.Attributes["position"] as VertexAttributeDoubleVector3); Mesh sphere = SubdivisionSphereTessellator.Compute(1, SubdivisionSphereVertexAttributes.All); Assert.AreEqual(IndicesType.UnsignedInt, sphere.Indices.Datatype); Assert.AreEqual(3, sphere.Attributes.Count); Assert.IsNotNull(sphere.Attributes["position"] as VertexAttributeDoubleVector3); Assert.IsNotNull(sphere.Attributes["normal"] as VertexAttributeHalfFloatVector3); Assert.IsNotNull(sphere.Attributes["textureCoordinate"] as VertexAttributeHalfFloatVector2); GraphicsAssert.ListsAreEqual( ((IndicesUnsignedInt)simpleSphere.Indices).Values, ((IndicesUnsignedInt)sphere.Indices).Values); GraphicsAssert.ListsAreEqual( ((VertexAttributeDoubleVector3)simpleSphere.Attributes["position"]).Values, ((VertexAttributeDoubleVector3)sphere.Attributes["position"]).Values); }
public void RenderSubdivisionSphere() { Render(SubdivisionSphereTessellatorSimple.Compute(1)); }