当前位置: 首页>>代码示例>>C#>>正文


C# Surface.VertexTexCoords方法代码示例

本文整理汇总了C#中Surface.VertexTexCoords方法的典型用法代码示例。如果您正苦于以下问题:C# Surface.VertexTexCoords方法的具体用法?C# Surface.VertexTexCoords怎么用?C# Surface.VertexTexCoords使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Surface的用法示例。


在下文中一共展示了Surface.VertexTexCoords方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: createCube

	public static Mesh createCube(string name)
	{
		Surface surf = new Surface (name);

		surf.AddVertex(-1.0f,-1.0f,-1.0f);
		surf.AddVertex(-1.0f, 1.0f,-1.0f);
		surf.AddVertex( 1.0f, 1.0f,-1.0f);
		surf.AddVertex( 1.0f,-1.0f,-1.0f);
		
		surf.AddVertex(-1.0f,-1.0f, 1.0f);
		surf.AddVertex(-1.0f, 1.0f, 1.0f);
		surf.AddVertex( 1.0f, 1.0f, 1.0f);
		surf.AddVertex( 1.0f,-1.0f, 1.0f);
		
		surf.AddVertex(-1.0f,-1.0f, 1.0f);
		surf.AddVertex(-1.0f, 1.0f, 1.0f);
		surf.AddVertex( 1.0f, 1.0f, 1.0f);
		surf.AddVertex( 1.0f,-1.0f, 1.0f);
		
		surf.AddVertex(-1.0f,-1.0f,-1.0f);
		surf.AddVertex(-1.0f, 1.0f,-1.0f);
		surf.AddVertex( 1.0f, 1.0f,-1.0f);
		surf.AddVertex( 1.0f,-1.0f,-1.0f);
		
		surf.AddVertex(-1.0f,-1.0f, 1.0f);
		surf.AddVertex(-1.0f, 1.0f, 1.0f);
		surf.AddVertex( 1.0f, 1.0f, 1.0f);
		surf.AddVertex( 1.0f,-1.0f, 1.0f);
		
		surf.AddVertex(-1.0f,-1.0f,-1.0f);
		surf.AddVertex(-1.0f, 1.0f,-1.0f);
		surf.AddVertex( 1.0f, 1.0f,-1.0f);
		surf.AddVertex( 1.0f,-1.0f,-1.0f);
		
		surf.VertexNormal(0,0.0f,0.0f,-1.0f);
		surf.VertexNormal(1,0.0f,0.0f,-1.0f);
		surf.VertexNormal(2,0.0f,0.0f,-1.0f);
		surf.VertexNormal(3,0.0f,0.0f,-1.0f);
		
		surf.VertexNormal(4,0.0f,0.0f,1.0f);
		surf.VertexNormal(5,0.0f,0.0f,1.0f);
		surf.VertexNormal(6,0.0f,0.0f,1.0f);
		surf.VertexNormal(7,0.0f,0.0f,1.0f);
		
		surf.VertexNormal(8,0.0f,-1.0f,0.0f);
		surf.VertexNormal(9,0.0f,1.0f,0.0f);
		surf.VertexNormal(10,0.0f,1.0f,0.0f);
		surf.VertexNormal(11,0.0f,-1.0f,0.0f);
		
		surf.VertexNormal(12,0.0f,-1.0f,0.0f);
		surf.VertexNormal(13,0.0f,1.0f,0.0f);
		surf.VertexNormal(14,0.0f,1.0f,0.0f);
		surf.VertexNormal(15,0.0f,-1.0f,0.0f);
		
		surf.VertexNormal(16,-1.0f,0.0f,0.0f);
		surf.VertexNormal(17,-1.0f,0.0f,0.0f);
		surf.VertexNormal(18,1.0f,0.0f,0.0f);
		surf.VertexNormal(19,1.0f,0.0f,0.0f);
		
		surf.VertexNormal(20,-1.0f,0.0f,0.0f);
		surf.VertexNormal(21,-1.0f,0.0f,0.0f);
		surf.VertexNormal(22,1.0f,0.0f,0.0f);
		surf.VertexNormal(23,1.0f,0.0f,0.0f);
		
		surf.VertexTexCoords(0,0.0f,1.0f,0.0f,0);
		surf.VertexTexCoords(1,0.0f,0.0f,0.0f,0);
		surf.VertexTexCoords(2,1.0f,0.0f,0.0f,0);
		surf.VertexTexCoords(3,1.0f,1.0f,0.0f,0);
		
		surf.VertexTexCoords(4,1.0f,1.0f,0.0f,0);
		surf.VertexTexCoords(5,1.0f,0.0f,0.0f,0);
		surf.VertexTexCoords(6,0.0f,0.0f,0.0f,0);
		surf.VertexTexCoords(7,0.0f,1.0f,0.0f,0);
		
		surf.VertexTexCoords(8,0.0f,1.0f,0.0f,0);
		surf.VertexTexCoords(9,0.0f,0.0f,0.0f,0);
		surf.VertexTexCoords(10,1.0f,0.0f,0.0f,0);
		surf.VertexTexCoords(11,1.0f,1.0f,0.0f,0);
		
		surf.VertexTexCoords(12,0.0f,0.0f,0.0f,0);
		surf.VertexTexCoords(13,0.0f,1.0f,0.0f,0);
		surf.VertexTexCoords(14,1.0f,1.0f,0.0f,0);
		surf.VertexTexCoords(15,1.0f,0.0f,0.0f,0);
		
		surf.VertexTexCoords(16,0.0f,1.0f,0.0f,0);
		surf.VertexTexCoords(17,0.0f,0.0f,0.0f,0);
		surf.VertexTexCoords(18,1.0f,0.0f,0.0f,0);
		surf.VertexTexCoords(19,1.0f,1.0f,0.0f,0);
		
		surf.VertexTexCoords(20,1.0f,1.0f,0.0f,0);
		surf.VertexTexCoords(21,1.0f,0.0f,0.0f,0);
		surf.VertexTexCoords(22,0.0f,0.0f,0.0f,0);
		surf.VertexTexCoords(23,0.0f,1.0f,0.0f,0);
		
		surf.VertexTexCoords(0,0.0f,1.0f,0.0f,1);
		surf.VertexTexCoords(1,0.0f,0.0f,0.0f,1);
		surf.VertexTexCoords(2,1.0f,0.0f,0.0f,1);
		surf.VertexTexCoords(3,1.0f,1.0f,0.0f,1);
		
		surf.VertexTexCoords(4,1.0f,1.0f,0.0f,1);
//.........这里部分代码省略.........
开发者ID:Memorix101,项目名称:Unity3D-MD2-Loader,代码行数:101,代码来源:Surface.cs


注:本文中的Surface.VertexTexCoords方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。