Photon Unity Networking 2
2.52
Represents a single node of the tree. More...
Public Types | |
| enum | ENodeType : byte |
Public Member Functions | |
| CellTreeNode () | |
| Default constructor. More... | |
| CellTreeNode (byte id, ENodeType nodeType, CellTreeNode parent) | |
| Constructor to define the ID and the node type as well as setting a parent node. More... | |
| void | AddChild (CellTreeNode child) |
| Adds the given child to the node. More... | |
| void | Draw () |
| Draws the cell in the editor. More... | |
| void | GetActiveCells (List< byte > activeCells, bool yIsUpAxis, Vector3 position) |
| Gathers all cell IDs the player is currently inside or nearby. More... | |
| bool | IsPointInsideCell (bool yIsUpAxis, Vector3 point) |
| Checks if the given point is inside the cell. More... | |
| bool | IsPointNearCell (bool yIsUpAxis, Vector3 point) |
| Checks if the given point is near the cell. More... | |
Public Attributes | |
| byte | Id |
| Represents the unique ID of the cell. More... | |
| Vector3 | Center |
| Represents the center, top-left or bottom-right position of the cell or the size of the cell. More... | |
| ENodeType | NodeType |
| Describes the current node type of the cell tree node. More... | |
| CellTreeNode | Parent |
| Reference to the parent node. More... | |
| List< CellTreeNode > | Childs |
| A list containing all child nodes. More... | |
Represents a single node of the tree.
| CellTreeNode | ( | ) |
Default constructor.
| CellTreeNode | ( | byte | id, |
| ENodeType | nodeType, | ||
| CellTreeNode | parent | ||
| ) |
Constructor to define the ID and the node type as well as setting a parent node.
| id | The ID of the cell is used as the interest group. |
| nodeType | The node type of the cell tree node. |
| parent | The parent node of the cell tree node. |
| void AddChild | ( | CellTreeNode | child | ) |
Adds the given child to the node.
| child | The child which is added to the node. |
| void Draw | ( | ) |
Draws the cell in the editor.
| void GetActiveCells | ( | List< byte > | activeCells, |
| bool | yIsUpAxis, | ||
| Vector3 | position | ||
| ) |
Gathers all cell IDs the player is currently inside or nearby.
| activeCells | The list to add all cell IDs to the player is currently inside or nearby. |
| yIsUpAxis | Describes if the y-axis is used as up-axis. |
| position | The current position of the player. |
| bool IsPointInsideCell | ( | bool | yIsUpAxis, |
| Vector3 | point | ||
| ) |
Checks if the given point is inside the cell.
| yIsUpAxis | Describes if the y-axis is used as up-axis. |
| point | The point to check. |
| bool IsPointNearCell | ( | bool | yIsUpAxis, |
| Vector3 | point | ||
| ) |
Checks if the given point is near the cell.
| yIsUpAxis | Describes if the y-axis is used as up-axis. |
| point | The point to check. |
| Vector3 Center |
Represents the center, top-left or bottom-right position of the cell or the size of the cell.
| List<CellTreeNode> Childs |
A list containing all child nodes.
| byte Id |
Represents the unique ID of the cell.
| ENodeType NodeType |
Describes the current node type of the cell tree node.
| CellTreeNode Parent |
Reference to the parent node.