本文整理汇总了C#中OpenSim.Region.Framework.Scenes.TerrainChannel.Tainted方法的典型用法代码示例。如果您正苦于以下问题:C# TerrainChannel.Tainted方法的具体用法?C# TerrainChannel.Tainted怎么用?C# TerrainChannel.Tainted使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OpenSim.Region.Framework.Scenes.TerrainChannel
的用法示例。
在下文中一共展示了TerrainChannel.Tainted方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TerrainChannelTest
public void TerrainChannelTest()
{
TerrainChannel x = new TerrainChannel((int)Constants.RegionSize, (int)Constants.RegionSize);
Assert.That(x[0, 0] == 0.0, "Terrain not initialising correctly.");
x[0, 0] = 1.0;
Assert.That(x[0, 0] == 1.0, "Terrain not setting values correctly.");
x[0, 0] = 0;
x[0, 0] += 5.0;
x[0, 0] -= 1.0;
Assert.That(x[0, 0] == 4.0, "Terrain addition/subtraction error.");
x[0, 0] = Math.PI;
double[,] doublesExport = x.GetDoubles();
Assert.That(doublesExport[0, 0] == Math.PI, "Export to double[,] array not working correctly.");
x[0, 0] = 1.0;
float[] floatsExport = x.GetFloatsSerialised();
Assert.That(floatsExport[0] == 1.0f, "Export to float[] not working correctly.");
x[0, 0] = 1.0;
Assert.That(x.Tainted(0, 0), "Terrain channel tainting not working correctly.");
Assert.That(!x.Tainted(0, 0), "Terrain channel tainting not working correctly.");
TerrainChannel y = x.Copy();
Assert.That(!ReferenceEquals(x, y), "Terrain copy not duplicating correctly.");
Assert.That(!ReferenceEquals(x.GetDoubles(), y.GetDoubles()), "Terrain array not duplicating correctly.");
}