Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/opengl/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
C# 我有一个Ax乘以Cz的平面方程,d=0。现在我想用鼠标点在那个平面上画。_C#_Opengl - Fatal编程技术网

C# 我有一个Ax乘以Cz的平面方程,d=0。现在我想用鼠标点在那个平面上画。

C# 我有一个Ax乘以Cz的平面方程,d=0。现在我想用鼠标点在那个平面上画。,c#,opengl,C#,Opengl,我有一个平面方程,形式是Ax+By+Cz d=0。我能在那架飞机上画一个四边形。现在我想用鼠标点在那个平面上画。为此,我试图从鼠标点得到平面上的一个点。为此,我制作了一条从相机到经过鼠标点的平面的光线。但当我试图渲染时,它并没有定位在正确的位置上 我通过以下方式绘制四边形: OpenGL.glPushMatrix() 为什么要使用免费的水平空格?我不明白你说的免费的水平空格是什么意思?你能具体说明一下吗?你把所有的东西都缩进了12个空格,没有明显的原因。如果问题不清楚,那么我应该重申一下吗?

我有一个平面方程,形式是Ax+By+Cz d=0。我能在那架飞机上画一个四边形。现在我想用鼠标点在那个平面上画。为此,我试图从鼠标点得到平面上的一个点。为此,我制作了一条从相机到经过鼠标点的平面的光线。但当我试图渲染时,它并没有定位在正确的位置上

我通过以下方式绘制四边形: OpenGL.glPushMatrix()


为什么要使用免费的水平空格?我不明白你说的免费的水平空格是什么意思?你能具体说明一下吗?你把所有的东西都缩进了12个空格,没有明显的原因。如果问题不清楚,那么我应该重申一下吗?
            OpenGL.glMultMatrix(mTransform);

            OpenGL.glColor(Color.FromArgb(60, Color.BlanchedAlmond));

            OpenGL.glPushMatrix();
            Matrix4 transform = Matrix4.Identity;
            Quaternion planeRotation = Vector3.ZAxis.GetRotationTo(mMarkUpPlane.Normal);
            Vector3 planeOrigin = mMarkUpPlane.Normal * -mMarkUpPlane.D;

            transform.Matrix3 = planeRotation.GetRotationMatrix();
            transform.Translation = planeOrigin;
            OpenGL.glMultMatrix(transform);

            const double PlaneWidth = 1500;

            OpenGL.glBegin(OpenGL.GL_QUADS);

            OpenGL.glVertex3d(PlaneWidth, PlaneWidth, 0.0);
            OpenGL.glVertex3d(PlaneWidth, -PlaneWidth, 0.0);
            OpenGL.glVertex3d(-PlaneWidth, -PlaneWidth, 0.0);
            OpenGL.glVertex3d(-PlaneWidth, PlaneWidth, 0.0);

            OpenGL.glEnd();
            OpenGL.glPopMatrix();
            OpenGL.glPopMatrix();