mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 05:29:18 +02:00
Merge branch 'tmj-dev'
This commit is contained in:
19
Model3d.cpp
19
Model3d.cpp
@@ -729,6 +729,25 @@ void TSubModel::NextAdd(TSubModel *SubModel)
|
||||
Next = SubModel;
|
||||
};
|
||||
|
||||
int TSubModel::count_siblings() {
|
||||
|
||||
auto siblingcount { 0 };
|
||||
auto *sibling { Next };
|
||||
while( sibling != nullptr ) {
|
||||
++siblingcount;
|
||||
sibling = sibling->Next;
|
||||
}
|
||||
return siblingcount;
|
||||
}
|
||||
|
||||
int TSubModel::count_children() {
|
||||
|
||||
return (
|
||||
Child == nullptr ?
|
||||
0 :
|
||||
1 + Child->count_siblings() );
|
||||
}
|
||||
|
||||
int TSubModel::FlagsCheck()
|
||||
{ // analiza koniecznych zmian pomiędzy submodelami
|
||||
// samo pomijanie glBindTexture() nie poprawi wydajności
|
||||
|
||||
Reference in New Issue
Block a user