Xtreme Visual Basic Talk

Xtreme Visual Basic Talk (http://www.xtremevbtalk.com/)
-   .NET Game Programming (http://www.xtremevbtalk.com/-net-game-programming/)
-   -   GDIPLUS: how draw a rectangle using X,Y and Z coordenates? (http://www.xtremevbtalk.com/-net-game-programming/328649-gdiplus-draw-rectangle-using-coordenates.html)

Cambalinho_83 06-04-2017 01:38 PM

GDIPLUS: how draw a rectangle using X,Y and Z coordenates?
using GDIPLUS, how we can draw a rectangle using X,Y and Z coordenates?

passel 06-05-2017 03:02 PM

1 Attachment(s)
You can't directly. GDI+ doesn't support 3D drawing for the most part.
You would have to convert the 3D coordinates into a 2D representation of the 3D coordinates, and then draw using those 2D coordinates.

For example, I did some primitive 3D drawing in QBasic and early Visual Basic.
An example of a VB6 project testing out some basic concept of drawing 3d rectangles (as the faces of 3D blocks) can be found here, post #2.
That was back in 2005.

Some years later I got started with VB.Net.
Around 2013 I decided to drop that VB6 code into a VB 2010 project and change it to use the VB.Net provided GDI+ wrapped methods instead of the GDI API used in the VB6 code just to see how it would perform.
I wouldn't say that it is good .Net code since it is really old legacy VB code minimally modified, and is only test code at that, not production code.

In the .Net version, the A and Z keys still tilt the view, but now the I,J,K,L keys are used to move through and rotate the view.
I don't know it the code will help you understand the use of the Z coordinate any better, but something to look at and play with may be better than nothing.

You could also look at this thread which is a long exploration of the 3D drawing with GDI+ topic.

All times are GMT -6. The time now is 07:50 AM.

Powered by vBulletin® Version 3.8.9
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Search Engine Optimisation provided by DragonByte SEO v2.0.15 (Lite) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
All site content is protected by the Digital Millenium Act of 1998. Copyright©2001-2011 MAS Media Inc. and Extreme Visual Basic Forum. All rights reserved.
You may not copy or reproduce any portion of this site without written consent.