Private class to represent one node in the octree used for collision detection
More...
|
OctreeNode | parent |
|
OctreeNode[] | children |
| Not always of length 8. Empty children are removed when the octree is constructed to save some memory. More...
|
|
GraphPoint | point |
| Null if this is not a leaf. Only leaves represents points in the graph. More...
|
|
Vector3 | pos |
|
Vector3 | center |
| Not the geometrical center, just a point inside the node that defines corners for its children, unless this is a leaf node. More...
|
|
Vector3 | size |
|
bool | rejected |
|
bool | completelyInside |
|
|
int | Group [get, set] |
| The group that this node belongs to. -1 means no group, 0 or a positive number means some group. If this is a leaf node, this should be the same as the group that the selection tool has given the GraphPoint. If this is not a leaf node, this is not -1 if all its children are of that group. More...
|
|
bool | NodeIterated [get, set] |
|
Private class to represent one node in the octree used for collision detection
◆ AllLeavesUnder()
List<OctreeNode> CellexalVR.AnalysisObjects.Graph.OctreeNode.AllLeavesUnder |
( |
bool |
includeIterated = true | ) |
|
Returns a List<OctreeNode> all leaves that are under this node in the octree.
- Parameters
-
includeIterated | True if nodes marked as iterated (OctreeNode.NodeIterated) should be included, false if they should not. |
◆ ChangeGroupRecursively()
void CellexalVR.AnalysisObjects.Graph.OctreeNode.ChangeGroupRecursively |
( |
int |
group | ) |
|
Changes the group of this node and all of its children (and grand-children and so on) recursively.
- Parameters
-
◆ FirstLeafNotIterated()
OctreeNode CellexalVR.AnalysisObjects.Graph.OctreeNode.FirstLeafNotIterated |
( |
| ) |
|
Finds the first leaf node (using depth first) that has NodeIterated == false. Returns null if no non-iterated node was found.
◆ NodeContainingPoint()
OctreeNode CellexalVR.AnalysisObjects.Graph.OctreeNode.NodeContainingPoint |
( |
Vector3 |
point | ) |
|
Returns the smallest node that contains a point. The retured node might not be a leaf.
- Parameters
-
point | The point to look for a node around. |
- Returns
- The that contains the point.
◆ PointInside()
bool CellexalVR.AnalysisObjects.Graph.OctreeNode.PointInside |
( |
Vector3 |
point | ) |
|
Checks if a point is inside this node.
◆ PointInsideSelectionTool()
bool CellexalVR.AnalysisObjects.Graph.OctreeNode.PointInsideSelectionTool |
( |
Vector3 |
selectionToolCenter, |
|
|
Vector3 |
pointPosWorldSpace |
|
) |
| |
Checks if a point is inside the selection tool by raycasting.
- Parameters
-
selectionToolCenter | The selection tool's position in world space. |
pointPosWorldSpace | This node's position in world space. (use Transform.TransformPoint(node.splitCenter) ) |
- Returns
- True if this point is inside the selection tool.
◆ PointInsideSphere()
bool CellexalVR.AnalysisObjects.Graph.OctreeNode.PointInsideSphere |
( |
Vector3 |
sphereCenter, |
|
|
float |
sqrRadius |
|
) |
| |
Checks if this point is inside a sphere.
- Parameters
-
sphereCenter | The sphere's center point, in local coordinates. |
radius | The sphere's radius. |
- Returns
- True if this point is inside the sphere. False otherwise.
◆ ResetIteration()
void CellexalVR.AnalysisObjects.Graph.OctreeNode.ResetIteration |
( |
| ) |
|
Sets NodeIterated to false for this node and all of its children recursively.
◆ ToString()
override string CellexalVR.AnalysisObjects.Graph.OctreeNode.ToString |
( |
| ) |
|
Returns a string representation of this node and all its children. May produce very long strings for very large trees.
◆ center
Vector3 CellexalVR.AnalysisObjects.Graph.OctreeNode.center |
Not the geometrical center, just a point inside the node that defines corners for its children, unless this is a leaf node.
◆ children
OctreeNode [] CellexalVR.AnalysisObjects.Graph.OctreeNode.children |
Not always of length 8. Empty children are removed when the octree is constructed to save some memory.
◆ point
GraphPoint CellexalVR.AnalysisObjects.Graph.OctreeNode.point |
Null if this is not a leaf. Only leaves represents points in the graph.
◆ Group
int CellexalVR.AnalysisObjects.Graph.OctreeNode.Group |
|
getset |
The group that this node belongs to. -1 means no group, 0 or a positive number means some group. If this is a leaf node, this should be the same as the group that the selection tool has given the GraphPoint. If this is not a leaf node, this is not -1 if all its children are of that group.
The documentation for this class was generated from the following file:
- cellexalvr_cloudxr/Assets/Scripts/AnalysisObjects/Graph.cs