Fix index trashing
This commit is contained in:
parent
c09aeb328e
commit
b408b351d0
1 changed files with 6 additions and 5 deletions
|
@ -209,14 +209,15 @@ int TGGenOutput::build( TGConstruct& c ) {
|
|||
ti_list.push_back( index );
|
||||
}
|
||||
} else {
|
||||
int k;
|
||||
std::vector < SGGeod > convGeodNodes;
|
||||
for ( j = 0; j < geod_nodes.size(); j++ ) {
|
||||
Point3D node = geod_nodes[j];
|
||||
for ( k = 0; k < geod_nodes.size(); k++ ) {
|
||||
Point3D node = geod_nodes[k];
|
||||
convGeodNodes.push_back( SGGeod::fromDegM( node.x(), node.y(), node.z() ) );
|
||||
}
|
||||
std::vector< SGVec2f > tp_list = sgCalcTexCoords( b, convGeodNodes, fans[i][j] );
|
||||
for ( j = 0; j < (int)tp_list.size(); ++j ) {
|
||||
SGVec2f tc = tp_list[j];
|
||||
for ( k = 0; k < (int)tp_list.size(); ++k ) {
|
||||
SGVec2f tc = tp_list[k];
|
||||
// SG_LOG(SG_GENERAL, SG_DEBUG, "base_tc = " << tc);
|
||||
int index = tex_coords.simple_add( Point3D( tc.x(), tc.y(), 0 ) );
|
||||
ti_list.push_back( index );
|
||||
|
@ -287,7 +288,7 @@ void TGGenOutput::calc_group_bounding_sphere( TGConstruct& c,
|
|||
}
|
||||
|
||||
|
||||
// caclulate the bounding sphere for the specified triangle face
|
||||
// calculate the bounding sphere for the specified triangle face
|
||||
void TGGenOutput::calc_bounding_sphere( TGConstruct& c, const TGTriEle& t,
|
||||
Point3D *center, double *radius )
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue