Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

26. May 2012, 11:18:13 pm
Xith3D CommunityGeneral CategoryNews (Moderators: Marvin Fröhlich, 'n ddrylliog)Shapes and Billboards
Pages: [1]
Print
Author Topic: Shapes and Billboards  (Read 1247 times)
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4381


May the 4th, be with you...


View Profile
« on: 28. December 2006, 05:18:30 am »

If you are currently using org.xith3d.geometry.Quad, please switch to the new class org.xith3d.geometry.Rectangle.
Reasons:
  • Quad was forced to be rectangular, which was not supported by the name. Now it is not necessarily rectangular.
  • Quad had a default z-translation of -2.5 Huh Don't know why, but now it is 0.0.
  • Quad was exactly twice as wide and high as told by parameters. Now this is fixed.
There are completely new constructors, but the old ones are still there, but deprecated and with the calculation bugs, etc. to maintain full backwards compatiblity.


After the Billboard class was not very useful, since its center-point was in the bottom-center Huh and it was a Geometry, it was necessary to change that to make it useful.

So I made Billboard an interface to be implemented by Shape3D extensions.

Unfortunately I wasn't able to maintain backwards-compatiblity without bloating the renderer.

In the toolkit in org.xith3d.geometry there are two implementations:
  • RectBillboard
    Which is a simple Rectangle extension, which implements Billboard.
  • TextBillboard
    Which is a simple TextRectangle extension, which implements Billboard.
TextRectangle is a Rectangle with a (multiline by '\n') text rendered on it.

Rectangle extends Quad, TextRectangle and RectBillboard extend Rectangle, TextBillboard extends TextRectanble.

There's an example for the Billbard usage in org.xith3d.test.render.BillbardTest.

Enjoy Smiley

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic