|
XImageGraphicsxglVertex3d(XVertex3d) Method
|
3차원 정점을 설정한다. 설정한 정점에 대해 오프셋/크기조절이 적용된다.
Namespace: Pixoneer.NXDL.NXImageAssembly: NXImage (in NXImage.dll) Version: 3.0.0.5
Syntaxpublic override void xglVertex3d(
XVertex3d v
)
Parameters
- v XVertex3d
- 정점.
Return Value
이 함수는 값을 반환하지 않는다.
Exampleprivate bool nxImageLayerGPU_OnRender(NXImageLayerGPU sender, NXImageViewDrawArgs DrawArgs)
{
if (mousePosition == null) return false;
XGraphics g = DrawArgs.Graphics;
XVertex3d newPos = DrawArgs.Vertex3d(mousePosition.ToXVertex3d(0.0));
double off = DrawArgs.PixelSize * 10;
g.glDisable(XGraphics.GL_DEPTH_TEST);
g.glDisable(XGraphics.GL_TEXTURE_2D);
g.glColor(Color.LightBlue);
g.glColor3d(1.0, 0.0, 1.0);
g.glLineWidth(3);
g.glBegin(XGraphics.GL_LINES);
g.glVertex3d(newPos.x - off, newPos.y, newPos.z);
g.glVertex3d(newPos.x + off, newPos.y, newPos.z);
g.glVertex3d(newPos.x, newPos.y - off, newPos.z);
g.glVertex3d(newPos.x, newPos.y + off, newPos.z);
g.xglVertex3d(mousePosition.x - off, mousePosition.y, 0.0);
g.xglVertex3d(mousePosition.x + off, mousePosition.y, 0.0);
g.xglVertex3d(mousePosition.x, mousePosition.y - off, 0.0);
g.xglVertex3d(mousePosition.x, mousePosition.y + off, 0.0);
g.glEnd();
return false;
}
See Also