package com.zy.acs.manager.core.domain; import lombok.Data; /** * 车辆在自身坐标系下的矩形轮廓描述 */ @Data public class VehicleFootprint { private double head; private double tail; private double halfWidth; public VehicleFootprint(double head, double tail, double halfWidth) { this.head = head; this.tail = tail; this.halfWidth = halfWidth; } public double maxExtent() { // double frontDiag = Math.hypot(head, halfWidth); // double rearDiag = Math.hypot(tail, halfWidth); // return Math.max(frontDiag, rearDiag); return Math.hypot(Math.max(head, tail), halfWidth); } }