Planet 3D (Alias GL Earth)

Planet 3D (Alias GL Earth)


Sample Image - planet3d.jpg

Introduction

The project exclusively uses the features found in VISUAL C# 2005 Express Edition.

Planet 3D is a companion to my Panorama contribution, that has already been posted there.

The demo is provided with several textures to create the stellar background and each of the planets.

Note: In order to keep the size of the ZIP file small, the provided textures are in low resolution mode (I have larger resolution that I can send on demand).

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 the skinned button and the dedicated trackbar.

Smooth zooming is used to enlarge or reduce the size of the planet while the stellar background is left 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 states: 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 over 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 in the "C# corner" section.

History

  • 13th November, 2006: Initial post

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

zapsolution



Occupation:Software Developer
Company:zapsolution
Location:France France
Copyright :http://www.codeproject.com/KB/cs/planet3d.aspx
->Read More...

2 Comments:

Blog27999 said...

Did you realize there's a 12 word phrase you can say to your crush... that will trigger intense emotions of love and instinctual appeal for you buried within his heart?

That's because hidden in these 12 words is a "secret signal" that triggers a man's impulse to love, worship and care for you with his entire heart...

12 Words Will Fuel A Man's Love Response

This impulse is so hardwired into a man's genetics that it will make him try better than before to to be the best lover he can be.

In fact, fueling this mighty impulse is absolutely essential to having the best possible relationship with your man that the moment you send your man a "Secret Signal"...

...You will instantly find him expose his heart and soul to you in such a way he haven't experienced before and he'll perceive you as the one and only woman in the galaxy who has ever truly fascinated him.

Blogger said...

Your Affiliate Money Making Machine is ready -

And getting it running is as simple as 1, 2, 3!

It's super easy how it works...

STEP 1. Input into the system which affiliate products the system will promote
STEP 2. Add some PUSH button traffic (this ONLY takes 2 minutes)
STEP 3. Watch the system explode your list and sell your affiliate products on it's own!

Do you want to start making profits??

Click here to activate the system

Đăng nhận xét