mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
*** empty log message ***
This commit is contained in:
parent
a4995b8ea2
commit
983c9c3062
@ -147,6 +147,9 @@ sample(ParametricCurve *curve, int count, bool even) {
|
|||||||
double t, last_t, d;
|
double t, last_t, d;
|
||||||
DataPoint dp;
|
DataPoint dp;
|
||||||
|
|
||||||
|
|
||||||
|
size_t n = _data.size();
|
||||||
|
|
||||||
last_t = 0.0;
|
last_t = 0.0;
|
||||||
d = 0.0;
|
d = 0.0;
|
||||||
int i;
|
int i;
|
||||||
@ -164,6 +167,14 @@ sample(ParametricCurve *curve, int count, bool even) {
|
|||||||
_data.push_back(dp);
|
_data.push_back(dp);
|
||||||
last_t = t;
|
last_t = t;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (even) {
|
||||||
|
double scale = max_t / last_t;
|
||||||
|
while (n < _data.size()) {
|
||||||
|
_data[n]._t *= scale;
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////
|
||||||
|
Loading…
x
Reference in New Issue
Block a user