materialstructure.java
来自「该内容是关于fdtd的源码,我用过,ok!不错!」· Java 代码 · 共 66 行
JAVA
66 行
//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 + =
减小字号Ctrl + -
显示快捷键?