OpenSim
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Classes | Public Types | Public Member Functions | Protected Member Functions | Properties | List of all members
OpenSim.Region.CoreModules.World.Terrain.TerrainModule Class Reference
Inheritance diagram for OpenSim.Region.CoreModules.World.Terrain.TerrainModule:
Inheritance graph
[legend]
Collaboration diagram for OpenSim.Region.CoreModules.World.Terrain.TerrainModule:
Collaboration graph
[legend]

Public Types

enum  StandardTerrainEffects : byte {
  StandardTerrainEffects.Flatten = 0, StandardTerrainEffects.Raise = 1, StandardTerrainEffects.Lower = 2, StandardTerrainEffects.Smooth = 3,
  StandardTerrainEffects.Noise = 4, StandardTerrainEffects.Revert = 5, StandardTerrainEffects.Erode = 255, StandardTerrainEffects.Weather = 254,
  StandardTerrainEffects.Olsen = 253
}
 A standard set of terrain brushes and effects recognised by viewers More...
 

Public Member Functions

void Initialise (IConfigSource config)
 Creates and initialises a terrain module for a region More...
 
void AddRegion (Scene scene)
 This is called whenever a Scene is added. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, after Initialise has been called. More...
 
void RegionLoaded (Scene scene)
 This will be called once for every scene loaded. In a shared module this will be multiple times in one instance, while a nonshared module instance will only be called once. This method is called after AddRegion has been called in all modules for that scene, providing an opportunity to request another module's interface, or hook an event from another module. More...
 
void RemoveRegion (Scene scene)
 This is called whenever a Scene is removed. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, if the scene this instance is associated with is removed. More...
 
void Close ()
 This is the inverse to Initialise. After a Close(), this instance won't be usable anymore. More...
 
void UndoTerrain (ITerrainChannel channel)
 
void LoadFromFile (string filename)
 Loads a terrain file from disk and installs it in the scene. More...
 
void SaveToFile (string filename)
 Saves the current heightmap to a specified file. More...
 
void LoadFromStream (string filename, Uri pathToTerrainHeightmap)
 Loads a terrain file from the specified URI More...
 
void LoadFromStream (string filename, Stream stream)
 Load a terrain from a stream. More...
 
void LoadFromStream (string filename, Vector3 displacement, float radianRotation, Vector2 rotationDisplacement, Stream stream)
 Loads a terrain file from a stream and installs it in the scene. More...
 
void LoadFromStream (string filename, Vector3 displacement, float rotationDegrees, Vector2 boundingOrigin, Vector2 boundingSize, Stream stream)
 
void ModifyTerrain (UUID user, Vector3 pos, byte size, byte action, UUID agentId)
 Modify Land More...
 
void SaveToStream (string filename, Stream stream)
 Saves the current heightmap to a specified stream. More...
 
void TaintTerrain ()
 Taint the terrain. This will lead to sending the terrain data to the clients again. Use this if you change terrain data outside of the terrain module (e.g. in osTerrainSetHeight) More...
 
void PushTerrain (IClientAPI pClient)
 When a client initially connects, all the terrain must be pushed to the viewer. This call causes all the terrain patches to be sent to the client. More...
 
void InstallPlugin (string pluginName, ITerrainEffect effect)
 
void UpdateBakedMap ()
 Saves the current state of the region into the baked map buffer. More...
 
void LoadFromFile (string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY)
 Loads a tile from a larger terrain file and installs it into the region. More...
 
void SaveToFile (string filename, int fileWidth, int fileHeight, int fileStartX, int fileStartY)
 Save a number of map tiles to a single big image file. More...
 
void InterfaceFillTerrain (Object[] args)
 
void ModifyCommand (string module, string[] cmd)
 
- Public Member Functions inherited from OpenSim.Region.Framework.Interfaces.ITerrainModule
void LoadFromStream (string filename, System.Uri pathToTerrainHeightmap)
 

Protected Member Functions

void client_OnUnackedTerrain (IClientAPI client, int patchX, int patchY)
 

Properties

ICommander CommandInterface [get]
 
Type ReplaceableInterface [get]
 
string Name [get]
 
- Properties inherited from OpenSim.Region.Framework.Interfaces.IRegionModuleBase
string Name [get]
 
Type ReplaceableInterface [get]
 If this returns non-null, it is the type of an interface that this module intends to register. This will cause the loader to defer loading of this module until all other modules have been loaded. If no other module has registered the interface by then, this module will be activated, else it will remain inactive, letting the other module take over. This should return non-null ONLY in modules that are intended to be easily replaceable, e.g. stub implementations that the developer expects to be replaced by third party provided modules. More...
 
- Properties inherited from OpenSim.Region.Framework.Interfaces.ICommandableModule
ICommander CommandInterface [get]
 

Detailed Description

Definition at line 53 of file TerrainModule.cs.

Member Enumeration Documentation

A standard set of terrain brushes and effects recognised by viewers

Enumerator
Flatten 
Raise 
Lower 
Smooth 
Noise 
Revert 
Erode 
Weather 
Olsen 

Definition at line 60 of file TerrainModule.cs.

Member Function Documentation

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.AddRegion ( Scene  scene)
inline

This is called whenever a Scene is added. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, after Initialise has been called.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 227 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.client_OnUnackedTerrain ( IClientAPI  client,
int  patchX,
int  patchY 
)
inlineprotected

Definition at line 1428 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.Close ( )
inline

This is the inverse to Initialise. After a Close(), this instance won't be usable anymore.

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 304 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.Initialise ( IConfigSource  config)
inline

Creates and initialises a terrain module for a region

Parameters
sceneRegion initialising
configConfig for the region

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 215 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.InstallPlugin ( string  pluginName,
ITerrainEffect  effect 
)
inline
void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.InterfaceFillTerrain ( Object[]  args)
inline

Definition at line 1610 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.LoadFromFile ( string  filename)
inline

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

Parameters
filenameFilename to terrain file. Type is determined by extension.

Implements OpenSim.Region.Framework.Interfaces.ITerrainModule.

Definition at line 329 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.LoadFromFile ( string  filename,
int  fileWidth,
int  fileHeight,
int  fileStartX,
int  fileStartY 
)
inline

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

Parameters
filenameThe terrain file to load
fileWidthThe width of the file in units
fileHeightThe height of the file in units
fileStartXWhere to begin our slice
fileStartYWhere to begin our slice

Definition at line 737 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.LoadFromStream ( string  filename,
Uri  pathToTerrainHeightmap 
)
inline

Loads a terrain file from the specified URI

Parameters
filenameThe name of the terrain to load
pathToTerrainHeightmapThe URI to the terrain height map

Definition at line 413 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.LoadFromStream ( string  filename,
Stream  stream 
)
inline

Load a terrain from a stream.

Parameters
filenameOnly required here to identify the image type. Not otherwise used in the loading itself.
stream

Implements OpenSim.Region.Framework.Interfaces.ITerrainModule.

Definition at line 418 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.LoadFromStream ( string  filename,
Vector3  displacement,
float  radianRotation,
Vector2  rotationDisplacement,
Stream  stream 
)
inline

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

Parameters
filenameFilename to terrain file. Type is determined by extension.
stream

Implements OpenSim.Region.Framework.Interfaces.ITerrainModule.

Definition at line 428 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.LoadFromStream ( string  filename,
Vector3  displacement,
float  rotationDegrees,
Vector2  boundingOrigin,
Vector2  boundingSize,
Stream  stream 
)
inline
void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.ModifyCommand ( string  module,
string[]  cmd 
)
inline

Definition at line 1868 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.ModifyTerrain ( UUID  user,
Vector3  pos,
byte  size,
byte  action,
UUID  agentId 
)
inline

Modify Land

Parameters
posLand-position (X,Y,0)
sizeThe size of the brush (0=small, 1=medium, 2=large)
action0=LAND_LEVEL, 1=LAND_RAISE, 2=LAND_LOWER, 3=LAND_SMOOTH, 4=LAND_NOISE, 5=LAND_REVERT
agentIdUUID of script-owner

Implements OpenSim.Region.Framework.Interfaces.ITerrainModule.

Definition at line 516 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.PushTerrain ( IClientAPI  pClient)
inline

When a client initially connects, all the terrain must be pushed to the viewer. This call causes all the terrain patches to be sent to the client.

Implements OpenSim.Region.Framework.Interfaces.ITerrainModule.

Definition at line 565 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.RegionLoaded ( Scene  scene)
inline

This will be called once for every scene loaded. In a shared module this will be multiple times in one instance, while a nonshared module instance will only be called once. This method is called after AddRegion has been called in all modules for that scene, providing an opportunity to request another module's interface, or hook an event from another module.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 279 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.RemoveRegion ( Scene  scene)
inline

This is called whenever a Scene is removed. For shared modules, this can happen several times. For non-shared modules, this happens exactly once, if the scene this instance is associated with is removed.

Parameters
sceneA Scene

Implements OpenSim.Region.Framework.Interfaces.IRegionModuleBase.

Definition at line 286 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.SaveToFile ( string  filename)
inline

Saves the current heightmap to a specified file.

Parameters
filenameThe destination filename

Implements OpenSim.Region.Framework.Interfaces.ITerrainModule.

Definition at line 384 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.SaveToFile ( string  filename,
int  fileWidth,
int  fileHeight,
int  fileStartX,
int  fileStartY 
)
inline

Save a number of map tiles to a single big image file.

If the image file already exists then the tiles saved will replace those already in the file - other tiles will be untouched.

Parameters
filenameThe terrain file to save
fileWidthThe number of tiles to save along the X axis.
fileHeightThe number of tiles to save along the Y axis.
fileStartXThe map x co-ordinate at which to begin the save.
fileStartYThe may y co-ordinate at which to begin the save.

Definition at line 778 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.SaveToStream ( string  filename,
Stream  stream 
)
inline

Saves the current heightmap to a specified stream.

Parameters
filenameThe destination filename. Used here only to identify the image type
stream

Implements OpenSim.Region.Framework.Interfaces.ITerrainModule.

Definition at line 530 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.TaintTerrain ( )
inline

Taint the terrain. This will lead to sending the terrain data to the clients again. Use this if you change terrain data outside of the terrain module (e.g. in osTerrainSetHeight)

Implements OpenSim.Region.Framework.Interfaces.ITerrainModule.

Definition at line 552 of file TerrainModule.cs.

void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.UndoTerrain ( ITerrainChannel  channel)
inline
void OpenSim.Region.CoreModules.World.Terrain.TerrainModule.UpdateBakedMap ( )
inline

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

Definition at line 722 of file TerrainModule.cs.

Property Documentation

ICommander OpenSim.Region.CoreModules.World.Terrain.TerrainModule.CommandInterface
get

Definition at line 202 of file TerrainModule.cs.

string OpenSim.Region.CoreModules.World.Terrain.TerrainModule.Name
get

Definition at line 312 of file TerrainModule.cs.

Type OpenSim.Region.CoreModules.World.Terrain.TerrainModule.ReplaceableInterface
get

Definition at line 308 of file TerrainModule.cs.


The documentation for this class was generated from the following file: