16 AINode::AINode(
int grid_x,
int grid_y, LVecBase3 pos,
float w,
float l,
float h) {
17 for (
int i = 0; i < 8; ++i) {
18 _neighbours[i] =
nullptr;
44 if (_position.get_x() - _width / 2 <= x && _position.get_x() + _width / 2 >= x &&
45 _position.get_y() - _length / 2 <= y && _position.get_y() + _length / 2 >= y) {
PANDA 3D SOFTWARE Copyright (c) Carnegie Mellon University.
bool contains(float x, float y)
This is a handy function which returns true if the passed position is within the node's dimensions.