|
XAircraft Class
|
비행체 모델을 나타낸다.
Inheritance Hierarchy
Namespace: Pixoneer.NXDL.NEQUIPAssembly: NXDLncw (in NXDLncw.dll) Version: 3.0.0.0
Syntaxpublic class XAircraft : XEquipObj
The XAircraft type exposes the following members.
Constructors
Properties | Name | Description |
---|
 | BlendColor | 모형의 혼합 색상을 확인하거나 설정한다. 현재는 블렌드 모드인 경우 모델의 텍스쳐, 물질 정보를 무시하고 이 색으로 그린다. |
 | BlendMode | 혼합 색상 모드를 확인하거나 설정한다. |
 | FixSizeOn2D | 모델을 확대축소와 상관없이 Planet2D 모드에서 일정한 크기로 도시하는지 여부를 확인하거나 설정한다. |
 | FixSizeOn3D | 모델을 확대축소와 상관없이 Planet3D 모드에서 일정한 크기로 도시하는지 여부를 확인하거나 설정한다. |
 | MaxXYZ | 영역의 최대 크기 속성. |
 | MinXYZ | 영역의 최소 크기 속성. |
 | Scalable | 비율(scale)에 따라 모델의 크기를 조절하는지 여부를 확인하거나 설정한다. |
Top
Methods
Exampleclass MyAircraft : XAircraft
{
public ArrayList m_Positions;
private Object thisLock = new Object();
public MyAircraft()
{
m_Positions = new ArrayList();
}
public override bool SetPosition(XGeoPoint pos)
{
if (pos == null) return false;
lock (thisLock)
{
m_Positions.Add(pos);
if (m_Positions.Count > 300)
m_Positions.RemoveAt(0);
}
return base.SetPosition(pos);
}
public override bool SetState(XGeoPoint pos, XAttitude att)
{
if (pos == null) return false;
lock (thisLock)
{
m_Positions.Add(pos);
if (m_Positions.Count > 300)
m_Positions.RemoveAt(0);
}
return base.SetState(pos,att);
}
public override bool DrawBefore(NXPlanetDrawArgs DrawArgs, XGeoPoint gpDraw)
{
return base.DrawBefore(DrawArgs, gpDraw);
}
public override bool DrawOver(NXPlanetDrawArgs DrawArgs, XGeoPoint gpDraw)
{
XGraphics g = DrawArgs.Graphics;
g.glEnable(XGraphics.GL_BLEND);
g.glBlendFunc(XGraphics.GL_SRC_ALPHA, XGraphics.GL_ONE_MINUS_SRC_ALPHA);
g.glLineWidth(5.0);
g.glColor4d(1.0, 1.0, 0.0, 0.8);
g.glBegin(XGraphics.GL_LINE_STRIP);
lock (thisLock)
{
for (int i = 0; i < m_Positions.Count; i++)
{
XGeoPoint gp = (XGeoPoint)m_Positions[i];
if (gp == null) continue;
g.glVertex3d(gp.ecr);
}
}
g.glEnd();
g.glColor(Color.White);
g.glLineWidth(1.0);
g.glDisable(XGraphics.GL_BLEND);
g.glDisable(XGraphics.GL_LINE_SMOOTH);
return true;
}
}
See Also