Real Software Forums
http://forums.realsoftware.com/

Display the objects in Rb3DSpace
http://forums.realsoftware.com/viewtopic.php?f=4&t=30228
Page 1 of 1

Author:  serd83 [ Tue Sep 29, 2009 3:35 am ]
Post subject:  Display the objects in Rb3DSpace

I have not much experience with 3D programing or the Rb3DSpace.
Therefore a question. How I can display the objects which I append to Rb3DSpace.Objects?
I simple use this for add the objects:
object1 = new object3d
object2 = new object3d
rb3dspace.objects.append object1
rb3dspace.objects.append object2

In the timer I want display the object1 and object2 in a sequence. But Rb3DSpace should display either object1 or object2.
Pseudocode in the timer:
select case counter
case 0
rb3dspace.display(object1)
counter = 1
case 1
rb3dspace.display(object2)
counter = 0
end select

Author:  jquan [ Tue Sep 29, 2009 2:46 pm ]
Post subject:  Re: Display the objects in Rb3DSpace

Based on your pseudocode, try the .Visible property:
select case counter
case 0
object1.Visible = True
object2.Visible = False
counter = 1
case 1
object1.Visible = False
object2.Visible = True
counter = 0
end select


A more elegant method is to load up a single Object3D with both object1 and object2:
Dim obj As Object3D
obj.AddShapeFromFile( object1 folderitem )
obj.AddShapeFromFile( object2 folderitem )

Now you can use the .Shape property to flip between the two:
select case counter
case 0
obj.Shape = 0 // shapes are zero-based
counter = 1
case 1
obj.Shape = 1
counter = 0
end select

Author:  serd83 [ Tue Sep 29, 2009 4:21 pm ]
Post subject:  Re: Display the objects in Rb3DSpace

I think the second code you write is much better to handle for what I will do later and therefore was exactly what I have in mind.
Work's great. Thank you Jeff.

Page 1 of 1 All times are UTC - 5 hours
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
http://www.phpbb.com/