Click or drag to resize
XDL

XImageGraphicsxglVertex3d(XVertex3d) Method

3차원 정점을 설정한다. 설정한 정점에 대해 오프셋/크기조절이 적용된다.

Namespace: Pixoneer.NXDL.NXImage
Assembly: NXImage (in NXImage.dll) Version: 3.0.0.5
Syntax
C#
public override void xglVertex3d(
	XVertex3d v
)

Parameters

v  XVertex3d
정점.

Return Value

이 함수는 값을 반환하지 않는다.
Example
C#
private 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);

    // 1
    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);

    // 1번과 동일한 코드.
    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