Beispiel #1
0
 internal CQuadrantBuildArgs(CRandomGenerator aRanomdGenerator,
                             CCubePos aTileCubePos,
                             CVector3Dbl aTileWorldPos,
                             Func <CSprite, CSpritePersistentData> aGetSpritePersistentDataFunc,
                             Func <CSprite, int> aNewSpritePersistentId)
 {
     this.RandomGenerator             = aRanomdGenerator;
     this.TileCubePos                 = aTileCubePos;
     this.TileWorldPos                = aTileWorldPos;
     this.GetSpritePersistentDataFunc = aGetSpritePersistentDataFunc;
     this.NewSpritePersistentId       = aNewSpritePersistentId;
 }
Beispiel #2
0
 public static bool IsEqual(this CCubePos aLhs, CCubePos aRhs)
 => aLhs == aRhs;
Beispiel #3
0
        internal static CCubePos GetCubeCoordinates(this CDimPos aDimensionCoordinates, CCubePos aCubeCoordinates, int aEdgeLength)
        {
            var aBaseX   = aCubeCoordinates.x;
            var aBaseY   = aCubeCoordinates.y;
            var aBaseZ   = aCubeCoordinates.z;
            var aOffsetX = aDimensionCoordinates.c1;
            var aOffsetZ = aDimensionCoordinates.c0;
            var aX1      = aOffsetX % ((Int64)aEdgeLength);
            var aOffsetY = (aOffsetX - aX1) / ((Int64)aEdgeLength);
            var aX       = aX1 + aBaseX;
            var aY       = aBaseY + aOffsetY;
            var aZ       = aBaseZ + aOffsetZ;

            return(new CCubePos((Int64)aX, (Int64)aY, (Int64)aZ));
        }
Beispiel #4
0
 internal static CCubePos Add(this CCubePos aLhs, CCubePos aRhs) => aLhs + aRhs;
Beispiel #5
0
 internal static CCubePos Subtract(this CCubePos aLhs, CCubePos aRhs) => aLhs - aRhs;
Beispiel #6
0
 internal CCubePosKey(CCubePos aCubePos, Int64 aEdgeLen)
 {
     this.CubePos  = aCubePos;
     this.HashCode = aCubePos.CalcHashCode(aEdgeLen);
     this.EdgeLen  = aEdgeLen;
 }