3D Graphics Example / Ranger3D (VB6)

screen-shot

What does the code do? This demo supports:

  • loading 3dstudio ase files
  • rotate the objects
  • sort polygons (in z order)
  • draw textured polygons (24 bit color)
  • 3d rendering with environment mapping

How do I integrate it with my existing code or how do I use it?


to run this sample:
open "RUNME!!!.vbg"
compile and run =)

project1 is a sample projet that uses the 3dfunctions in project2. Any user could just make a reference to project 2 and add the nessesary api calls to ther project (the api calls needed is in project1.module1) there is comments in project1.form1 how to get your graphic into the arrays you need to use.

How to use:

declare the api calls needed to get and set bitmap data.
(this is done in project1.module1.general_declarations)
get the texture bitmap data into your texture array
(this is done with the getdibits api... comments are in project1.form1_formload)
set the size of the backbuffer
create an object of the type "vector"
use .loadfile to load a "ase" file and pass a zoom factor
use .rotate to rotate the object x,y,z radians
use .draw to draw the object to a long/rgbquad array containing the backbuffer data
set the backbufferdata to the picturebox that is to display the result
(this is done with the setdibits api... comments are in project1.form1_formload)

Methods of the vector class:

  • LoadFile
    takes 2 params . filename (to a ase file) and zoom_factor

  • draw
    takes 2 params . texture,canvas (both are long/rgbquad arrays)
  • rotate
    takes 3 params . x,y,z rotation of the object

Download zipped project files (212 Kb!)



Comments

  • heh

    Posted by Legacy on 12/29/2003 12:00am

    Originally posted by: Rayon

    good code except it doesnt snap to resolution

    Reply
  • The Best

    Posted by Legacy on 06/26/2003 12:00am

    Originally posted by: Sanjay

    This is the best try. I liked very much

    Reply
  • Good

    Posted by Legacy on 04/01/2003 12:00am

    Originally posted by: Deepak Jain

    hello
    
    your's work is good
    but u need some thing more
    you should modify your website
    graphics like font color, font
    size etc
    and improve yours coding

    Reply
  • abc

    Posted by Legacy on 07/19/2002 12:00am

    Originally posted by: Nandprakash S.Dusane

    ho very good ,very nice

    Reply
  • NICE WORK!

    Posted by Legacy on 06/07/2002 12:00am

    Originally posted by: Jerry Chen

    i like your engine!~

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Confused by all the agile advice? Relax! With the Agile for Dummies eBook by your side you'll learn the fundamentals of agile and how to increase the productivity of your software teams while enabling them to produce higher-quality solutions that better fulfill customer needs much faster.

  • Live Event Date: April 22, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Database professionals — whether developers or DBAs — can often save valuable time by learning to get the most from their new or existing productivity tools. Whether you're responsible for managing database projects, performing database health checks and reporting, analyzing code, or measuring software engineering metrics, it's likely you're not taking advantage of some of the lesser-known features of Toad from Dell. Attend this live …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds