Brute force method - checking each cube on your line. There was some kind of non-trivial IIRC geometry.
Oh. Googling "clash with the cube of the line" attracted a lot of hits. It looks pretty promising.
http://www.devmaster.net/forums/archive/index.php/t-371.html
, ( ):
8 , . .
- 6 -. , parralel . , , ( > 0) .
, - :
(x, y, z), ABCD, . , B-A C-A ( B.x - A.x, B.y - A.y ect..)
: A B, ...
.
, , - , . , ( ).
http://www.gamedev.net/community/forums/topic.asp?topic_id=185204
, , .
:
2d: sqrt (x ^ 2 + y ^ 2). .
RELATIVE , SQRT.
if ((x1 ^ 2 + y1 ^ 2) > (x2 ^ 2 + y2 ^ 2)) { //x 1, y1 , x2, y2. }
, - , , .
, . , (, , y ... ). . ( ), "" , , .
.
, , . ... crud, - .
( ). THAT ( , ), .