Panda3D

Loading...
Searching...
No Matches
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.

## 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 Enumeration Documentation

## ◆ Status

enum AINode::Status

Definition at line 31 of file aiNode.h.

## Constructor & Destructor Documentation

## ◆ AINode()

AINode::AINode | ( | int | grid_x,
|  | int | grid_y,
|  | LVecBase3 | pos,
|  | float | w,
|  | float | l,
|  | float | h )
| explicit

Definition at line 16 of file aiNode.cxx.

## ◆ ~AINode()

AINode::~AINode | ( |  | ) |

Definition at line 36 of file aiNode.cxx.

## 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.

## Member Data Documentation

## ◆ _cost

int AINode::_cost

Definition at line 46 of file aiNode.h.

## ◆ _grid_x

int AINode::_grid_x

Definition at line 53 of file aiNode.h.

## ◆ _grid_y

int AINode::_grid_y

Definition at line 53 of file aiNode.h.

## ◆ _height

float AINode::_height

Definition at line 60 of file aiNode.h.

## ◆ _heuristic

int AINode::_heuristic

Definition at line 47 of file aiNode.h.

## ◆ _length

float AINode::_length

Definition at line 60 of file aiNode.h.

## ◆ _neighbours

AINode* AINode::_neighbours[8]

Definition at line 61 of file aiNode.h.

## ◆ _next

AINode* AINode::_next

Definition at line 66 of file aiNode.h.

## ◆ _position

LVecBase3 AINode::_position

Definition at line 56 of file aiNode.h.

## ◆ _prv_node

AINode* AINode::_prv_node

Definition at line 50 of file aiNode.h.

## ◆ _score

int AINode::_score

Definition at line 45 of file aiNode.h.

## ◆ _status

Status AINode::_status

Definition at line 36 of file aiNode.h.

## ◆ _type

bool AINode::_type

Definition at line 41 of file aiNode.h.

## ◆ _width

float AINode::_width

Definition at line 60 of file aiNode.h.

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

- contrib/src/ai/aiNode.h
- contrib/src/ai/aiNode.cxx