private void paintGrass(TerrainImporterSettings importerSettings, NWN2AreaViewer nwN2AreaViewer, NWN2TerrainEditorForm terrainEditor, SynchronousNetDisplayManager netDisplayManager, float outerRight, float outerTop, float areaX, float areaY, Vector3 vector3, string texture, string textureName) { if (importerSettings.paintGrass != null) { Hashtable hashtable = (Hashtable)importerSettings.paintGrass[textureName]; Decimal fullRadius = (Decimal)hashtable["innerRadius"] + (Decimal)hashtable["outerRadius"]; float floatFullRadius = Convert.ToSingle(++fullRadius); if ((bool)hashtable["doPaint"] && areaX > floatFullRadius && (areaX < outerRight - floatFullRadius && areaY > floatFullRadius) && areaY < outerTop - floatFullRadius) { string[] textures = (string[])((ArrayList)hashtable["textures"]).ToArray(typeof(string)); netDisplayManager.GrassParameters(nwN2AreaViewer.AreaNetDisplayWindow.Scene, (float)hashtable["bladeSize"], (float)hashtable["bladeSizeVariation"], textures.Length, textures); netDisplayManager.TerrainBrush(nwN2AreaViewer.AreaNetDisplayWindow.Scene, 1, 1, vector3, Convert.ToSingle(hashtable["innerRadius"]), Convert.ToSingle(hashtable["outerRadius"]), (float)hashtable["pressure"], 0.5f, terrainEditor.TerrainBrushColor, terrainEditor.CursorColor, texture, TerrainModificationType.Grass); netDisplayManager.TerrainModify(nwN2AreaViewer.AreaNetDisplayWindow.Scene, TerrainModificationType.Grass, -1); } } }
private void paintWaterOnMap(NWN2AreaViewer nwN2AreaViewer, NWN2TerrainEditorForm terrainEditor, SynchronousNetDisplayManager netDisplayManager, float z, Vector3 vector3, string texture) { netDisplayManager.TerrainBrush(nwN2AreaViewer.AreaNetDisplayWindow.Scene, 1, 1, vector3, 1f, 6f, z, 0.5f, terrainEditor.TerrainBrushColor, terrainEditor.CursorColor, texture, TerrainModificationType.Water); terrainEditor.UpdateWaterSliders(); netDisplayManager.TerrainModify(nwN2AreaViewer.AreaNetDisplayWindow.Scene, TerrainModificationType.Water, -1); }
private void manipulateTerrain(TerrainImporterSettings importerSettings, bool paintTerrain, float texturePressure, float textureInnerRadius, float textureOuterRadius, NWN2AreaViewer nwN2AreaViewer, NWN2TerrainEditorForm terrainEditor, SynchronousNetDisplayManager netDisplayManager, float zValue, ref Vector3 vector3, ref string texture, string textureName) { netDisplayManager.TerrainBrush(nwN2AreaViewer.AreaNetDisplayWindow.Scene, 1, 0, vector3, 1f, 1f, zValue, 0.5f, terrainEditor.TerrainBrushColor, terrainEditor.CursorColor, texture, TerrainModificationType.Flatten); netDisplayManager.TerrainModify(nwN2AreaViewer.AreaNetDisplayWindow.Scene, TerrainModificationType.Flatten, 0); if (paintTerrain) { texture = (string)importerSettings.paintTextures[textureName]; netDisplayManager.TerrainBrush(nwN2AreaViewer.AreaNetDisplayWindow.Scene, 1, 0, vector3, textureInnerRadius, textureOuterRadius, texturePressure, 0.5f, terrainEditor.TerrainBrushColor, terrainEditor.CursorColor, texture, TerrainModificationType.Flatten); netDisplayManager.TerrainModify(nwN2AreaViewer.AreaNetDisplayWindow.Scene, TerrainModificationType.Texture, 0); } }