Tag Info

New answers tagged

0

Not everything is top-left. OpenGL, for example, specifies that the origin is at bottom-left, and this is pervasive throughout the API: texture coordinates, viewports, texel rectangles, the standard ortho projection: it's bottom-left all the way. There is a difference in thinking here. On computer screens, as with books, when people read (and I'm assuming ...


3

I'm not entirely sure I understand the question but, given a 3D point cloud with a 2D "shape" (like a disc) the problem is simply one of dimension reduction. The algorithm you're looking for is called "Principal Component Analysis". How it works is not trivial, so I'll leave that for you to research if you're not already familiar with PCA. What it will give ...


1

This is a great question that I've thought of many times. The simple answer to "why" is because TV formats also drew their lines from left-to-right then top-to-bottom. Original computer monitors were CRT screens (small TVs), so the format naturally stayed the same. When monitors became flat screens (and TVs became flat screens too), it was equally natural to ...


0

Because screens start rendering the image from top left corner. It would be easier to co-relate the rendering or drawing of co-ordinate axis when (0,0,0) is at the top left corner with + Y-axis going into the screen.


25

This is caused in the history. Early computers had Cathode Ray Tubes (CRTs) which "draw" the image with a cathode ray from the upper left corner to the lower right. To ease the interface between the graphics card memory and the CRT the memory was read from the beginning and the image was drawn from the top left (with the lowest memory address) to the lower ...


0

If i understand this correctly then you take some data and then as part of the rendering process you distort the postition of that data ... this.camera=new OrthographicCamera(); this.camera.translate(map.getMapPixelWidth()/2, map.getMapPixelHeight()/2); this.camera.update(); view=new StretchViewport(map.getMapPixelWidth(),map.getMapPixelHeight(), camera); ...


3

These are (simplified version of) the formulas I use in my current project wizardwar.com: tile_x = screen_y - 0.5 + screen_x; tile_y = (screen_y - 0.5 - screen_x) * -1; By the way: I would recommend you to use different terminology for screen-coordinates and world-coordinates to avoid mixups. I use x and y for screen coordinates and left-down and ...


0

The SpriteBatch has its own internal camera. Are you also setting the batcher to use the camera's combined projection matrix by calling: batchM.setProjectionMatrix(camera.combined); The problems you could be experiencing, could perhaps be explained by the fact that collisions only appear to be happening on screen, but actually aren't as the map ...



Top 50 recent answers are included