13693261870
2025-04-08 3417cf014a65765e02696c1d121ce58b2b4a8aed
src/main/java/com/se/simu/domain/dto/TerrainDto.java
@@ -1,41 +1,43 @@
package com.se.simu.domain.dto;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.util.ArrayList;
import java.util.List;
import java.util.*;
/**
 * 范围实体类
 *
 * @author WWW
 * @date   2024-09-30
 */
@SuppressWarnings("ALL")
public class TerrainDto {
    private List<int[]> size;
    @JsonIgnore
    @JSONField(serialize = false)
    private String epsg;
    @JsonIgnore
    private double minHeight;
    @JSONField(serialize = false)
    private Map<String, float[]> vals;
    @JsonIgnore
    private double maxHeight;
    @JSONField(serialize = false)
    private Map<String, List<XYO>> xyo;
    public TerrainDto() {
        vals = new HashMap<>();
        size = new ArrayList<>();
        xyo = new HashMap<>();
    }
    public TerrainDto(List<Integer> sizes) {
        size = new ArrayList<>();
        this();
        for (Integer i : sizes) {
            size.add(new int[]{i, i});
        }
    }
    public void setHeight(double minHeight, double maxHeight) {
        this.minHeight = minHeight;
        this.maxHeight = maxHeight;
            /*List<XYO> list = new ArrayList<>();
            for (int x = 0; x < i; x++) {
                for (int y = 0; y < i; y++) {
                    list.add(new XYO(x, y, i));
                }
            }
            xyo.put(i + "_" + i, list);*/
        }
    }
    public List<int[]> getSize() {
@@ -54,19 +56,19 @@
        this.epsg = epsg;
    }
    public double getMinHeight() {
        return minHeight;
    public Map<String, float[]> getVals() {
        return vals;
    }
    public void setMinHeight(double minHeight) {
        this.minHeight = minHeight;
    public void setVals(Map<String, float[]> vals) {
        this.vals = vals;
    }
    public double getMaxHeight() {
        return maxHeight;
    public Map<String, List<XYO>> getXyo() {
        return xyo;
    }
    public void setMaxHeight(double maxHeight) {
        this.maxHeight = maxHeight;
    public void setXyo(Map<String, List<XYO>> xyo) {
        this.xyo = xyo;
    }
}