|
|
|
@ -184,8 +184,7 @@ const Matrix3f AP_GeodesicGrid::_mid_inverses[10]{
@@ -184,8 +184,7 @@ const Matrix3f AP_GeodesicGrid::_mid_inverses[10]{
|
|
|
|
|
{ 0.618034f, 0.000000f, -1.000000f}}, |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
int AP_GeodesicGrid::section(const Vector3f& v, |
|
|
|
|
const bool inclusive) |
|
|
|
|
int AP_GeodesicGrid::section(const Vector3f &v, bool inclusive) |
|
|
|
|
{ |
|
|
|
|
int i = _triangle_index(v, inclusive); |
|
|
|
|
if (i < 0) { |
|
|
|
@ -200,8 +199,7 @@ int AP_GeodesicGrid::section(const Vector3f& v,
@@ -200,8 +199,7 @@ int AP_GeodesicGrid::section(const Vector3f& v,
|
|
|
|
|
return 4 * i + j; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int AP_GeodesicGrid::_neighbor_umbrella_component(int idx, |
|
|
|
|
int comp_idx) |
|
|
|
|
int AP_GeodesicGrid::_neighbor_umbrella_component(int idx, int comp_idx) |
|
|
|
|
{ |
|
|
|
|
if (idx < 3) { |
|
|
|
|
return _neighbor_umbrellas[idx].components[comp_idx]; |
|
|
|
@ -306,8 +304,7 @@ int AP_GeodesicGrid::_from_neighbor_umbrella(int idx,
@@ -306,8 +304,7 @@ int AP_GeodesicGrid::_from_neighbor_umbrella(int idx,
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
int AP_GeodesicGrid::_triangle_index(const Vector3f& v, |
|
|
|
|
const bool inclusive) |
|
|
|
|
int AP_GeodesicGrid::_triangle_index(const Vector3f &v, bool inclusive) |
|
|
|
|
{ |
|
|
|
|
/* w holds the coordinates of v with respect to the basis comprised by the
|
|
|
|
|
* vectors of T_i */ |
|
|
|
@ -442,7 +439,7 @@ int AP_GeodesicGrid::_triangle_index(const Vector3f& v,
@@ -442,7 +439,7 @@ int AP_GeodesicGrid::_triangle_index(const Vector3f& v,
|
|
|
|
|
|
|
|
|
|
int AP_GeodesicGrid::_subtriangle_index(const unsigned int triangle_index, |
|
|
|
|
const Vector3f &v, |
|
|
|
|
const bool inclusive) |
|
|
|
|
bool inclusive) |
|
|
|
|
{ |
|
|
|
|
/* w holds the coordinates of v with respect to the basis comprised by the
|
|
|
|
|
* vectors of the middle triangle of T_i where i is triangle_index */ |
|
|
|
|