git-svn-id: svn://db.shs.com.ru/libs@657 a8b55f48-bf90-11e4-a774-851b48703e85
This commit is contained in:
@@ -342,6 +342,19 @@ void Mesh::transformPoints(const QMatrix4x4 & mat) {
|
||||
}
|
||||
|
||||
|
||||
void Mesh::flipNormals() {
|
||||
if (vertices_.isEmpty()) return;
|
||||
for (int i = 0; i < triangles_.size(); ++i)
|
||||
piSwap(triangles_[i].p1, triangles_[i].p2);
|
||||
for (int i = 0; i < lines_.size(); ++i)
|
||||
piSwap(lines_[i].p0, lines_[i].p1);
|
||||
int ncnt = normals_.size();
|
||||
for (int i = 0; i < ncnt; ++i)
|
||||
normals_[i] = -normals_[i];
|
||||
changed = hash_changed = true;
|
||||
}
|
||||
|
||||
|
||||
void Mesh::append(const Mesh * m) {
|
||||
if (!m) return;
|
||||
if (m->isEmpty()) return;
|
||||
|
||||
Reference in New Issue
Block a user