C# 클래스 NetMud.Cartography.Cartographer

Methods for handling with the coordinate maps
파일 보기 프로젝트 열기: SwiftAusterity/NetMud 1 사용 예제들

공개 메소드들

메소드 설명
FindCenterOfMap ( long map, int zIndex = -1 ) : IRoomData

Finds the central room of a given map

GenerateMapFromRoom ( IRoomData room, int radius, HashSet roomPool, bool shrink = false ) : long[,,]

Generate a room map starting in a room backing data with a radius around it

GetRoomInDirection ( IRoomData origin, MovementDirectionType direction ) : IRoomData

Gets a room in a direction if there is one based on the world map the room belongs to

GetSinglePlane ( long fullMap, int zIndex ) : ].long[

Render a 3d map down to 2d

GetZoneMap ( long fullMap, long zoneId, bool recenter = false ) : long[,,]

Isolates the main world map to just one zone

ShrinkMap ( long map ) : long[,,]

Shrinks a map matrix to its exact needed coordinate bounds

TakeSliceOfMap ( int>.Tuple xBounds, int>.Tuple yBounds, int>.Tuple zBounds, long map, bool shrink = false ) : long[,,]

Gives back the original map but with all rooms that fall outside of the indicated bounds removed

비공개 메소드들

메소드 설명
AddDirectionToMap ( long dataMap, MovementDirectionType transversalDirection, IRoomData origin, int diameter, int centerX, int centerY, int centerZ, HashSet roomPool ) : long[,,]
AddFullRoomToMap ( long dataMap, IRoomData origin, int diameter, int centerX, int centerY, int centerZ, HashSet roomPool ) : long[,,]
ShrinkMap ( long fullMap, int xLowest, int yLowest, int zLowest, int>.Tuple xBounds, int>.Tuple yBounds, int>.Tuple zBounds ) : long[,,]

메소드 상세

FindCenterOfMap() 공개 정적인 메소드

Finds the central room of a given map
public static FindCenterOfMap ( long map, int zIndex = -1 ) : IRoomData
map long the map x,y,z
zIndex int If > -1 we're looking for the x,y center of the single plane as opposed to the actual x,y,z center of the whole map
리턴 IRoomData

GenerateMapFromRoom() 공개 정적인 메소드

Generate a room map starting in a room backing data with a radius around it
public static GenerateMapFromRoom ( IRoomData room, int radius, HashSet roomPool, bool shrink = false ) : long[,,]
room IRoomData the starting room
radius int the radius of rooms to go out to. -1 means "generate the entire world"
roomPool HashSet
shrink bool
리턴 long[,,]

GetRoomInDirection() 공개 정적인 메소드

Gets a room in a direction if there is one based on the world map the room belongs to
public static GetRoomInDirection ( IRoomData origin, MovementDirectionType direction ) : IRoomData
origin IRoomData The room we're starting in
direction MovementDirectionType The direction we're moving in
리턴 IRoomData

GetSinglePlane() 공개 정적인 메소드

Render a 3d map down to 2d
public static GetSinglePlane ( long fullMap, int zIndex ) : ].long[
fullMap long
zIndex int
리턴 ].long[

GetZoneMap() 공개 정적인 메소드

Isolates the main world map to just one zone
public static GetZoneMap ( long fullMap, long zoneId, bool recenter = false ) : long[,,]
fullMap long the world map
zoneId long the zone to isolate
recenter bool recenter the map or not, defaults to not
리턴 long[,,]

ShrinkMap() 공개 정적인 메소드

Shrinks a map matrix to its exact needed coordinate bounds
public static ShrinkMap ( long map ) : long[,,]
map long
리턴 long[,,]

TakeSliceOfMap() 공개 정적인 메소드

Gives back the original map but with all rooms that fall outside of the indicated bounds removed
public static TakeSliceOfMap ( int>.Tuple xBounds, int>.Tuple yBounds, int>.Tuple zBounds, long map, bool shrink = false ) : long[,,]
xBounds int>.Tuple The upper and lower bounds to grab for X axis
yBounds int>.Tuple The upper and lower bounds to grab for Y axis
zBounds int>.Tuple The upper and lower bounds to grab for Z axis
map long The map to take from
shrink bool Return a new array that is bound to the size of the remaining data
리턴 long[,,]