import {Vector2} from './Vector2';
//==========================================================
// 二维轮廓。
//
// @struct
// @author maocy
// @version 150912
//==========================================================
export class Outline2 {
//..........................................................
// @attribute
public min: Vector2 = new Vector2();
public max: Vector2 = new Vector2();
//============================================================
// 判断是否为空。
//
// @method
// @return Boolean 是否为空
//============================================================
public isEmpty(p) {
// return this.min.isEmpty() && this.max.isEmpty();
}
//============================================================
// 接收一个三维轮廓。
//
// @method
// @param value:SOutline2 三维轮廓
//============================================================
public assign(value) {
this.min.assign(value.min);
this.max.assign(value.max);
}
//==========================================================
// 设置最小轮廓。
//
// @method
//==========================================================
public setMin() {
// this.min.setMax();
// this.max.setMin();
}
//==========================================================
// 设置最大轮廓。
//
// @method
//==========================================================
public setMax() {
// this.min.setMin();
// this.max.setMax();
}
//==========================================================
// 设置参数。
//
// @method
// @param ix:minX:Number 最小X坐标
// @param iy:minY:Number 最小Y坐标
// @param ax:maxX:Number 最大X坐标
// @param ay:maxY:Number 最大Y坐标
//==========================================================
public set(minX, minY, maxX, maxY) {
this.min.set(minX, minY);
this.max.set(maxX, maxY);
}
//==========================================================
// 合并最小轮廓。
//
// @method
// @param p:outline:SOutline 轮廓
//==========================================================
public mergeMin(p) {
// this.min.mergeMax(p.min);
// this.max.mergeMin(p.max);
}
//==========================================================
// 合并最大轮廓。
//
// @method
// @param p:outline:SOutline 轮廓
//==========================================================
public mergeMax(p) {
// this.min.mergeMin(p.min);
// this.max.mergeMax(p.max);
}
//==========================================================
// 合并最大轮廓。
//
// @method
// @param x:Number 横坐标
// @param y:Number 纵坐标
//==========================================================
public mergeMax2(x, y) {
// this.min.mergeMin2(x, y);
// this.max.mergeMax2(x, y);
}
//==========================================================
// 合并点。
//
// @method
// @param x:Number X坐标
// @param y:Number Y坐标
// @param z:Number Z坐标
//==========================================================
public mergePoint(x, y, z) {
//this.min.mergeMin3(x, y, z);
//this.max.mergeMax3(x, y, z);
}
//==========================================================
// 序列化数据到输出流里。
//
// @method
// @param p:input:FByteStream 数据流
//==========================================================
public serialize(p) {
// this.min.serialize(p);
// this.max.serialize(p);
}
//==========================================================
// 从输入流里反序列化数据。
//
// @method
// @param p:input:FByteStream 数据流
//==========================================================
public unserialize(p) {
// this.min.unserialize(p);
// this.max.unserialize(p);
}
//============================================================
// 获得字符串。
//
// @return String 字符串
//============================================================
public toString() {
return '(' + this.min + ')-(' + this.max + ')';
}
}