当前注册人数422581人 邮箱: 密码: 注册新用户 忘记密码
首页 C/C++/MFC C# ASP.NET VB.NET MATLAB Android   站内搜索 下载代码说明/积分规则
为什么要注册?

1. 可以直接免费从本站下载代码,防止邮件发送不到您的邮箱,或登录不了国外网站

2. 可以设定关键字,当有您关心的代码收录时,邮件通知您

3. 对这里的代码进行评分和评论

4. 可以和大家一起分享你的源代码,得到更多的建议

Arcball OpenGL in C#

C#实现三维导航球(Arcball)OpenGL源代码

2007年12月27日
C# (C# 1.0, C# 2.0, C# 3.0), C#, Windows, .NET, Win32, OpenGL
本程序在C#中用OpenGL实现Arcball(也叫RollerBall),准确的说是用CsGL实现的,它的原理是围着对象创建一个球,然后让用户选择球面上的一点,拖动它到一个不同的位置。
相关知识
#region CsGL - Plot Here
        public void PlotGL()
        {
            try
            {
                lock (matrixLock)
                {
                    ThisRot.get_Renamed(matrix);
                }
                GL.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); // Clear screen and DepthBuffer
                GL.glLoadIdentity();
                GL.glPushMatrix();                  // NEW: Prepare Dynamic Transform
                GL.glMultMatrixf(matrix);           // NEW: Apply Dynamic Transform

                GL.glPolygonMode(GL.GL_FRONT_AND_BACK, GL.GL_LINE);

                #region plot something
                GL.glColor3f(0.8f, 0.3f, 0.1f);
                this.torus(0.3f, 0.5f);
                #endregion plot something

                GL.glPopMatrix(); // NEW: Unapply Dynamic Transform
                GL.glFlush();     // Flush the GL Rendering Pipeline

                this.Invalidate();
            }
            catch
            {
                return;
            }

        }
源代码原文下载:
Arcball OpenGL in C# Arcball Module using CsGL in C#. Arcball (also know as RollerBall) is probably the most intuitive method to view three dimensional objects. The principle of the arcball is based on creating a sphere around the object, and let users to click a point on the sphere and drag it to a different location. There is a bit of math involved of course and you can Google it. The code here is a C# source code implementing an arcball in OpenGL (CsGL to be exact).

源码图片

点击链接查看大图
从本站下载附件及源代码(1个附件,已经成功下载1728次)

最值得关注的外文源代码

Motion Detection Algorithms
3D OpenGL Billard Simulator
Creating a 3D book-shaped application with speech and ink using WPF 3.5
BRL-CAD
评论(评论是增加积分的一个有效途径)
字数在300字内
请如实评论
本源代码共评论251次,此处显示最近20次评论! 查看所有评论

freefly  2017年08月14日
谢谢分享
yy  2017年05月30日
谢谢分享。
943379534@qq.com  2016年07月21日
感觉挺不错的
rocky  2015年08月14日
调试不通过,哎
pain  2015年04月07日
很好非常谢谢
lsvs2010  2014年11月25日
没积分了!!!
bj_laofu  2014年11月23日
需要这个东西
rocky  2014年11月03日
运行出来出错啊
joyluckboy  2014年08月17日
高手之作,大家一定要学习其中的NET应用知识,提升自己
lyt696  2014年07月09日
挺好的,谢谢分享。
AITRY  2014年05月01日
不管怎样我要顶!
AITRY  2014年05月01日
楼主不错!
fatty  2013年11月01日
很好非常谢谢
vstion  2013年09月17日
非常不错
不死鸟  2013年09月13日
非常不错,楼主辛苦.
aspx毕业设计  2013年07月03日
求分享 1101350716@qq.com
梦寒  2013年06月01日
还不错啊,学习学习
fanf  2013年05月04日
谢谢楼主,需要,下来学习。。。
jiefangcheng  2013年04月28日
不能下载啊,哥们给我发一个啊,wc_xie@163.com谢谢了
jiefangcheng  2013年04月28日
不能下载啊,哥们给我发一个啊,wc_xie@163.com谢谢了
字数在300字内
请如实评论
200万国内源码搜索
CopyRight (C) codesoso.com 2007-2009 All Rights Reserved zhihuishi   免责声明