📄 conecurveface.java
字号:
package brgeometry;
/**
* <p>Title: Broundary Rrepresentaion</p>
* <p>Description: 这是一个椎面</p>
* <p>Copyright: Copyright (c) 2003</p>
* <p>Company: USTC</p>
* @author unascribed
* @version 1.0
*/
public class ConeCurveFace
extends CurveFace {
private BeelineEdge high;
private RoundCurveEdge hemline; //底边
// public double area;
public ConeCurveFace(RoundCurveEdge hemline, BeelineEdge high) {
this.hemline = hemline;
this.high = high;
this.setarea(this.getarea());
}
public ConeCurveFace() {
}
//有关属性的操作
public void setHigh(BeelineEdge high) {
this.high = high;
}
public void setHemline(RoundCurveEdge hemline) {
this.hemline = hemline;
}
public BeelineEdge gethigh() {
return this.high;
}
public RoundCurveEdge gethemline() {
return this.hemline;
}
//取得面积,实现
public double getRadius() {
return hemline.getRadius();
}
public double getHith() {
return high.getLength();
}
public double getarea() {
double h = high.getLength();
double r = hemline.getRadius();
return 3.1415926 * r * Math.sqrt(h * h + r * r);
}
private void translate() {}
private void scale() {}
private void rotate() {}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -