Re: [Warzone-dev] [Warzone-commits] r1415 - in /trunk/src: display3d.c display3d.h

2007-05-30 Thread Dennis Schridde
Am Mittwoch, 30. Mai 2007 schrieb The Watermelon:
> On 5/29/07, Dennis Schridde <[EMAIL PROTECTED]> wrote:
> > Author: devurandom
> > Date: Wed May 30 04:44:38 2007
> > New Revision: 1415
> >
> > URL: http://svn.gna.org/viewcvs/warzone?rev=1415&view=rev
> > Log:
> > More verbose SVMESH members:
> > - s[xyz] -> screen, w[xyz] -> water
> > - Beware: Besides the name both are (probably) in screenspace coordinates
> > - .screen and .water only differ for water tiles and then only, because
> > those may have a different .y if they are "PushedDown"
> > - .water is only used in locateMouse()
> > - .screen.z is used for basic visbility testing in drawTiles()
> > - Besides that .screen is only used in locateMouse() and to outline tile
> > corners on keypress
> I think both are the offsets to the first 'visible' tile(top-left),so
> I changed them to vertexPos,waterPos respectively in my patch,because
> 'screen' is not very descriptive for offset values imo,but mine are not
> very descriptive either...
To me this looks as if both .water and .screen are calculated by 
projecting .xyz into screenspace using the psMatrix. That again would mean 
that .xyz are the coordinates in worldspace and .screen are the coordinates 
in screenspace.
That we need another set of coordinates (.water_height in worldspace 
and .water in screenspace) is related to the fact that watertiles are 
somehow "PushedDown". I didn't have a deep look at what that means, though.

Both (.screen/.water) are mostly only used for locating the mouse.
.screen.z is also used for basic visibility testing (sorting those tiles out 
which are behind the camera) and for depth ordering in the bucket.

This is why I choose the names this way, correct me if I am wrong.

--Dennis


signature.asc
Description: This is a digitally signed message part.
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev


Re: [Warzone-dev] [Warzone-commits] r1415 - in /trunk/src: display3d.c display3d.h

2007-05-29 Thread The Watermelon

On 5/29/07, Dennis Schridde <[EMAIL PROTECTED]> wrote:


Author: devurandom
Date: Wed May 30 04:44:38 2007
New Revision: 1415

URL: http://svn.gna.org/viewcvs/warzone?rev=1415&view=rev
Log:
More verbose SVMESH members:
- s[xyz] -> screen, w[xyz] -> water
- Beware: Besides the name both are (probably) in screenspace coordinates
- .screen and .water only differ for water tiles and then only, because
those may have a different .y if they are "PushedDown"
- .water is only used in locateMouse()
- .screen.z is used for basic visbility testing in drawTiles()
- Besides that .screen is only used in locateMouse() and to outline tile
corners on keypress

Modified:
   trunk/src/display3d.c
   trunk/src/display3d.h


___
Warzone-commits mailing list
[EMAIL PROTECTED]
https://mail.gna.org/listinfo/warzone-commits



I think both are the offsets to the first 'visible' tile(top-left),so
I changed them to vertexPos,waterPos respectively in my patch,because
'screen' is not very descriptive for offset values imo,but mine are not very
descriptive either...
___
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev