{"id":853,"date":"2011-12-06T15:22:43","date_gmt":"2011-12-06T15:22:43","guid":{"rendered":"http:\/\/www.west-racing.com\/mf\/?page_id=853"},"modified":"2011-12-06T19:54:07","modified_gmt":"2011-12-06T19:54:07","slug":"page-mesh","status":"publish","type":"page","link":"http:\/\/www.west-racing.com\/mf\/?page_id=853","title":{"rendered":"Page Mesh"},"content":{"rendered":"<p><a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/megashapepage.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/megashapepage-1024x424.jpg\" alt=\"\" title=\"megashapepage\" width=\"640\" height=\"265\" class=\"aligncenter size-large wp-image-854 fancy\" srcset=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/megashapepage-1024x424.jpg 1024w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/megashapepage-300x124.jpg 300w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/megashapepage-680x282.jpg 680w, http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/megashapepage.jpg 1278w\" sizes=\"(max-width: 640px) 100vw, 640px\" \/><\/a><br \/>\nCreate meshes to be used for pages. This is basically a box with user defined dimensions and the number of segments in each direction and controls for where the pivot is.<br \/>\n<a href=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/megapagemesh1.jpg\"><img loading=\"lazy\" src=\"http:\/\/www.west-racing.com\/mf\/wp-content\/uploads\/2011\/12\/megapagemesh1.jpg\" alt=\"\" title=\"megapagemesh\" width=\"242\" height=\"247\" class=\"alignright size-full wp-image-861 fancy\" \/><\/a><\/p>\n<h3>Page Mesh Param Description<\/h3>\n<h4><strong>Width<\/strong><\/h4>\n<p>Width of the mesh.<\/p>\n<h4><strong>Length<\/strong><\/h4>\n<p>Length of the mesh.<\/p>\n<h4><strong>Height<\/strong><\/h4>\n<p>Height of the mesh.<\/p>\n<h4><strong>Width Segs<\/strong><\/h4>\n<p>Number of vertices for the width of the mesh.<\/p>\n<h4><strong>Length Segs<\/strong><\/h4>\n<p>Number of vertices for the Length of the mesh.<\/p>\n<h4><strong>Height Segs<\/strong><\/h4>\n<p>Number of vertices for the height of the mesh.<\/p>\n<h4><strong>Gen UVs<\/strong><\/h4>\n<p>Generate UV coordinates, needed if you want to apply a texture to the mesh.<\/p>\n<h4><strong>Rotate<\/strong><\/h4>\n<p>Rotate the UV coordinates about the vertical axis.<\/p>\n<h4><strong>Pivot Base<\/strong><\/h4>\n<p>Move the pivot to the bottom of the mesh.<\/p>\n<h4><strong>Pivot Edge<\/strong><\/h4>\n<p>Move the pivot to the edge of the mesh, needed for easy page flipping.<\/p>\n<h4><strong>Tangents<\/strong><\/h4>\n<p>If you plan on using shaders that require tangents on the mesh ie bump mapping turn this on.<\/p>\n<h4><strong>Optimize<\/strong><\/h4>\n<p>Get unity to optimize the mesh.<\/p>\n<h3>Page Mesh Class<\/h3>\n<p>[cc lang=&#8221;c#&#8221;]public class MegaMeshPage : MonoBehaviour<br \/>\n{<br \/>\n\tpublic float\tWidth;<br \/>\n\tpublic float\tLength;<br \/>\n\tpublic float\tHeight;<br \/>\n\tpublic int\t\tWidthSegs;<br \/>\n\tpublic int\t\tLengthSegs;<br \/>\n\tpublic int\t\tHeightSegs;<br \/>\n\tpublic bool\t\tgenUVs;<br \/>\n\tpublic float\trotate;<br \/>\n\tpublic bool\t\tPivotBase;<br \/>\n\tpublic bool\t\tPivotEdge;<br \/>\n\tpublic bool\t\ttangents;<br \/>\n\tpublic bool\t\toptimize;<br \/>\n}[\/cc]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Create meshes to be used for pages. This is basically a box with user defined dimensions and the number of segments in each direction and controls for where the pivot [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":390,"menu_order":0,"comment_status":"open","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/853"}],"collection":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=853"}],"version-history":[{"count":8,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/853\/revisions"}],"predecessor-version":[{"id":935,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/853\/revisions\/935"}],"up":[{"embeddable":true,"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=\/wp\/v2\/pages\/390"}],"wp:attachment":[{"href":"http:\/\/www.west-racing.com\/mf\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=853"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}