Panda3D
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | List of all members
Node Class Reference

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

#include "meshNode.h"

Public Types

enum  Status { open , close , neutral }
 

Public Member Functions

 Node (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
 
Node_neighbours [8]
 
Node_next
 
LVecBase3 _position
 
Node_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 stand alone tool makes use of this class to generate the nodes on the mesh.

Definition at line 16 of file meshNode.h.

Member Enumeration Documentation

◆ Status

enum Node::Status

Definition at line 26 of file meshNode.h.

Constructor & Destructor Documentation

◆ Node()

Node::Node ( int grid_x,
int grid_y,
LVecBase3 pos,
float w,
float l,
float h )

Definition at line 4 of file meshNode.cxx.

◆ ~Node()

Node::~Node ( )

Definition at line 24 of file meshNode.cxx.

Member Function Documentation

◆ contains()

bool Node::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 31 of file meshNode.cxx.

Member Data Documentation

◆ _cost

int Node::_cost

Definition at line 36 of file meshNode.h.

◆ _grid_x

int Node::_grid_x

Definition at line 43 of file meshNode.h.

◆ _grid_y

int Node::_grid_y

Definition at line 43 of file meshNode.h.

◆ _height

float Node::_height

Definition at line 50 of file meshNode.h.

◆ _heuristic

int Node::_heuristic

Definition at line 37 of file meshNode.h.

◆ _length

float Node::_length

Definition at line 50 of file meshNode.h.

◆ _neighbours

Node* Node::_neighbours[8]

Definition at line 51 of file meshNode.h.

◆ _next

Node* Node::_next

Definition at line 56 of file meshNode.h.

◆ _position

LVecBase3 Node::_position

Definition at line 46 of file meshNode.h.

◆ _prv_node

Node* Node::_prv_node

Definition at line 40 of file meshNode.h.

◆ _score

int Node::_score

Definition at line 35 of file meshNode.h.

◆ _status

Status Node::_status

Definition at line 31 of file meshNode.h.

◆ _type

bool Node::_type

Definition at line 21 of file meshNode.h.

◆ _width

float Node::_width

Definition at line 50 of file meshNode.h.


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