Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#493 closed task (fixed)

Add proper square intersection code

Reported by: Philip Taylor Owned by: Philip Taylor
Priority: Should Have Milestone: Pre-Alpha 2
Component: UI & Simulation Keywords: simple
Cc: Patch:

Description

CCmpObstructionManager deals with line/circle/square intersections, for use with pathfinding and building placement etc. Currently squares aren't implemented at all (it pretends they're circles) - they should be added.

"Squares" are non-axis-aligned rectangles, so I think it's just some slightly ugly but straightforward geometry. Everything needs to be done with fixed-point maths (to get reliably repeatable results), so care needs to be taken with overflow, which makes it a bit trickier.

There ought to be some test cases for the code (see e.g. test_Position.h for the general framework for testing simulation components).

Change History (3)

comment:1 by Philip Taylor, 14 years ago

Resolution: fixed
Status: newclosed

This is obsoleted and/or done by r7484.

comment:2 by (none), 14 years ago

Milestone: Unclassified

Milestone Unclassified deleted

comment:3 by historic_bruno, 12 years ago

Milestone: Pre-Alpha 2
Note: See TracTickets for help on using tickets.