/--- Vectrace.com ---\
Sites
Vectrace
Zingo.org
Products
Mercurial Eclipse
Earlier work
Amitello
Gnome2 for DE
AmigaAnywhere codebits
Test of AmigaSDK
Ginger
Vormel
Lib3d
AMesa

Lib3D

Copyright © 1998 VecTrace (Stefan Zivkovic)
Lib3d is a 3d library used for interfacing 3D hardware or native calls it is made for use in mine/your code and is written in C++ using the SAS compiler, BUT could easily be transfered to other compilers. Why use lib3D? you may ask, I made this bunch of classes to use in my project if you like them you are free to use them in yours also.

C++ classes

Its like a wraparound C++ class for 3D-graphics using virgin.library and the virge 3D chip. My intensions is to make this as fast as posible. So i hopes folks out there comes with ideas of improvements Currently Its basicly 3 C++ classes:
  • lib3d - The 3d library
  • Texture - a texture
  • DrawVector - a bunch of points and a bunch of info on how to draw triangles out of them
Using this classes means that you:
  • Don't have to setup anything else, they will open the virgin.library, open a screen and then setup the 3d extension for you.
  • Don't have to work with complex matrix operands just use Rotate(deg,axisx,axisy,axisZ) eg rotate(1.0,1.0,0.0,0.0) to rotate round x axis or Translate(deltaX,deltaY,delatZ) to move the objects and Scale(1.0,1.0.2.0) to double the Z size
My own plans is that this is the base class of the 3D engien that I will use in my projects. This means that If YOU make this faster and send me the code It will probobly be put in the next version of Vormel. My intesione with making it avalible is also that other may use it also.

Only Virgin?

Right now only virgin version exists, BUT I leve it free to anyone to make a nativ amiga version for CGX and/or AGA.

How simple is it to use?

Well what would be better than some code to shoe you. This code snipe is after everything is set up.
	while(TRUE)
		{
		MyLib3d->Rotate(3.0 ,1.0, 0.0, 0.0); // Rotate(deg,axisX,axisY,axisZ)
		MyLib3d->Clear();                    // clears screen and Zbuf
		MyLib3d->Triangle(DV);               // draws the DrawVector on the scene
		MyLib3d->SwapDrawBuffer();           // Switches the doublebuffer
		}
This code will rotate your object forever for more examples download the package.

History

  • 971019 First Beta All drawing Functions are C++ wrapped now.
  • 980120 Moved texture info from coordinates to the DrawVector
  • 980409 Moved from rtgmaster to virgin.library
  • 980410 Added Lightsources and lensflares
  • 980422 First Public version 1.02
  • 980531 First Public release

FAQ

  • Q: Will I nead the development package from phase5?
    A: Yes if you want to compile the Virgin stuff.
  • Q: When will next version be relesed ?
    A: When I please!
  • Q: If next version isn't compatible with this one why shouln't I wait for it to be ready befor starting to use this code ?
    A: No, the changes will probably be small and easy to modify, and by using this code you may get some nice ide that could be put in the next version
  • Q: Could this 3d engien be used in a game ?
    A: Yes if someone start making a game.
  • Q: When will a AmigaNative subclass be ready?
    A: As soon as someone starts making one, I will probably not make one or even if I does It would not be optimal.
  • Q: If I make a AmigaNative subclass and seend it to you will you include it?
    A: Yes.
  • Q: Why shouldn't I interface the subclasses directly.
    A: If you do then you will not so easy make other version if you only use the baseclasses you will probably only have to change ONE line in your code to make is Amiga Native or Picasso4-3D/CyberVisionPPC3D in the future.

Download

  • You neads the phase5 virgin dev package

    this is not publically avalible yet. If you are a Phase5 Gold/Silver developer you should be able to get it via Phase5.
  • Lib3D.lha version 1.02
  • You also neads the lates cgx3dvirgin.library and cgx stuff. Avalible www.vgr.com.

You can reach me at:
Stefan Zivkovic Andersen
Flygel v 178
224 72 Lund

<info@vectrace.com>