C# Class Universe.Modules.Terrain.TerrainModule

Inheritance: INonSharedRegionModule, ITerrainModule
Mostra file Open project: Virtual-Universe/Virtual-Universe

Protected Properties

Property Type Description
m_noTerrain bool
m_terrainPatchesSent Dictionary
m_use3DWater bool

Public Methods

Method Description
AddConsoleCommands ( ) : void

Adds the console commands.

AddRegion ( IScene scene ) : void
CalcLandArea ( IScene scene ) : uint

Calculates the land area.

CheckForTerrainUpdates ( ) : void

Checks to see if the terrain has been modified since last check but won't attempt to limit those changes to the limits specified in the estate settings currently invoked by the command line operations in the region server only

CheckForTerrainUpdates ( bool respectEstateSettings, bool forceSendOfTerrainInfo, bool isWater ) : void

Checks to see if the terrain has been modified since last check. If it has been modified, every all the terrain patches are sent to the client. If the call is asked to respect the estate settings for terrain_raise_limit and terrain_lower_limit, it will clamp terrain updates between these values currently invoked by client_OnModifyTerrain only and not the Commander interfaces should height map deltas be limited to the estate settings limits force send terrain Check water or terrain

Close ( ) : void
EventManager_OnNewClient ( IClientAPI client ) : void

Installs terrain brush hook to IClientAPI

EventManager_OnSignificantClientMovement ( IScenePresence presence ) : void
Initialize ( IConfigSource config ) : void

Creates and initializes a terrain module for a region

InstallDefaultEffects ( ) : void

Installs into terrain module the standard suite of brushes

InterfaceBakeTerrain ( IScene scene, string cmd ) : void
InterfaceCalcArea ( IScene scene, string cmd ) : void
InterfaceElevateTerrain ( IScene scene, string cmd ) : void
InterfaceEnableExperimentalBrushes ( IScene scene, string cmd ) : void
InterfaceFillTerrain ( IScene scene, string cmd ) : void
InterfaceFlipTerrain ( IScene scene, string cmd ) : void
InterfaceGenerateTerrain ( IScene scene, string cmd ) : void

User interface for user generation of terrain in the selected region.

InterfaceHelp ( IScene scene, string cmd ) : void

Command line interface help.

InterfaceLoadFile ( IScene scene, string cmd ) : void
InterfaceLoadTileFile ( IScene scene, string cmd ) : void
InterfaceLowerTerrain ( IScene scene, string cmd ) : void
InterfaceMultiplyTerrain ( IScene scene, string cmd ) : void
InterfaceRescaleTerrain ( IScene scene, string cmd ) : void
InterfaceRevertTerrain ( IScene scene, string cmd ) : void
InterfaceSaveFile ( IScene scene, string cmd ) : void
InterfaceSavePhysics ( IScene scene, string cmd ) : void
InterfaceShowDebugStats ( IScene scene, string cmd ) : void
InternalLoadFromStream ( string filename, Stream stream, int offsetX, int offsetY, ITerrainChannel update ) : ITerrainChannel

Loads a terrain file from a stream and installs it in the scene.

LoadFromFile ( string filename, int offsetX, int offsetY ) : void

Loads a terrain file from disk and installs it in the scene.

LoadFromStream ( string filename, Stream stream ) : void

Loads a terrain file from a stream and installs it in the scene.

LoadFromStream ( string filename, Stream stream, int offsetX, int offsetY ) : void

Loads a terrain file from a stream and installs it in the scene.

LoadFromStream ( string filename, Uri pathToTerrainHeightmap ) : void

Loads a terrain file from the specified URI

LoadPlugins ( ) : void
LoadRevertMap ( ) : void

Loads the World Revert heightmap

LoadRevertMapFromStream ( string filename, Stream stream, int offsetX, int offsetY ) : void

Loads a terrain file from a stream and installs it in the scene.

LoadRevertWaterMap ( ) : void

Loads the World Revert heightmap

LoadTileFromFile ( string filename, int fileTileWidth, int fileTileHeight, int tileLocX, int tileLocY ) : void

Loads a 256x256 tile from a larger terrain file and installs it into the region.

LoadWaterFromStream ( string filename, Stream stream, int offsetX, int offsetY ) : void

Loads a terrain file from a stream and installs it in the scene.

LoadWaterRevertMapFromStream ( string filename, Stream stream, int offsetX, int offsetY ) : void

Loads a terrain file from a stream and installs it in the scene.

LoadWorldHeightmap ( ) : void

Loads the World heightmap

LoadWorldWaterMap ( ) : void

Loads the World heightmap

ModifyTerrain ( UUID user, System.Vector3 pos, byte size, byte action, UUID agentId ) : void

Modify Land

OnClosingClient ( IClientAPI client ) : void
OnNewPresence ( IScenePresence presence ) : void
QueueTerrainUpdate ( ) : void
RegionLoaded ( IScene scene ) : void
RemoveRegion ( IScene scene ) : void
ResetTerrain ( ) : void

Reset the terrain of this region to the default

ResetWater ( ) : void

Reset the terrain of this region to the default

SaveToFile ( string filename ) : void

Saves the current heightmap to a specified file.

SaveToStream ( ITerrainChannel channel, string filename, Stream stream ) : void

Saves the current heightmap to a specified stream.

SendLayerData ( IClientAPI RemoteClient ) : void

Send the region heightmap to the client

StoreUndoState ( ) : void
TaintTerrain ( ) : void
TerrainUpdateTimer ( object sender, EventArgs ea ) : void
UndoTerrain ( ITerrainChannel channel ) : void
UpdateRevertMap ( ) : void

Saves the current state of the region into the revert map buffer.

UpdateRevertWaterMap ( ) : void

Saves the current state of the region into the revert map buffer.

UpdateWaterHeight ( double height ) : void
client_OnBakeTerrain ( IClientAPI remoteClient ) : void
client_OnLandUndo ( IClientAPI client ) : void
client_OnModifyTerrain ( UUID user, float height, float seconds, byte size, byte action, float north, float west, float south, float east, UUID agentId, float BrushSize ) : void
client_onGodlikeMessage ( IClientAPI client, UUID requester, string Method, List Parameters ) : void

Protected Methods

Method Description
SendTerrainUpdatesForClient ( IScenePresence presence ) : void

Private Methods

Method Description
FindModuleForScene ( IScene scene ) : List
GetTerrainLoader ( string fileName ) : ITerrainLoader

Gets the terrain loader.

LimitChannelChanges ( ITerrainChannel channel, ITerrainChannel revert ) : bool

Checks to see height deltas in the tainted terrain patch at xStart ,yStart are all within the current estate limits true if changes were limited, false otherwise

LimitMaxTerrain ( ITerrainChannel channel ) : bool
URIFetch ( Uri uri ) : Stream
UniverseEventManager_OnGenericEvent ( string FunctionName, object parameters ) : object

Method Details

AddConsoleCommands() public method

Adds the console commands.
public AddConsoleCommands ( ) : void
return void

AddRegion() public method

public AddRegion ( IScene scene ) : void
scene IScene
return void

CalcLandArea() public method

Calculates the land area.
public CalcLandArea ( IScene scene ) : uint
scene IScene Scene.
return uint

CheckForTerrainUpdates() public method

Checks to see if the terrain has been modified since last check but won't attempt to limit those changes to the limits specified in the estate settings currently invoked by the command line operations in the region server only
public CheckForTerrainUpdates ( ) : void
return void

CheckForTerrainUpdates() public method

Checks to see if the terrain has been modified since last check. If it has been modified, every all the terrain patches are sent to the client. If the call is asked to respect the estate settings for terrain_raise_limit and terrain_lower_limit, it will clamp terrain updates between these values currently invoked by client_OnModifyTerrain only and not the Commander interfaces should height map deltas be limited to the estate settings limits force send terrain Check water or terrain
public CheckForTerrainUpdates ( bool respectEstateSettings, bool forceSendOfTerrainInfo, bool isWater ) : void
respectEstateSettings bool
forceSendOfTerrainInfo bool
isWater bool
return void

Close() public method

public Close ( ) : void
return void

EventManager_OnNewClient() public method

Installs terrain brush hook to IClientAPI
public EventManager_OnNewClient ( IClientAPI client ) : void
client IClientAPI
return void

EventManager_OnSignificantClientMovement() public method

public EventManager_OnSignificantClientMovement ( IScenePresence presence ) : void
presence IScenePresence
return void

Initialize() public method

Creates and initializes a terrain module for a region
public Initialize ( IConfigSource config ) : void
config IConfigSource Config for the region
return void

InstallDefaultEffects() public method

Installs into terrain module the standard suite of brushes
public InstallDefaultEffects ( ) : void
return void

InterfaceBakeTerrain() public method

public InterfaceBakeTerrain ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceCalcArea() public method

public InterfaceCalcArea ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceElevateTerrain() public method

public InterfaceElevateTerrain ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceEnableExperimentalBrushes() public method

public InterfaceEnableExperimentalBrushes ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceFillTerrain() public method

public InterfaceFillTerrain ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceFlipTerrain() public method

public InterfaceFlipTerrain ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceGenerateTerrain() public method

User interface for user generation of terrain in the selected region.
public InterfaceGenerateTerrain ( IScene scene, string cmd ) : void
scene IScene Scene.
cmd string Cmd.
return void

InterfaceHelp() public method

Command line interface help.
public InterfaceHelp ( IScene scene, string cmd ) : void
scene IScene Scene.
cmd string Cmd.
return void

InterfaceLoadFile() public method

public InterfaceLoadFile ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceLoadTileFile() public method

public InterfaceLoadTileFile ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceLowerTerrain() public method

public InterfaceLowerTerrain ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceMultiplyTerrain() public method

public InterfaceMultiplyTerrain ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceRescaleTerrain() public method

public InterfaceRescaleTerrain ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceRevertTerrain() public method

public InterfaceRevertTerrain ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceSaveFile() public method

public InterfaceSaveFile ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceSavePhysics() public method

public InterfaceSavePhysics ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InterfaceShowDebugStats() public method

public InterfaceShowDebugStats ( IScene scene, string cmd ) : void
scene IScene
cmd string
return void

InternalLoadFromStream() public method

Loads a terrain file from a stream and installs it in the scene.
public InternalLoadFromStream ( string filename, Stream stream, int offsetX, int offsetY, ITerrainChannel update ) : ITerrainChannel
filename string Filename to terrain file. Type is determined by extension.
stream Stream
offsetX int
offsetY int
update ITerrainChannel
return ITerrainChannel

LoadFromFile() public method

Loads a terrain file from disk and installs it in the scene.
public LoadFromFile ( string filename, int offsetX, int offsetY ) : void
filename string Filename to terrain file. Type is determined by extension.
offsetX int
offsetY int
return void

LoadFromStream() public method

Loads a terrain file from a stream and installs it in the scene.
public LoadFromStream ( string filename, Stream stream ) : void
filename string Filename to terrain file. Type is determined by extension.
stream Stream
return void

LoadFromStream() public method

Loads a terrain file from a stream and installs it in the scene.
public LoadFromStream ( string filename, Stream stream, int offsetX, int offsetY ) : void
filename string Filename to terrain file. Type is determined by extension.
stream Stream
offsetX int
offsetY int
return void

LoadFromStream() public method

Loads a terrain file from the specified URI
public LoadFromStream ( string filename, Uri pathToTerrainHeightmap ) : void
filename string The name of the terrain to load
pathToTerrainHeightmap System.Uri The URI to the terrain height map
return void

LoadPlugins() public method

public LoadPlugins ( ) : void
return void

LoadRevertMap() public method

Loads the World Revert heightmap
public LoadRevertMap ( ) : void
return void

LoadRevertMapFromStream() public method

Loads a terrain file from a stream and installs it in the scene.
public LoadRevertMapFromStream ( string filename, Stream stream, int offsetX, int offsetY ) : void
filename string Filename to terrain file. Type is determined by extension.
stream Stream
offsetX int
offsetY int
return void

LoadRevertWaterMap() public method

Loads the World Revert heightmap
public LoadRevertWaterMap ( ) : void
return void

LoadTileFromFile() public method

Loads a 256x256 tile from a larger terrain file and installs it into the region.
public LoadTileFromFile ( string filename, int fileTileWidth, int fileTileHeight, int tileLocX, int tileLocY ) : void
filename string The terrain file to load
fileTileWidth int The width of the file
fileTileHeight int The height of the file
tileLocX int Where to begin our slice
tileLocY int Where to begin our slice
return void

LoadWaterFromStream() public method

Loads a terrain file from a stream and installs it in the scene.
public LoadWaterFromStream ( string filename, Stream stream, int offsetX, int offsetY ) : void
filename string Filename to terrain file. Type is determined by extension.
stream Stream
offsetX int
offsetY int
return void

LoadWaterRevertMapFromStream() public method

