I think that would cause the ends of the V not to join up with the oval. We might have to break out the trig on this one.another_commander wrote:@phkb: I am at work and can't test, but I am almost convinced that the solution here is to adjust the drawing of the V so that its x-axis coordinates (or y-axis if viewing port/starboard) get multiplied by the FOV fraction representation.
Can you please try this? Inside HeadUpDisplay.m, find the drawScannerGrid function. At the top there are these two lines:Change them toCode: Select all
GLfloat w2 = 0.250 * siz.width; GLfloat h2 = 0.250 * siz.height;
Does this fix it for you? If yes, we can push it to trunk.Code: Select all
GLfloat w2 = [[UNIVERSE gameView] fov:YES] * siz.width / 2.0; GLfloat h2 = [[UNIVERSE gameView] fov:YES] * siz.height / 2.0;
Field of view and the scanner "V"
Moderators: winston, another_commander
Re: Field of view and the scanner "V"
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Field of view and the scanner "V"
Correct, but the ends don't join up in the standard 57 degrees either. I don't think it's such a big deal to require trigonometry intervention, but wouldn't mind it seeing with V-ends joining nicely either.kanthoney wrote:I think that would cause the ends of the V not to join up with the oval. We might have to break out the trig on this one.
Re: Field of view and the scanner "V"
Is the oval a mathematical ellipse, or just a scaled circle ?
Re: Field of view and the scanner "V"
Sorted in commit 1989319.
- Disembodied
- Jedi Spam Assassin
- Posts: 6885
- Joined: Thu Jul 12, 2007 10:54 pm
- Location: Carter's Snort
Re: Field of view and the scanner "V"
This is pretty amazing, really: something has been queried, misunderstood, carefully explained to the hard of thinking, considered by more agile minds, discussed, and sorted, all within 48 hours.
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: Field of view and the scanner "V"
Nice, but not quite there yet. It malfunctions for aspect ratios less than 4:3. I sketched up this during lunch break (but it doesn't try to make the V fit nicely on the oval):kanthoney wrote:Sorted in commit 1989319.
Code: Select all
MyOpenGLView* gameView = [UNIVERSE gameView];
GLfloat aspect = [gameView viewSize].width / [gameView viewSize].height;
GLfloat fieldOfView = [gameView fov:YES];
GLfloat const criticalAspect = 4.0 / 3.0;
// make sure that the scanner "V" takes FOV into account
GLfloat w2 = fieldOfView / 2.0 * siz.width;
GLfloat h2 = fieldOfView / 2.0 * siz.height;
if (aspect < criticalAspect)
{
w2 *= aspect / criticalAspect;
h2 *= aspect / criticalAspect;
}
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Field of view and the scanner "V"
<chortles> Indeed we do!another_commander wrote:We value quick and effective customer service.
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
- Smivs
- Retired Assassin
- Posts: 8408
- Joined: Tue Feb 09, 2010 11:31 am
- Location: Lost in space
- Contact:
Re: Field of view and the scanner "V"
If only we had any quick and effective customers...
Commander Smivs, the friendliest Gourd this side of Riedquat.
- Cody
- Sharp Shooter Spam Assassin
- Posts: 16081
- Joined: Sat Jul 04, 2009 9:31 pm
- Location: The Lizard's Claw
- Contact:
Re: Field of view and the scanner "V"
<sniggers>
I would advise stilts for the quagmires, and camels for the snowy hills
And any survivors, their debts I will certainly pay. There's always a way!
And any survivors, their debts I will certainly pay. There's always a way!
Re: Field of view and the scanner "V"
I knew you'd find something wrong with it
I think we just need to multiply tanfov by 4/(3*aspect) if aspect < 4:3, but I'm back at work so can't test until later.
I think we just need to multiply tanfov by 4/(3*aspect) if aspect < 4:3, but I'm back at work so can't test until later.
- Diziet Sma
- ---- E L I T E ----
- Posts: 6312
- Joined: Mon Apr 06, 2009 12:20 pm
- Location: Aboard the Pitviper S.E. "Blackwidow"
Re: Field of view and the scanner "V"
The really funny thing is, this is such a typical event with Oolite that we sometimes almost take it for granted.Disembodied wrote:This is pretty amazing, really: something has been queried, misunderstood, carefully explained to the hard of thinking, considered by more agile minds, discussed, and sorted, all within 48 hours.
Most games have some sort of paddling-pool-and-water-wings beginning to ease you in: Oolite takes the rather more Darwinian approach of heaving you straight into the ocean, often with a brick or two in your pockets for luck. ~ Disembodied
- Disembodied
- Jedi Spam Assassin
- Posts: 6885
- Joined: Thu Jul 12, 2007 10:54 pm
- Location: Carter's Snort
Re: Field of view and the scanner "V"
Smivs wrote:If only we had any quick and effective customers...
Re: Field of view and the scanner "V"
New commit: bdfd8cd.
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
- phkb
- Impressively Grand Sub-Admiral
- Posts: 4830
- Joined: Tue Jan 21, 2014 10:37 pm
- Location: Writing more OXPs, because the world needs more OXPs.
Re: Field of view and the scanner "V"
Alright! That's amazing guys! Thanks for your persistence and dedication!
Edit: Not to mention awesome maths skillz!
Edit: Not to mention awesome maths skillz!