... put images on the faces of the cube.The next step is to
The next step is to
or, better, to allow the user-developer to put a B4XView (so not necessarily an ImageView) on any face of the cube.... put images on the faces of the cube.
Some months ago I spent some time with something that was for a different purpose, but based on a similar concept.I'm thinking to an AMAZING "cube of settings", where each face is used to set a category of properties
public Sub AddPoint(X As Int, Y As Int)
Dim NewPoint As T_Point
NewPoint.Initialize
NewPoint.X=X
NewPoint.y=Y
NewPoint.Angle=ATan2D(Y,X)
NewPoint.Radius=Sqrt(Power(Y,2)+Power(X,2))
End Sub
Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("Layout1")
Panel = xui.CreatePanel("")
Activity.Addview(Panel,40dip,40dip,100%x-40dip,100%y-80dip)
Lines.Initialize
' CUBE
Lines.AddRec(-50,-50,50,50,50,50,MyColor2)'
Lines.AddRec(-50,-50,-50,50,50,-50,MyColor2)
Lines.AddLine(-50,-50,50,-50,-50,-50,MyColor3)
Lines.AddLine(50,-50,50,50,-50,-50,MyColor3)
Lines.AddLine(50,50,50,50,50,-50,MyColor3)
Lines.AddLine(-50,50,50,-50,50,-50,MyColor3)
' SPHERA
Lines.AddCircleZ(0,0,0,80,MyColor)
Lines.AddCircley(0,0,0,80,MyColor2)
Lines.AddCirclex(0,0,0,80,MyColor3)
' DRaw
Lines.RenderImage(Panel,2dip)
End Sub
Sub SeekBar_ValueChanged (Value As Int, UserChanged As Boolean)
' Rotate
Lines.RotateY(SeekBarY.Value).RotateZ(SeekBarZ.Value).RotateX(SeekBarX.Value).RenderImage(Panel,2dip)
LabelC.Text=$"X:${SeekBarX.Value} Y:${SeekBarY.Value} Z:${SeekBarZ.Value}"$
End Sub
Thank you, surely I would appreciate your comments to improve this work, I saw some of your works you posted and are truly exceptional.Some months ago I spent some time with something that was for a different purpose, but based on a similar concept.
Plan to be into it again soon, I think it is a really interesting challenge
Lines.Initialize
Lines.AddPolygon(1,-50,-50,50,C).AddPolygon(1,50,-50,50,C).AddPolygon(1,50,50,50,C).AddPolygon(1,-50,50,50,C)
Lines.AddPolygon(2,-50,-50,50,C).AddPolygon(2,-50,50,50,C).AddPolygon(2,-50,50,-50,C).AddPolygon(2,-50,-50,-50,C)
Lines.AddPolygon(3,-50,-50,-50,C).AddPolygon(3,50,-50,-50,C).AddPolygon(3,50,50,-50,C).AddPolygon(3,-50,50,-50,C)
Lines.AddPolygon(4,50,-50,50,C).AddPolygon(4,50,50,50,C).AddPolygon(4,50,50,-50,C).AddPolygon(4,50,-50,-50,C)
Lines.RenderToView(Panel,2dip)
Lines.AddPolygon(1,-60,-30,50,xui.Color_White).AddPolygon(1,0,-60,50,xui.Color_White).AddPolygon(1,60,-30,50,xui.Color_White).AddPolygon(1,40,50,50,xui.Color_White).AddPolygon(1,-40,50,50,xui.Color_White)
Sub SpinnerEffect_ItemClick (Position As Int, Value As Object)
Select Position
Case 0 ' effect 1
For i=0 To 360 Step 10
' Rotate All face/object
Poligon3D.RotateY(i).Rotatex(45).RenderToView(Panel,2dip)
Sleep(0)
Next
Case 1 ' effect 2
For i=0 To 90 Step 15
' Rotate single face/object from ID
Poligon3D.RotateObjX(Array As Int(10,11,12,13,14,15,16,17,18),i).RotateY(SeekBarY.Value).RotateZ(SeekBarZ.Value).RotateX(SeekBarX.Value).RenderToView(Panel,2dip)
Sleep(50)
Next
Case 2 ' effect 3
For i=0 To 90 Step 15
' Rotate single face/object from ID
Poligon3D.RotateObjy(Array As Int(2,5,8,11,14,17,20,23,26,29,32,35),i).RotateY(SeekBarY.Value).RotateZ(SeekBarZ.Value).RotateX(SeekBarX.Value).RenderToView(Panel,2dip)
Sleep(40)
Next
End Select
End Sub
It looks very impressive. I'm familiar with your feeling. I think that the best way to continue is to make a short tutorial or a post in the libraries forum and make it very simple to use it. If it will be simple to start with then developers will most probably use it.A question also arises, but does it interest anyone?
You do not ask me questions ... maybe you get bored ...
Thanks Erel for your intervention.It looks very impressive. I'm familiar with your feeling. I think that the best way to continue is to make a short tutorial or a post in the libraries forum and make it very simple to use it. If it will be simple to start with then developers will most probably use it.
Sure!!A question also arises, but does it interest anyone?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?