📄 materialstructure.java
字号:
//package fdtd;
public class MaterialStructure
{
public int imat;
public double xl, xu, yl, yu, zl, zu;
public double time_appear;
public double time_disappear;
public double time;
public Component(int imat, double xl, double xu,
double yl, double yu, double zl, double zu, double time_appear, double time_disappear)
{
this.imat=imat;
this.xl=xl;
this.xu=xu;
this.yl=yl;
this.yu=yu;
this.zl=zl;
this.zu=zu;
this.time_appear=time_appear;
this.time_disappear=time_disappear;
}
public boolean exists(double time)
{
if ((time>=this.time_appear)&&(time<this.time_disappear))
{
return true;
}
else
{
return false;
}
}
public boolean in(double x, double y, double z)
{
boolean temp;
temp=false;
if (x>=this.xl)
{ if (x<this.xu)
{ if (y>=this.yl)
{ if (y<this.yu)
{ if (z>=this.zl)
{ if (z<this.zu) temp=true;
}
}
}
}
}
return temp;
}
public boolean intime(double x, double y, double z, double time)
{
return (in(x,y,z)&&exists(time));
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -