add particles collision detection
This commit is contained in:
@@ -69,7 +69,9 @@ public:
|
||||
/// @param def segment block definition
|
||||
/// @param state segment block state
|
||||
/// @return origin block position or `pos` if block is not extended
|
||||
glm::ivec3 seekOrigin(glm::ivec3 pos, const Block& def, blockstate state);
|
||||
glm::ivec3 seekOrigin(
|
||||
const glm::ivec3& pos, const Block& def, blockstate state
|
||||
) const;
|
||||
|
||||
/// @brief Check if required zone is replaceable
|
||||
/// @param def definition of the block that requires a replaceable zone
|
||||
@@ -97,7 +99,12 @@ public:
|
||||
|
||||
glm::vec3 rayCastToObstacle(glm::vec3 start, glm::vec3 dir, float maxDist);
|
||||
|
||||
const AABB* isObstacleAt(float x, float y, float z);
|
||||
const AABB* isObstacleAt(float x, float y, float z) const;
|
||||
|
||||
const AABB* isObstacleAt(const glm::vec3& pos) const {
|
||||
return isObstacleAt(pos.x, pos.y, pos.z);
|
||||
}
|
||||
|
||||
bool isSolidBlock(int32_t x, int32_t y, int32_t z);
|
||||
bool isReplaceableBlock(int32_t x, int32_t y, int32_t z);
|
||||
bool isObstacleBlock(int32_t x, int32_t y, int32_t z);
|
||||
|
||||
Reference in New Issue
Block a user