Loads a terrain file from a stream and installs it in the scene.
public LoadWaterRevertMapFromStream ( string filename, Stream stream, int offsetX, int offsetY ) : void
filename string Filename to terrain file. Type is determined by extension.
stream Stream
offsetX int
offsetY int
return void

LoadWorldHeightmap() public method

Loads the World heightmap
public LoadWorldHeightmap ( ) : void
return void

LoadWorldWaterMap() public method

Loads the World heightmap
public LoadWorldWaterMap ( ) : void
return void

ModifyTerrain() public method

Modify Land
public ModifyTerrain ( UUID user, System.Vector3 pos, byte size, byte action, UUID agentId ) : void
user UUID
pos System.Vector3 Land-position (X,Y,0)
size byte The size of the brush (0=small, 1=medium, 2=large)
action byte 0=LAND_LEVEL, 1=LAND_RAISE, 2=LAND_LOWER, 3=LAND_SMOOTH, 4=LAND_NOISE, 5=LAND_REVERT
agentId UUID UUID of script-owner
return void

OnClosingClient() public method

public OnClosingClient ( IClientAPI client ) : void
client IClientAPI
return void

OnNewPresence() public method

public OnNewPresence ( IScenePresence presence ) : void
presence IScenePresence
return void

QueueTerrainUpdate() public method

public QueueTerrainUpdate ( ) : void
return void

RegionLoaded() public method

public RegionLoaded ( IScene scene ) : void
scene IScene
return void

RemoveRegion() public method

public RemoveRegion ( IScene scene ) : void
scene IScene
return void

ResetTerrain() public method

Reset the terrain of this region to the default
public ResetTerrain ( ) : void
return void

ResetWater() public method

Reset the terrain of this region to the default
public ResetWater ( ) : void
return void

SaveToFile() public method

Saves the current heightmap to a specified file.
public SaveToFile ( string filename ) : void
filename string The destination filename
return void

SaveToStream() public method

Saves the current heightmap to a specified stream.
public SaveToStream ( ITerrainChannel channel, string filename, Stream stream ) : void
channel ITerrainChannel
filename string The destination filename. Used here only to identify the image type
stream Stream
return void

SendLayerData() public method

Send the region heightmap to the client
public SendLayerData ( IClientAPI RemoteClient ) : void
RemoteClient IClientAPI Client to send to
return void

SendTerrainUpdatesForClient() protected method

protected SendTerrainUpdatesForClient ( IScenePresence presence ) : void
presence IScenePresence
return void

StoreUndoState() public method

public StoreUndoState ( ) : void
return void

TaintTerrain() public method

public TaintTerrain ( ) : void
return void

TerrainUpdateTimer() public method

public TerrainUpdateTimer ( object sender, EventArgs ea ) : void
sender object
ea System.EventArgs
return void

UndoTerrain() public method

public UndoTerrain ( ITerrainChannel channel ) : void
channel ITerrainChannel
return void

UpdateRevertMap() public method

Saves the current state of the region into the revert map buffer.
public UpdateRevertMap ( ) : void
return void

UpdateRevertWaterMap() public method

Saves the current state of the region into the revert map buffer.
public UpdateRevertWaterMap ( ) : void
return void

UpdateWaterHeight() public method

public UpdateWaterHeight ( double height ) : void
height double
return void

client_OnBakeTerrain() public method

public client_OnBakeTerrain ( IClientAPI remoteClient ) : void
remoteClient IClientAPI
return void

client_OnLandUndo() public method

public client_OnLandUndo ( IClientAPI client ) : void
client IClientAPI
return void

client_OnModifyTerrain() public method

public client_OnModifyTerrain ( UUID user, float height, float seconds, byte size, byte action, float north, float west, float south, float east, UUID agentId, float BrushSize ) : void
user UUID
height float
seconds float
size byte
action byte
north float
west float
south float
east float
agentId UUID
BrushSize float
return void

client_onGodlikeMessage() public method

public client_onGodlikeMessage ( IClientAPI client, UUID requester, string Method, List Parameters ) : void
client IClientAPI
requester UUID
Method string
Parameters List
return void

Property Details

m_noTerrain protected_oe property

protected bool m_noTerrain
return bool

m_terrainPatchesSent protected_oe property

protected Dictionary m_terrainPatchesSent
return Dictionary

m_use3DWater protected_oe property

protected bool m_use3DWater
return bool