Français
--------
Planet3D est un projet écrit avec VISUAL C# 2005 Express Edition
Cette démo est basée sur OpenGL, vous devez avoir une carte graphique compatible.
Le contrôle affiche des planètes animées en 3D sur un arrière plan fixe avec éclairage d'ambiance pour renforcer l'impression de relief.
L'utilisation de coordonnées polaires permet de faire pivoter les planètes dans l'espace.
A noter que les textures sont créées à la volée et que vous pouvez les changer à volonté.
Outre MAIN_Form, le projet contient 4 classes spécifiques :
1 - OpenGL.cs (qui contient l'encapsulation de l'API OpenGL)
2 - Win32.cs (qui contient l'encapsulation de l'API bas niveau requise par le projet).
3 - GDImage.cs (qui contient l'encapsulation de l'API GDImage).
4 - SkinEngine.cs (qui contient les méthodes et les propriétés du Skin Engine, lequel est utilisé pour dessiner les différents boutons).
Note : Les textures du ciel et des planètes se trouvent dans le répertoire "\bin\debug" du projet,
ainsi que GDImage.dll qui est requis pour la création des textures utilisées par OpenGL.
En raison de la taille limitée des ZIP, j'ai été obligé de restreindre le nombre et la qualité des textures proposées.
_______________________________________________________________________________________________________
English
-------
Basename: planet3d
Article Title: Planet 3D (alias GL Earth)
Description: OpenGL moving planet
Keywords: OpenGL, 3D, Planet, User control.
Download source files - 996 Kb
Introduction
The project uses exclusively the features found in VISUAL C# 2005 Express Edition.
Planet 3D is a companion to my Panorama contribution, that has been already posted there.
The demo is provided with several textures to create the stellar background and each of the planet.
Note: In order to keep the size of the ZIP file small, the provided textures are in low resolution mode.
The control uses 3D polar coordinates, and either keyboard direction key or buttons to change the planet rotation angle.
You can also use the left mouse button while in the OpenGL control to rotate the planet.
Several classes and "user controls" help the creation of skinned button and dedicated trackbar.
Smooth zooming is used to enlarge or reduce the size of the planet while the stellar background leave unchanged.
Code insight:
- SkinEngine.cs
This class is responsible for the drawing of skinned form and custom controls.
- SkinButton.cs
User control to create skinned button using one single 5-image bitmap matching each of the button state: normal, down, disabled, focused, hover.
You can use either "standard" push button or shaped button with region.
- SkinTrackbar.cs
User control to create a mouse only skinned track bar.
The thumb tracker can have any size or shape based on a provided bitmap.
The control orientation is based on the ratio between width and height, if width is larger than height then horizontal else vertical.
To help the user to figure the moving of the thumb track, the control draws a layered triangle hover the background and uses a tooltip to show the current value.
You can inverse ranging swapping min/max values.
- OpenGL.cs
Encapsulation of the OpenGL API being used.
- Win32.cs
Encapsulation of the Win32 API being used.
- GDImage.cs
Encapsulation of the GDImage API being used.
GDImage is a prerequisite to create OpenGL font and convert image to GL texture on the fly.
Comment:
I hope you will like Planet 3D and perhaps learn a few things from it.
You will find more contributions on my web site www.zapsolution.com in the "C# corner" section.
没有合适的资源?快使用搜索试试~ 我知道了~
C#开发的3D虚拟地球(无资源分要求)
共42个文件
cs:14个
png:9个
jpg:5个
5星 · 超过95%的资源 需积分: 49 47 下载量 128 浏览量
2011-10-11
12:38:02
上传
评论
收藏 970KB ZIP 举报
温馨提示
C#开发的3D虚拟地球(无资源分要求)~~~~~~~~~~~~~~~~~~~~
资源推荐
资源详情
资源评论
收起资源包目录
C#开发的3D虚拟地球.zip (42个子文件)
Planet3D
SkinButton.cs 3KB
bin
Release
Debug
Planet3D.exe 128KB
Earth.jpg 166KB
Mars.jpg 145KB
Moon.jpg 202KB
StarsNight.jpg 156KB
gdimage.dll 67KB
Jupiter.jpg 73KB
Planet3D.csproj 5KB
Program.cs 3KB
OpenGL.cs 12KB
SkinEngine.cs 23KB
SkinTrackbar.Designer.cs 3KB
MAIN_Form.cs 22KB
SkinTrackbar.cs 12KB
Resources
Play.png 609B
BTN_Up.png 2KB
BTN_Right.png 2KB
BTN_Pause.png 2KB
BTN_Left.png 3KB
BTN_SelectFile.png 12KB
BTN_Thumb.bmp 1KB
BTN_Push.png 4KB
BTN_Reset.png 6KB
BTN_Down.png 2KB
Planet3D.ico 4KB
MAIN_Form.resx 35KB
MAIN_Form.Designer.cs 25KB
SkinTrackbar.resx 6KB
GDImage.cs 23KB
SkinButton.Designer.cs 3KB
Planet3D.ico 4KB
Win32.cs 16KB
Properties
Resources.resx 8KB
Settings.settings 249B
AssemblyInfo.cs 1KB
Settings.Designer.cs 1KB
Resources.Designer.cs 5KB
Planet3D.csproj.user 583B
Planet3D.suo 28KB
Planet3D.sln 913B
readme.txt 4KB
共 42 条
- 1
mickgrant
- 粉丝: 2
- 资源: 48
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页