04-24-2015, 05:55 PM
(This post was last modified: 04-24-2015, 05:58 PM by LogicParrot.)
@worktycho:
Regarding const: you're probably right, in fact, there are many stuff in the interface that should be const and they aren't, I'll change that.
Regarding returning cPath as a value type: cPath has an internal dynamic allocation of a vector, wouldn't it be messy to return it that way?
Progress:
Vector3d hash: I implemented a simple Vector3d hash function which concatenates the first byte of each of the x,y,z values after they're casted to ints. The result is a hash function which guarantees no hash collisions in any 128x128x128 area, more than enough for pathfinding.
Checking for solids: I've been looking at LineBlockTracer to try to understand how to query the world for block status, I realized my class is missing a cWorld. I assume the mobs need to pass their m_World to the PathFinder, is that correct?
Regarding const: you're probably right, in fact, there are many stuff in the interface that should be const and they aren't, I'll change that.
Regarding returning cPath as a value type: cPath has an internal dynamic allocation of a vector, wouldn't it be messy to return it that way?
Progress:
Vector3d hash: I implemented a simple Vector3d hash function which concatenates the first byte of each of the x,y,z values after they're casted to ints. The result is a hash function which guarantees no hash collisions in any 128x128x128 area, more than enough for pathfinding.
Checking for solids: I've been looking at LineBlockTracer to try to understand how to query the world for block status, I realized my class is missing a cWorld. I assume the mobs need to pass their m_World to the PathFinder, is that correct?