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; }
public static bool IsEqual(this CCubePos aLhs, CCubePos aRhs) => aLhs == aRhs;
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)); }
internal static CCubePos Add(this CCubePos aLhs, CCubePos aRhs) => aLhs + aRhs;
internal static CCubePos Subtract(this CCubePos aLhs, CCubePos aRhs) => aLhs - aRhs;
internal CCubePosKey(CCubePos aCubePos, Int64 aEdgeLen) { this.CubePos = aCubePos; this.HashCode = aCubePos.CalcHashCode(aEdgeLen); this.EdgeLen = aEdgeLen; }