These are chat archives for highfidelity/hifi

1st
Oct 2014
David Rowe
@ctrlaltdavid
Oct 01 2014 20:35
Hi ... At present, there's no means for a script to draw 3D graphical entities such as balls and lines, is there? For example, draw two balls at specified world coordinates and draw a 3D line that connects them?
whatSocks
@whatSocks
Oct 01 2014 20:36
as opposed to making two spherical entities at some two locations then a very skinny Box entity to connect them?
David Rowe
@ctrlaltdavid
Oct 01 2014 20:38
Thanks, that could be one way. though I was thinking more of visible to the user only (rather than having the spheres and lines drawn by everyone in the vicinity).
David Rowe
@ctrlaltdavid
Oct 01 2014 20:45
Just noticed that overlays include things like a "line3d" ... looks promising.
Brad Hefta-Gaub
@ZappoMan
Oct 01 2014 21:31
@ctrlaltdavid - also coming soon: circle3d and rectangle3d which are planar but in the 3d space… so you can build things like discs, arcs, elipses as overlays
Nandita D
@bubble8773
Oct 01 2014 21:32
:+1:
Brad Hefta-Gaub
@ZappoMan
Oct 01 2014 21:32
I’m also tweaking cube and sphere so they can be stretched in different dimensions if you need that… (I did, so I made them work)
and I’ve added dashed line support to a couple of these primitives
@ctrlaltdavid - to clarify the differences between Overlays and Entities… Entities are in world objects that once added and manipulated EVERYONE in the domain sees…. Overlays are only visible on the client that they are added to.
Overlays are intended for client side UI/UX components
Entities are objects in the world
so… it sounds like you are indeed looking for Overlays @ctrlaltdavid - and there are several available to you: 2D support for text, images; 3D support for cubes, spheres, lines, models, billboards (images on a plane in 3d space); and as I mentioned coming soon planar/3d circles and rectangles...
David Rowe
@ctrlaltdavid
Oct 01 2014 22:21
@ZappoMan Thanks very much! Overlays sound perfect for my needs, esp. with circle3d addition.
Philip Rosedale
@PhilipRosedale
Oct 01 2014 22:23
@ctrlaltdavid You make a great point about needing better overlays to draw leap hands... but I was thinking we want to do that drawing in the C++ code.
So I was thinking just to modify the existing rendering we do for the hydra to do the leap.
because that's a lot to ask of javscript code... to render all that stuff in-world. @ZappoMan may have a perspective on this too tho. I was just thinking that the 'show me EXACTLY where my controller says it is' is something we'd do in C++.
David Rowe
@ctrlaltdavid
Oct 01 2014 22:33
@PhilipRosedale Rendering in C++ was my first thought too, but unlike the Hydras the Leap data is relative only to the Leap (it's not calibrated to the avatar in C++). ... For Interface to draw the Leap data would require it to draw based on the hand positions, and only draw if the hand positions are being set by a script using data derived from the Leap ... seems a bit cumbersome.
Maybe could give the JavaScript route a try and see how it goes; is much more straightforward.
Philip Rosedale
@PhilipRosedale
Oct 01 2014 22:34
Hmmm.... but don't we need to have a flag that says "my leap is attached to my head" in preferences?
David Rowe
@ctrlaltdavid
Oct 01 2014 22:37
Can draw Leap hand data for both Leap-on-desk and Leap-on-Rift. And even if the Leap is connected one might not be using it; could be using the Hydras instead for example.
Brad Hefta-Gaub
@ZappoMan
Oct 01 2014 23:24
FWIW - @ctrlaltdavid & @PhilipRosedale - I don’t see why c++ would be any better or more accurate than the JS in this case… the JS is updating overlays that are actually drawn by C++ code...