fix for duplicated final vertex bug
parent
8c0e6e3d18
commit
bab8d27301
|
@ -32,9 +32,11 @@ Hair::Hair(const Properties &props) : Shape(props) {
|
||||||
} else {
|
} else {
|
||||||
std::istringstream iss(line);
|
std::istringstream iss(line);
|
||||||
iss >> p.x >> p.y >> p.z;
|
iss >> p.x >> p.y >> p.z;
|
||||||
m_vertices.push_back(p);
|
if (iss.good()) {
|
||||||
m_startFiber.push_back(newFiber);
|
m_vertices.push_back(p);
|
||||||
newFiber = false;
|
m_startFiber.push_back(newFiber);
|
||||||
|
newFiber = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m_startFiber.push_back(true);
|
m_startFiber.push_back(true);
|
||||||
|
@ -52,8 +54,8 @@ Hair::Hair(Stream *stream, InstanceManager *manager) : Shape(stream, manager) {
|
||||||
for (size_t i=0; i<segmentCount; ++i)
|
for (size_t i=0; i<segmentCount; ++i)
|
||||||
m_vertices.push_back(Point(stream));
|
m_vertices.push_back(Point(stream));
|
||||||
|
|
||||||
m_startFiber.reserve(segmentCount);
|
m_startFiber.reserve(segmentCount+1);
|
||||||
for (size_t i=0; i<segmentCount; ++i)
|
for (size_t i=0; i<segmentCount+1; ++i)
|
||||||
m_startFiber.push_back(stream->readBool());
|
m_startFiber.push_back(stream->readBool());
|
||||||
|
|
||||||
buildSegIndex();
|
buildSegIndex();
|
||||||
|
|
Loading…
Reference in New Issue