![]() |
NXPlanet
|
public class NXPlanetLayer : NXRenderLayer
The NXPlanetLayer type exposes the following members.
Name | Description | |
---|---|---|
![]() | NXPlanetLayer | NXPlanetLayer 객체를 생성하고 데이터 멤버를 초기화한다. 기본 생성자. |
Name | Description | |
---|---|---|
![]() | LayerCapture | 레이어의 갈무리 여부를 확인하거나 설정한다. (기본값: true) (Overrides NXRenderLayerLayerCapture) |
![]() | LayerVisible | 레이어의 도시여부를 확인하거나 설정한다. (기본값: true) (Overrides NXRenderLayerLayerVisible) |
![]() | ZFar | 렌더링 절두체(frustum)의 Z 최대값 |
![]() | ZNear | 렌더링 절두체(frustum)의 Z 최소값. |
Name | Description | |
---|---|---|
![]() | GetLayerID | 레이어의 고유 ID를 가져온다. (Overrides NXRenderLayerGetLayerID) |
![]() | Initialize | 내부 초기화 함수이다. 이것은 NXPlanetEngine에 의해 오직 한번 호출 된다. (Overrides NXRenderLayerInitialize) |
![]() | ProcessScreenToWorldConvLevel | 사용자가 ScreenToWorld 함수를 호출할 때 처리 수준을 제어하는 고급 함수이다. |
![]() | ScreenToWorld(Int32, XVertex2d, Int32) | 스크린 좌표를 세계 좌표로 변환하며, 한 점을 입력으로 한다. |
![]() | ScreenToWorld(Int32, ArrayList, Int32) | 스크린 좌표를 세계 좌표로 변환하며, 여러 점을 입력으로 한다. |
Name | Description | |
---|---|---|
![]() | OnClear | 레이어가 삭제 될 때 발생한다. |
![]() | OnOrthoRender | Planet 레어이가 렌더링 하는 경우에 발생된다 사용자가 이 곳에 그리는 코드를 작성할 수 있다. 좌표계는 스크린 좌표계를 사용해야 한다. |
![]() | OnRender | Planet 레어이가 렌더링 하는 경우에 발생된다 사용자가 이 곳에 그리는 코드를 작성할 수 있다. 좌표계는 세계 좌표계를 사용해야 한다. |
![]() | OnWndProc | 윈도우 메세지가 전달 될 때 발생한다. |
partial class FormMain { private Pixoneer.NXDL.NXPlanet.NXPlanetLayer nxPlanetLayer2D; private void InitializeComponent() { this.nxPlanetLayer2D = new Pixoneer.NXDL.NXPlanet.NXPlanetLayer(); this.nxPlanetView2D.BackColor = System.Drawing.SystemColors.ActiveCaptionText; this.nxPlanetView2D.Brightness = 1F; this.nxPlanetView2D.Contrast = 1F; this.nxPlanetView2D.Dock = System.Windows.Forms.DockStyle.Fill; this.nxPlanetView2D.EarthMode = Pixoneer.NXDL.NXPlanet.NXPlanetView.eEarthMode.Planet2D; this.nxPlanetView2D.LayoutMode = Pixoneer.NXDL.NXPlanet.NXPlanetView.eLayoutMode.Windows; this.nxPlanetView2D.Location = new System.Drawing.Point(0, 0); this.nxPlanetView2D.Name = "nxPlanetView2D"; this.nxPlanetView2D.RelativeHeight = 1D; this.nxPlanetView2D.RelativeLeft = 0D; this.nxPlanetView2D.RelativeTop = 0D; this.nxPlanetView2D.RelativeWidth = 1D; this.nxPlanetView2D.Rotatable = true; this.nxPlanetView2D.Saturation = 1F; this.nxPlanetView2D.ShowGrid = true; this.nxPlanetView2D.ShowStatusInfo = false; this.nxPlanetView2D.Size = new System.Drawing.Size(406, 577); this.nxPlanetView2D.TabIndex = 0; this.nxPlanetView2D.ToolboxAreaUnit = Pixoneer.NXDL.NXPlanet.NXPlanetView.eToolboxAreaUnit.SquareMeter; this.nxPlanetView2D.ToolboxDistUnit = Pixoneer.NXDL.NXPlanet.NXPlanetView.eToolboxDistUnit.Meter; this.nxPlanetView2D.ToolboxMode = Pixoneer.NXDL.NXPlanet.NXPlanetView.eToolboxMode.None; this.nxPlanetView2D.ViewAreaID = -1; this.nxPlanetLayer2D.OnOrthoRender += new Pixoneer.NXDL.NXPlanet.NXPlanetLayerRenderEvent(this.nxPlanetLayer2D_OnOrthoRender); this.nxPlanetLayer2D.OnRender += new Pixoneer.NXDL.NXPlanet.NXPlanetLayerRenderEvent(this.nxPlanetLayer2D_OnRender); } private void FormMain_Load(object sender, EventArgs e) { nxPlanetView2D.AddRenderLayer(ref nxPlanetLayer2D); } private bool nxPlanetLayer2D_OnRender(object sender, Pixoneer.NXDL.NXPlanet.NXPlanetDrawArgs e) { XVertex3d pt1 = e.ViewArea.GeographicToWorld(XGeoPoint.FromDegree(127.0, 37.0, 0)); XVertex3d pt2 = e.ViewArea.GeographicToWorld(XGeoPoint.FromDegree(127.0, 38.0, 0)); e.Graphics.glDisable(Pixoneer.NXDL.NGR.XGraphics.GL_DEPTH_TEST); e.Graphics.glPushMatrix(); e.Graphics.glTranslated(-e.WOS.x, -e.WOS.y, -e.WOS.z); e.Graphics.glColor3f(1.0f, 0.0f, 0.0f); e.Graphics.glBegin(Pixoneer.NXDL.NGR.XGraphics.GL_LINES); e.Graphics.glVertex3d(pt1.x, pt1.y, pt1.z); e.Graphics.glVertex3d(pt2.x, pt2.y, pt2.z); e.Graphics.glEnd(); e.Graphics.glColor3f(1.0f, 1.0f, 1.0f); return default(bool); } private bool nxPlanetLayer2D_OnOrthoRender(object sender, Pixoneer.NXDL.NXPlanet.NXPlanetDrawArgs e) { e.Graphics.glBegin(Pixoneer.NXDL.NGR.XGraphics.GL_TRIANGLES); e.Graphics.glColor3f(0.9f, 0.0f, 0.0f); e.Graphics.glVertex3d(m_RButtonDownPos.x, m_RButtonDownPos.y, 0); e.Graphics.glColor3f(0.5f, 0.0f, 0.0f); e.Graphics.glVertex3d(m_RButtonDownPos.x + 10, m_RButtonDownPos.y - 20, 0); e.Graphics.glVertex3d(m_RButtonDownPos.x - 10, m_RButtonDownPos.y - 20, 0); e.Graphics.glEnd(); return default(bool); } }