'Declare our
billboard tree class
Dim
TREES As
cNemo_Billboards
Set TREES
= New cNemo_Billboards
TREES.Add_Texture App.Path + "\Trees\tree1.bmp"
TREES.Add_Texture App.Path + "\Trees\tree2.bmp"
'index 1
TREES.Add_Texture App.Path + "\Trees\tree3.bmp"
'index 2
TREES.Add_Texture App.Path + "\Trees\Tree4.JPG"
'index 3
'for Adding billboards we use function :
TREES.Add_BillBoard
Sub Add_BillBoard(vPos As
D3DVECTOR, width As
Single, height As
Single, TextureID_InClass As
Long, [Orientation As
NEMO_BILBOARD_ORIENTATION], [Color As
Long = -1])
Vpos= Position for our Billboard
center
Width= the width of the billboard
Height= the height of the billboard
TextureID_InClass=Texture Index for billboard
Orientation =the alignement of
billboard
'0 for
NEMO_BUILBOARD_SPHERICAL
'1 for NEMO_BUILBOARD_CILYNDRICAL
'2 for NEMO_BUILBOARD_4D
Dim
Rand As
Single
For I = 1
To 200
Rand = Rnd
If
Rand >= 0.8 Then _
TREES.Add_BillBoard Vector((Rnd
- Rnd) * 1500 + 800, 40, (Rnd - Rnd) * 1500 + 800), 120 + 15
* Rnd, 200 + 20 * Rnd, Int(Rnd * 2) + 1, NEMO_BUILBOARD_SPHERICAL
If
Rand < 0.8 And Rand > 0.5
Then _
TREES.Add_BillBoard Vector((Rnd
- Rnd) * 1500 + 800, 10, (Rnd - Rnd) * 1500 + 800), 120 + 15 * Rnd,
200 + 20 * Rnd, Int(Rnd * 2) + 1, NEMO_BUILBOARD_CILYNDRICAL
If
Rnd <= 0.5 Then _
TREES.Add_BillBoard Vector((Rnd
- Rnd) * 1500 + 800, 40, (Rnd - Rnd) * 1500 + 800), 120 + 15 * Rnd +
15, 200 + 20 * Rnd, Int(Rnd * 2) + 1, NEMO_BUILBOARD_4D
Next I
|