MCPcopy Create free account
hub / github.com/Kitware/VTK / GetSubOctantIndex

Method GetSubOctantIndex

Common/DataModel/vtkOctreePointLocatorNode.cxx:101–124  ·  view source on GitHub ↗

------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

99
100//------------------------------------------------------------------------------
101int vtkOctreePointLocatorNode::GetSubOctantIndex(
102 VTK_FUTURE_CONST double* point, int CheckContainment)
103{
104 int i, index = 0;
105 if (CheckContainment)
106 {
107 for (i = 0; i < 3; i++)
108 {
109 if (point[i] <= this->MinBounds[i] || point[i] > this->MaxBounds[i])
110 {
111 return -1;
112 }
113 }
114 }
115
116 for (i = 0; i < 3; i++)
117 {
118 if (point[i] > (this->MinBounds[i] + this->MaxBounds[i]) * .5)
119 {
120 index += 1 << i;
121 }
122 }
123 return index;
124}
125
126//------------------------------------------------------------------------------
127void vtkOctreePointLocatorNode::ComputeOctreeNodeInformation(

Callers 1

DivideRegionMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected