public TerrainCellMesh(VolumeDensity8 volume, Vector3 pos) { surface = new SurfaceMeshPositionMaterialNormal(); Position = pos; volume.setBorderValue(new Density8(0)); surfaceExtractor = new SurfaceExtractorDensity8(volume, volume.getEntireVolumePaddedBorder(), surface); cubicSurfaceExtractor = new CubicSurfaceExtractorWithNormalsDensity8(volume, volume.getEntireVolumePaddedBorder(), surface); }
public TerrainCellMesh(VolumeDensity8 volume, Vector3 pos, float scale) { Position = pos; //Setup the world matrix this.worldMatrix = Matrix.CreateScale(scale) * Matrix.CreateRotationY(MathHelper.Pi) * Matrix.CreateTranslation(pos * volume.getWidth()); surface = new SurfaceMeshPositionMaterialNormal(); volume.setBorderValue(new Density8(0)); surfaceExtractor = new SurfaceExtractorDensity8(volume, volume.getEntireVolumePaddedBorder(), surface); cubicSurfaceExtractor = new CubicSurfaceExtractorWithNormalsDensity8(volume, volume.getEntireVolumePaddedBorder(), surface); }