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


C# Face.ToString方法代码示例

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


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

示例1: Parse

        protected override void Parse(EndianBinaryReader r)
        {
            Status = (StatusEnum)r.ReadByte();
            Position = CoordInt.Read(r);
            Face = (Face)r.ReadByte();

            #if DEBUGPACKET
            if (Status.ToString() == ((int)Status).ToString())
                throw new NotImplementedException(Status.ToString());
            if (Face.ToString() == ((int)Face).ToString())
                throw new NotImplementedException(Face.ToString());
            #endif
        }
开发者ID:mctraveler,项目名称:MineSharp,代码行数:13,代码来源:PlayerDigging.cs

示例2: RoundPoint


//.........这里部分代码省略.........

				case Face.Left | Face.Back | Face.Bottom:
					{
						RoundEdge(Edge.LeftBack, radius, extraDimension);
						RoundEdge(Edge.LeftBottom, radius, extraDimension);
						RoundEdge(Edge.BackBottom, radius, extraDimension);

						CsgObject pointRound = new Box(radiusBoxSize, radiusBoxSize, radiusBoxSize, "box");
						CsgObject pointCut = new Sphere(radius, "sphere");
						pointCut = new Align(pointCut, threeFacesThatSharePoint, pointRound, threeFacesThatSharePoint, extraDimension, -extraDimension, extraDimension);
						pointRound -= pointCut;
						pointRound = new Align(pointRound, threeFacesThatSharePoint, GetEdgeOffset(threeFacesThatSharePoint), -extraDimension, extraDimension, -extraDimension);
						root += pointRound;
					}
					break;

				case Face.Left | Face.Back | Face.Top:
					{
						RoundEdge(Edge.LeftBack, radius, extraDimension);
						RoundEdge(Edge.LeftTop, radius, extraDimension);
						RoundEdge(Edge.BackTop, radius, extraDimension);

						CsgObject pointRound = new Box(radiusBoxSize, radiusBoxSize, radiusBoxSize, "box");
						CsgObject pointCut = new Sphere(radius, "sphere");
						pointCut = new Align(pointCut, threeFacesThatSharePoint, pointRound, threeFacesThatSharePoint, extraDimension, -extraDimension, -extraDimension);
						pointRound -= pointCut;
						pointRound = new Align(pointRound, threeFacesThatSharePoint, GetEdgeOffset(threeFacesThatSharePoint), -extraDimension, extraDimension, extraDimension);
						root += pointRound;
					}
					break;

				case Face.Right | Face.Front | Face.Bottom:
					{
						RoundEdge(Edge.RightFront, radius, extraDimension);
						RoundEdge(Edge.RightBottom, radius, extraDimension);
						RoundEdge(Edge.FrontBottom, radius, extraDimension);

						CsgObject pointRound = new Box(radiusBoxSize, radiusBoxSize, radiusBoxSize, "box");
						CsgObject pointCut = new Sphere(radius, "sphere");
						pointCut = new Align(pointCut, threeFacesThatSharePoint, pointRound, threeFacesThatSharePoint, -extraDimension, extraDimension, extraDimension);
						pointRound -= pointCut;
						pointRound = new Align(pointRound, threeFacesThatSharePoint, GetEdgeOffset(threeFacesThatSharePoint), extraDimension, -extraDimension, -extraDimension);
						root += pointRound;
					}
					break;

				case Face.Right | Face.Front | Face.Top:
					{
						RoundEdge(Edge.RightFront, radius, extraDimension);
						RoundEdge(Edge.RightTop, radius, extraDimension);
						RoundEdge(Edge.FrontTop, radius, extraDimension);

						CsgObject pointRound = new Box(radiusBoxSize, radiusBoxSize, radiusBoxSize, "box");
						CsgObject pointCut = new Sphere(radius, "sphere");
						pointCut = new Align(pointCut, threeFacesThatSharePoint, pointRound, threeFacesThatSharePoint, -extraDimension, extraDimension, -extraDimension);
						pointRound -= pointCut;
						pointRound = new Align(pointRound, threeFacesThatSharePoint, GetEdgeOffset(threeFacesThatSharePoint), extraDimension, -extraDimension, extraDimension);
						root += pointRound;
					}
					break;

				case Face.Right | Face.Back | Face.Bottom:
					{
						RoundEdge(Edge.RightBack, radius, extraDimension);
						RoundEdge(Edge.RightBottom, radius, extraDimension);
						RoundEdge(Edge.BackBottom, radius, extraDimension);

						CsgObject pointRound = new Box(radiusBoxSize, radiusBoxSize, radiusBoxSize, "box");
						CsgObject pointCut = new Sphere(radius, "sphere");
						pointCut = new Align(pointCut, threeFacesThatSharePoint, pointRound, threeFacesThatSharePoint, -extraDimension, -extraDimension, extraDimension);
						pointRound -= pointCut;
						pointRound = new Align(pointRound, threeFacesThatSharePoint, GetEdgeOffset(threeFacesThatSharePoint), extraDimension, extraDimension, -extraDimension);
						root += pointRound;
					}
					break;

				case Face.Right | Face.Back | Face.Top:
					{
						RoundEdge(Edge.RightBack, radius, extraDimension);
						RoundEdge(Edge.RightTop, radius, extraDimension);
						RoundEdge(Edge.BackTop, radius, extraDimension);

						CsgObject pointRound = new Box(radiusBoxSize, radiusBoxSize, radiusBoxSize, "box");
						CsgObject pointCut = new Sphere(radius, "sphere");
						pointCut = new Align(pointCut, threeFacesThatSharePoint, pointRound, threeFacesThatSharePoint, -extraDimension, -extraDimension, -extraDimension);
						pointRound -= pointCut;
						pointRound = new Align(pointRound, threeFacesThatSharePoint, GetEdgeOffset(threeFacesThatSharePoint), extraDimension, extraDimension, extraDimension);
						root += pointRound;
					}
					break;

				default:
					throw new NotImplementedException("Don't know how to round " + threeFacesThatSharePoint.ToString());
			}

			if (!roundedPoints.ContainsKey(threeFacesThatSharePoint))
			{
				roundedPoints.Add(threeFacesThatSharePoint, radius);
			}
		}
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:101,代码来源:Round.cs

示例3: IsSet

		private static bool IsSet(Face variableToCheck, Face faceToCheckFor, Face faceToAssertNot)
		{
			if ((variableToCheck & faceToCheckFor) != 0)
			{
				if ((variableToCheck & faceToAssertNot) != 0)
				{
					throw new Exception("You cannot have both " + faceToCheckFor.ToString() + " and " + faceToAssertNot.ToString() + " set when calling Align.  The are mutually exclusive.");
				}
				return true;
			}

			return false;
		}
开发者ID:glocklueng,项目名称:agg-sharp,代码行数:13,代码来源:Align.cs

示例4: _CreatePlane

 GameObject _CreatePlane( Mesh mesh, Face face )
 {
     GameObject go = new GameObject();
     go.transform.parent = this.transform;
     go.transform.localPosition = Vector3.zero;
     go.transform.localScale = new Vector3( this.Radius, this.Radius, this.Radius );
     go.transform.localRotation = Quaternion.identity;
     Material material = new Material( Shader.Find( this.ShaderName ) );
     material.mainTexture = Skybox.GetTexture( "_" + face.ToString() + "Tex" );
     MeshRenderer meshRenderer = go.AddComponent< MeshRenderer >();
     meshRenderer.material = material;
     meshRenderer.castShadows = false;
     meshRenderer.receiveShadows = false;
     MeshFilter meshFilter = go.AddComponent< MeshFilter >();
     meshFilter.mesh = mesh;
     return go;
 }
开发者ID:mrayy,项目名称:Telexistence-Gateway,代码行数:17,代码来源:SkyboxMesh.cs


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