Results 1 to 7 of 7

Thread: Is it possible something similar in TBGL

  1. #1
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Is it possible something similar in TBGL

    http://www-03.ibm.com/innovation/us/index.shtml

    in the above page a flash animation is supposed to show something like pheres menues that expand into sub spheres menues if clicked or mouse over.
    All pheres are linked together.

    Is is possible a similar effect using TBGL? I suppose yes, but, as you know, I'm quite (read a lot ) bad in 3D so ...

    Thanks a lot
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  2. #2
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: Is it possible something similar in TBGL

    Hi Eros,

    sure
    Only trouble I can see is how to organize data in some structure to be able to visualise sphere and text web from that.
    Let me think about it

    Bye,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #3
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Is it possible something similar in TBGL

    Nothing urgent.
    Thanks
    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  4. #4
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Is it possible something similar in TBGL

    I have been looking and thinking about cool interfaces too Eros. I was playing with the MojoWorld Viewer and it has a very simple interface that has the ease of menus without the burden of menus if I can explain it that way.

    I love the idea of an object and then sub objects coming out.

    Give us UDT's in UDT's and we can do all sorts of cool things!!
    type tRGB
      r as long
      g as long
      b as long
    end type
    
    type tV3
      x as double
      y as double
      z as double
    end type
    
    type tObj
      p as tV3
      c as tRGB
    end type
    
    As you can see we can build quite elaborate setups that will be easier to work with

    Can we use UDT's in Linked Lists?

    One last request: Can you write a little example of a pointer to a function in a UDT and then how that could be used?
    Since the question is confusing let me try to write an example in pseudo code

    type tV3
    x as double
    y as double
    z as double
    end type

    type tObj
    px as double
    py as double
    pz as double
    m as pointer to the moveObj subroutine
    end type

    dim ob(100) as tObj
    dim mb as tV3

    assume here we set values to default locations for all o and also assigned values to m
    now we want to use the subroutine in o to update itself

    for x =1 to 100
    call this.m(ob(x),mb)
    next

    sub moveObj(o as tObj, moveby as tV3) as long
    o.px += moveby.x
    o.py += moveby.y
    o.pz += moveby.z
    end sub
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  5. #5
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: Is it possible something similar in TBGL

    Ken,

    sure is that thinBasic has not pointers to functions and have no real pointers with dereferencing abilities so far.

    Regarding UDTs they are structures but can also be considered as memory buffers so an UDT can be used in any place where a string is used even if not very efficient.
    For example
    [code=thinbasic]
    type tRGB
    r as long
    g as long
    b as long
    end type

    dim MyString as string
    dim MyRGB as tRGB

    '---Assign some values and show
    MyRGB.r = 255
    MyRGB.g = 0
    MyRGB.b = 255
    msgbox 0, "Color is: " & MyRGB.r & " " & MyRGB.g & " " & MyRGB.b

    '---Save UDT into a string buffer
    MyString = MyRGB

    '---Clean UDT
    MyRGB.r = 0
    MyRGB.g = 0
    MyRGB.b = 0
    msgbox 0, "Now Color is: " & MyRGB.r & " " & MyRGB.g & " " & MyRGB.b

    '---Get back UDT values directly from the saved buffer
    MyRGB = MyString
    msgbox 0, " Back to Color: " & MyRGB.r & " " & MyRGB.g & " " & MyRGB.b

    [/code]

    In any case, interesting questions but I need to check a bit of options ...
    I will give you back.

    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #6
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Is it possible something similar in TBGL

    Eros this is very interesting thanks.

    THen could we do this?

    [code=thinbasic]
    type tObject
    r as long
    g as long
    b as long
    x as double
    y as double
    z as double
    end type

    type tRGB
    r as long
    g as long
    b as long
    end type

    dim Red as string
    dim MyRGB as tRGB
    dim object as tObject

    '---Assign some values and show
    MyRGB.r = 255
    MyRGB.g = 0
    MyRGB.b = 0

    Red = MyRGB
    setColorObject(Red)

    sub setColorObject( Color as tRGB )
    object.r = color.r
    object.g = color.g
    object.b = color.b
    end sub
    [/code]

    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  7. #7
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: Is it possible something similar in TBGL

    I am excited that we can use UDT's in Linked Lists. Do we use them as UDT's or do we have to save them as a string? Thanks for the clarification.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

Similar Threads

  1. New forum option: Similar Threads
    By ErosOlmi in forum Web and Forum
    Replies: 7
    Last Post: 22-08-2011, 08:49
  2. New TBGL related article that r.o.c.k.s, on TBGL website!
    By Petr Schreiber in forum TBGL module by Petr Schreiber
    Replies: 6
    Last Post: 09-11-2007, 10:03

Members who have read this thread: 0

There are no members to list at the moment.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •