Panda3D
Public Types | Public Member Functions | Public Attributes | List of all members
AINode Class Reference

This class is used to assign the nodes on the mesh. More...

#include "aiNode.h"

Public Types

enum  Status { ST_open, ST_close, ST_neutral }
 

Public Member Functions

 AINode (int grid_x, int grid_y, LVecBase3 pos, float w, float l, float h)
 
bool contains (float x, float y)
 This is a handy function which returns true if the passed position is within the node's dimensions. More...
 

Public Attributes

int _cost
 
int _grid_x
 
int _grid_y
 
float _height
 
int _heuristic
 
float _length
 
AINode_neighbours [8]
 
AINode_next
 
LVecBase3 _position
 
AINode_prv_node
 
int _score
 
Status _status
 
bool _type
 
float _width
 

Detailed Description

This class is used to assign the nodes on the mesh.

It holds all the data necessary to compute A* algorithm. It also maintains a lot of vital information such as the neighbor nodes of each node and also its position on the mesh. Note: The Mesh Generator which is a standalone tool makes use of this class to generate the nodes on the mesh.

Definition at line 26 of file aiNode.h.

Member Function Documentation

◆ contains()

bool AINode::contains ( float  x,
float  y 
)

This is a handy function which returns true if the passed position is within the node's dimensions.

Definition at line 43 of file aiNode.cxx.


The documentation for this class was generated from the following files: