|
NXOverlayLayer Class
|
환경설정(XDLConfiguration.xml)이 아닌, 영상 및 렌더링 결과를 배경지도과 같이 처리하여 중첩한다.
NXOverlayLayer ID는 OpenGL Maximum supported texture image units에 따라 다르다.
32개의 texture image unit를 지원하는 경우, XDL 엔진의 기본 배경지도(Raster, Vector)를 위한 2개를 제외한 30개를 할당해서 사용할 수 있다.
Inheritance Hierarchy
Namespace: Pixoneer.NXDL.NXPlanetAssembly: NXPlanet (in NXPlanet.dll) Version: 2.0.3.38
Syntaxpublic class NXOverlayLayer : IDisposable
The NXOverlayLayer type exposes the following members.
Constructors
Methods | Name | Description |
---|
 | AddCompMan(String, XDMCompManager) | composite 매니저를 추가한다. 도시레벨은 입력 데이터의 영역을 기반으로 자동으로 설정된다. |
 | AddCompMan(String, XDMCompManager, Int32, Int32) | composite 매니저를 추가한다. |
 | AddComposite(String, XDMComposite) | composite를 추가한다. 도시레벨은 입력 데이터의 영역을 기반으로 자동으로 설정된다. |
 | AddComposite(String, XDMComposite, Int32, Int32) | composite를 추가한다. |
 | GetCompMan | AddCompMan 함수를 통해 추가된 composite 메니저를 가져온다. |
 | GetComposite | AddComposite 함수를 통해 추가된 composite를 가져온다. |
 | Move(Int32, Int32) | composite를 이동한다. |
 | Move(String, Int32) | composite를 이동한다. |
 | MoveBottom(Int32) | 하단으로 이동한다. |
 | MoveBottom(String) | 하단으로 이동한다. |
 | MoveDown(Int32) | 아래로 이동한다. |
 | MoveDown(String) | 아래로 이동한다. |
 | MoveTop(Int32) | 상단으로 이동한다. |
 | MoveTop(String) | 상단으로 이동한다. |
 | MoveUp(Int32) | 위로 이동한다. |
 | MoveUp(String) | 위로 이동한다. |
 | Remove(Int32) | 인덱스에 해당하는 composite 또는 composite 매니저를 삭제한다. |
 | Remove(String) | 이름에 해당하는 composite 또는 composite 매니저를 삭제한다. |
 | SetAlpha | 투명도를 설정한다. |
 | SetRenderLayer | RenderLayer의 렌더링 결과를 배경지도와 같이 렌더링될 수 있도록 설정한다.
프로그램을 종료할 때 NXOverlay에서 해당 레이어를 삭제(NXOverlay.Remove(0))하고 NXRenderLayer의 dispose를 호출해야 한다.
|
 | SetTransparentValue | 투명값(null 처리)을 설정한다. |
 | UpdateCompMan | 추가할 때 지정한 Composite Manager를 찾아 갱신한다. |
 | UpdateComposite | 추가할 때 지정한 이름으로 Composite를 찾아 갱신한다. |
 | UpdateSource | 오버레이 레이어의 내용을 갱신하도록 한다. |
Top
Example
PlanetView에 ID 2의 OverlayLayer를 가져와서 로딩한 파일의 색합성을 생성하여 추가하고 렌더링한다.
private void DisplayFile(XRSLoadFile xrsFile)
{
XDMComposite newcomp;
int numBand = xrsFile.NumBand;
newcomp = new XDMComposite();
newcomp.Name = xrsFile.FileName;
if (numBand >= 3)
{
XDMBand bandL0 = xrsFile.GetBandAt(0);
XDMBand bandL1 = xrsFile.GetBandAt(1);
XDMBand bandL2 = xrsFile.GetBandAt(2);
newcomp.Mode = eCompMode.RGB;
newcomp.SetBand(ref bandL0, 2);
newcomp.SetBand(ref bandL1, 1);
newcomp.SetBand(ref bandL2, 0);
for (int i = 0; i < 3; i++)
{
newcomp.SetCutType(eCompCutType.Ct95, i);
newcomp.SetStretchCoverage(eCompStretchCoverage.Band, i);
newcomp.SetStretchType(eCompStretchType.Gaussian, i);
newcomp.SetCutMin(0.0, i);
newcomp.SetCutMax(255.0, i);
}
}
else
{
XDMBand bandL0 = xrsFile.GetBandAt(0);
newcomp.Mode = eCompMode.Gray;
newcomp.SetBand(ref bandL0, 0);
newcomp.SetCutType(eCompCutType.Ct95, 0);
newcomp.SetStretchCoverage(eCompStretchCoverage.Band, 0);
newcomp.SetStretchType(eCompStretchType.Gaussian, 0);
}
NXOverlayLayer layer = nxPlanetView1.GetPTMOverlayLayer(2);
layer.AddComposite("com1",newcomp);
}
See Also