Scolring - Forum

Entraides et échanges autour de la technologie Scol - Informations and exchanges on the Scol technology

Vous pouvez changer la langue de l'interface une fois inscrit - You can change the language once registered

You are not logged in.

#1 14-Nov-2014 20:16:36

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

plugit for all thumbs navigation

colleagues:

pursuant to designing an app that can view os3d scenes and other 3d content with the vm on touch screens  i'm writing a plugit to handle navigation with bitmaps/widgets/images/whatever. the plugit will handle creating widgets over buffer or widgets in 2d gui apart from buffer. anyone will be welcome to add functionality, at first i will use predetermined sizes, bitmaps, and coordinates

here is my basic, ugly, plan in a picture:

basic nav picture it's ugly

any input welcome.

what i'm thinking is setting a callback for every frame. vm will determine where finger is (for the moment only one finger although arkeon is working very quickly on allowing more), then set speed and rotation accordingly to walkthrough navigation plugit. perhaps i will use _DRAWline to give user a realtime view of how fast he/she is turning or looking up and down.  an

a math questions:

to get distance from bitmap center, i figure it will be the square root of vertical distance from center squared + horizontal distance from center squared, i.e.

//psuedo code
let itof blah->  horizontal_distance_from_center in
let itof blahblah -> vertical_distance_from center in
let sqr. horizontal_distance_from_center + sqr. vertical_distance_from center -> radial_distance_squared in
let sqrt. radial_distance_squared -> radial_distance_from_center in
//more code

that's all i remember from my high school math (i got all the way to calculus and really enjoyed it, but alas i've forgotten almost everything)

is there a shorter way to get this quantity?

Offline

#2 14-Nov-2014 20:51:55

Bob Le Gob
Scol language & Scol applications developer
Registered: 9-Apr-2009
Posts: 26

Re: plugit for all thumbs navigation

No shorter way as you are using the proper math formula ...

Bob

Offline

#3 14-Nov-2014 20:56:41

hebdemnobad
Member
From: northamerica
Registered: 20-Apr-2011
Posts: 1,541
Website

Re: plugit for all thumbs navigation

Bob Le Gob wrote:

No shorter way as you are using the proper math formula ...

Bob

thx, at least i remember something....

Offline

Board footer

Powered by FluxBB