![]() |
Xncw
|
public class XncwTheater : NXRenderLayer
The XncwTheater type exposes the following members.
Name | Description | |
---|---|---|
![]() | XncwTheater | XncwTheater 객체를 생성하고 데이터 멤버를 초기화한다. 기본 생성자. |
Name | Description | |
---|---|---|
![]() | AutoDelete | 객체를 자동적으로 삭제할지 여부를 확인하거나 설정한다. |
![]() | LayerCapture | 레이어의 갈무리 여부를 확인하거나 설정한다. (기본값: true) (Overrides NXRenderLayerLayerCapture) |
![]() | LayerVisible | 레이어의 도시여부를 확인하거나 설정한다. (기본값: true) (Overrides NXRenderLayerLayerVisible) |
Name | Description | |
---|---|---|
![]() | AddEquipment | Theater에 장비 객체를 추가한다. |
![]() ![]() | AttachTo | PlanetView에 레이어를 첨부한다. |
![]() | FixObjectDrawSize | 대상 뷰에 도시할 때 장비 크기를 고정한다. Algor : distance(eye,objPos) * scaleFactor * objectSize scaleFactor sample: 0.0002 |
![]() | FreeEquipment | Theater에서 ID에 따른 장비 객체를 해제한다. |
![]() | GetEquipment | Theater에서 ID에 따른 장비(equipment) 객체를 가져온다. |
![]() | GetLayerID | 레이어 ID를 가져온다. (Overrides NXRenderLayerGetLayerID) |
![]() | Initialize | 내부 초기화 함수. NXPlanetEngine이 자동 호출한다. (Overrides NXRenderLayerInitialize) |
![]() | Pick | 대상 장비 객체를 선택하도록 선택(pick) 명령을 보낸다. |
![]() | ShowAllObjects | 대상 view에서 모든 장비 객체를 보이거나 숨기도록 한다. |
![]() | UpdateVisibleArea | 사용자에 의해 theater 구성이 변경되면 theater의 영역을 갱신할 수 있도록 호출한다. |
partial class FormMain { public Pixoneer.NXDL.NNCW.XncwTheater xncwTheater; private void InitializeComponent() { this.xncwTheater = new Pixoneer.NXDL.NNCW.XncwTheater(); this.xncwTheater.OnPicked += new Pixoneer.NXDL.NNCW.XncwTheaterPickEvent(this.OnPicked); } private void FormMain_Load(object sender, EventArgs e) { xncwTheater.AttachTo(nxPlanetView); XAircraft plane = new MyAircraft(); plane.LoadModel("f15.3ds"); plane.SetPosition(pos); plane.SetYawPitchRoll(att.yaw, att.pitch, att.roll); // Add aircraft to theater XEquipObj obj = plane; int nUUID = 1; xncwTheater.AddEquipment(nUUID, ref obj); } public void FreePlane(int uuid) { xncwTheater.FreeEquipment(uuid); } private bool OnPicked(object sender, Pixoneer.NXDL.NXPlanet.NXPlanetDrawArgs e, long nUUID) { if (this.listBoxSelectedPlanes.InvokeRequired) { Pixoneer.NXDL.NNCW.XncwTheaterPickEvent d = new Pixoneer.NXDL.NNCW.XncwTheaterPickEvent(OnPicked); this.Invoke(d, new object[] { sender, e, nUUID }); } else { for (int i = 0; i < this.listBoxSelectedPlanes.Items.Count; i++) { if (this.listBoxSelectedPlanes.Items[i].ToString() == nUUID.ToString()) return true; } this.listBoxSelectedPlanes.Items.Add(nUUID); } return true; } private void nxPlanetView_MouseClick(object sender, MouseEventArgs e) { xncwTheater.Pick(nxPlanetView.GetHandle(),new XVertex2d(e.X, e.Y)); } }