var searchIndex = {}; searchIndex["genmesh"] = {"doc":"`Genmesh`'s is a library that offers ways to generate and manipulate vertex streams.","items":[[3,"Quad","genmesh","A polygon with 4 points. Maps to `GL_QUADS`",null,null],[12,"x","","the first point of a quad",0,null],[12,"y","","the second point of a quad",0,null],[12,"z","","the third point of a quad",0,null],[12,"w","","the fourth point of a quad",0,null],[3,"Triangle","","A polygon with 3 points. Maps to `GL_TRIANGLE`",null,null],[12,"x","","the first point of a triangle",1,null],[12,"y","","the second point of a triangle",1,null],[12,"z","","the third point of a triangle",1,null],[3,"VerticesIterator","","an iterator that breaks a polygon down into its individual\nverticies.",null,null],[3,"Line","","Represents a line",null,null],[12,"x","","the first point",2,null],[12,"y","","The second point",2,null],[3,"TriangulateIterator","","Used to iterator of polygons into a iterator of triangles",null,null],[3,"LruIndexer","","An `LruIndexer` is useful for creating indexed steam from a stream of\nvertices. Each vertex that is index is only compared against the vetices\ncontained in the cache. If a vertex is not found the LruIndexer will `emit`\na new vertex and return the index of that new vertex.",null,null],[3,"Neighbors","","",null,null],[12,"vertices","","",3,null],[12,"polygons","","",3,null],[4,"Polygon","","This is All-the-types container. This exists since some generators\nproduce both `Triangles` and `Quads`.",null,null],[13,"PolyTri","","A wraped triangle",4,null],[13,"PolyQuad","","A wraped quad",4,null],[11,"emit_triangles","","",0,null],[11,"emit_triangles","","",1,null],[11,"emit_triangles","","",4,null],[11,"size_hint","","",5,null],[11,"next","","",5,null],[11,"eq","","",0,null],[11,"ne","","",0,null],[11,"fmt","","",0,null],[11,"clone","","",0,null],[11,"new","","create a new `Quad` with supplied vertices",0,{"inputs":[{"name":"t"},{"name":"t"},{"name":"t"},{"name":"t"}],"output":{"name":"quad"}}],[11,"eq","","",1,null],[11,"ne","","",1,null],[11,"fmt","","",1,null],[11,"clone","","",1,null],[11,"new","","create a new `Triangle` with supplied vertcies",1,{"inputs":[{"name":"t"},{"name":"t"},{"name":"t"}],"output":{"name":"triangle"}}],[11,"eq","","",4,null],[11,"ne","","",4,null],[11,"clone","","",4,null],[11,"fmt","","",4,null],[11,"next","","",6,null],[11,"map_vertex","","",2,null],[11,"map_vertex","","",1,null],[11,"map_vertex","","",0,null],[11,"map_vertex","","",4,null],[11,"hash","","",2,null],[11,"eq","","",2,null],[11,"ne","","",2,null],[11,"fmt","","",2,null],[11,"clone","","",2,null],[11,"new","","Create a new line using point x and y",2,{"inputs":[{"name":"t"},{"name":"t"}],"output":{"name":"line"}}],[11,"emit_lines","","",1,null],[11,"emit_lines","","",0,null],[11,"emit_lines","","",4,null],[11,"new","","create a new `LruIndexer`, the window size is limited by the `size` parameter\nit is recommended to keep this small since lookup is done in N time",7,{"inputs":[{"name":"usize"},{"name":"f"}],"output":{"name":"lruindexer"}}],[11,"index","","",7,null],[11,"new","","Build a Neighbors search based on the supplied vertices\nand supplied triangle list.",3,{"inputs":[{"name":"vec"},{"name":"vec"}],"output":{"name":"neighbors"}}],[11,"split","","return the vector and triangle list used to create the Neighbors",3,null],[11,"vertex_neighbors","","looks up the index of every polygon that contains\nvertex t, this can be used to calculate new faces",3,null],[11,"polygon_neighbors","","looks up the index of every polygon that is a neighbor of\npolygon at index i. This can be used to prep data for a Geometry\nshader (eg trinagle_adjacency)",3,null],[11,"normal_for_face","","Calculate the normal for face. This is a `flat` shading",3,null],[11,"normal_for_vertex","","Calculate the normal for an vertex based on the average\nof it's Neighbors this is a `smooth` shading",3,null],[0,"generators","","a collection of utilties that can be used to build\nmeshes programmatically",null,null],[3,"SharedVertexIterator","genmesh::generators","An iterator that yields the shared vertices of the mesh",null,null],[3,"IndexedPolygonIterator","","An iterator that yields the indices of the mesh",null,null],[3,"Cube","","A perfect cube, centered at (0, 0, 0) with each face starting at 1/-1 away from the origin",null,null],[3,"Plane","","Represents a 2D plane with origin of (0, 0), from 1 to -1",null,null],[3,"SphereUV","","Represents a sphere with radius of 1, centered at (0, 0, 0)",null,null],[8,"SharedVertex","","The `SharedVertex` trait is meant to be used with the `IndexedPolygon` trait.\nThis trait is meant as a way to calculate the shared vertices that are\nrequired to build the implementors mesh.",null,null],[10,"shared_vertex","","return the shared vertex at offset `i`",8,null],[10,"shared_vertex_count","","return the number of shared vertices required to represent the mesh",8,null],[11,"shared_vertex_iter","","create an iterator that returns each shared vertex that is required to\nbuild the mesh.",8,null],[8,"IndexedPolygon","","The `IndexedPolygon` trait is used with the `SharedVertex` trait in order to build\na mesh. `IndexedPolygon` calculates each polygon face required to build an implementors mesh.\neach face is always returned in indexed form that points to the correct vertice supplied\nby the `SharedVertex` trait.",null,null],[10,"indexed_polygon","","return a polygon with indices to the shared vertex",9,null],[10,"indexed_polygon_count","","return the number of polygons that are needed to represent this mesh",9,null],[11,"indexed_polygon_iter","","create a iterator that will return a polygon for each face in the source mesh",9,null],[8,"Vertices","genmesh","Supplies a way to convert an iterator of polygons to an iterator\nof vertices. Useful for when you need to write the vertices into\na graphics pipeline.",null,null],[10,"vertices","","Convert a polygon iterator to a vertices iterator.",10,null],[8,"MapToVertices","","This acts very similar to a vertex shader. It gives a way to manipulate\nand modify the vertices in a polygon. This is useful if you need to scale\nthe mesh using a matrix multiply, or just for modifying the type of each\nvertex.",null,null],[16,"Output","","`Output` should be a a container of the same shape of the type\nIt's internal values should reflect any transformation the map did.",11,null],[10,"vertex","","from a iterator of polygons, produces a iterator of polygons. Each\nvertex in the process is modified with the suppled function.",11,null],[8,"MapVertex","","equivalent of `map` but per-vertex",null,null],[16,"Output","","`Output` should be a a container of the same shape of the type\nIt's internal values should reflect any transformation the map did.",12,null],[10,"map_vertex","","map a function to each vertex in polygon creating a new polygon",12,null],[8,"Lines","","Creates an LinesIterator from another Iterator",null,null],[16,"Vertex","","The type of each point in the lines",13,null],[10,"lines","","Convert the iterator into a LinesIterator",13,null],[8,"EmitLines","","Convert a Polygon into it's fragments",null,null],[16,"Vertex","","The Vertex defines the corners of a Polygon",14,null],[10,"emit_lines","","convert a polygon into lines, each line is emitted via\ncalling of the callback of `emit` This allow for\na variable amount of lines to be returned",14,null],[8,"EmitTriangles","","provides a way to convert a polygon down to triangles",null,null],[16,"Vertex","","The content of each point in the face",15,null],[10,"emit_triangles","","convert a polygon to one or more triangles, each triangle\nis returned by calling `emit`",15,null],[8,"Triangulate","","`Triangluate` is a easy to to convert any Polygon stream to\na stream of triangles. This is useful since Quads and other geometry\nare not supported by modern graphics pipelines like OpenGL.",null,null],[10,"triangulate","","convert a stream of Polygons to a stream of triangles",16,null],[8,"Indexer","","A trait defining how to defined an Indexer. An indexer is a object\nthat collects verticies and emits indexes for the vertex. The intent\nis that an Indexer can find redundent vertexes and deduplicate them\nby returning aliased indexes.",null,null],[10,"index","","convert a vertex into an index.",17,null],[11,"shared_vertex_iter","genmesh::generators","create an iterator that returns each shared vertex that is required to\nbuild the mesh.",8,null],[11,"indexed_polygon_iter","","create a iterator that will return a polygon for each face in the source mesh",9,null],[11,"size_hint","","",18,null],[11,"next","","",18,null],[11,"size_hint","","",19,null],[11,"next","","",19,null],[11,"clone","","",20,null],[11,"new","","create a new cube generator",20,{"inputs":[],"output":{"name":"cube"}}],[11,"size_hint","","",20,null],[11,"next","","",20,null],[11,"shared_vertex","","",20,null],[11,"shared_vertex_count","","",20,null],[11,"indexed_polygon","","",20,null],[11,"indexed_polygon_count","","",20,null],[11,"clone","","",21,null],[11,"new","","create a new cube generator",21,{"inputs":[],"output":{"name":"plane"}}],[11,"subdivide","","create a subdivided plane. This can be used to build\na grid of points.\nx is the number of subdivisions in the x axis\ny is the number of subdivisions in the y axis",21,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"plane"}}],[11,"size_hint","","",21,null],[11,"next","","",21,null],[11,"shared_vertex","","",21,null],[11,"shared_vertex_count","","",21,null],[11,"indexed_polygon","","",21,null],[11,"indexed_polygon_count","","",21,null],[11,"clone","","",22,null],[11,"new","","Create a new sphere.\n`u` is the number of points across the equator of the sphere.\n`v` is the number of points from pole to pole.",22,{"inputs":[{"name":"usize"},{"name":"usize"}],"output":{"name":"sphereuv"}}],[11,"size_hint","","",22,null],[11,"next","","",22,null],[11,"shared_vertex","","",22,null],[11,"shared_vertex_count","","",22,null],[11,"indexed_polygon","","",22,null],[11,"indexed_polygon_count","","",22,null]],"paths":[[3,"Quad"],[3,"Triangle"],[3,"Line"],[3,"Neighbors"],[4,"Polygon"],[3,"TriangulateIterator"],[3,"VerticesIterator"],[3,"LruIndexer"],[8,"SharedVertex"],[8,"IndexedPolygon"],[8,"Vertices"],[8,"MapToVertices"],[8,"MapVertex"],[8,"Lines"],[8,"EmitLines"],[8,"EmitTriangles"],[8,"Triangulate"],[8,"Indexer"],[3,"SharedVertexIterator"],[3,"IndexedPolygonIterator"],[3,"Cube"],[3,"Plane"],[3,"SphereUV"]]}; initSearch(searchIndex);