本文整理汇总了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
}
示例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);
}
}
示例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;
}
示例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;
}