- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
for (int i = 0; i < WorkedVerts.count(); i++)
{
int R0 = (i + Offset0) % WorkedVerts.count();
int R1 = (i + Offset1) % WorkedVerts.count();
int R2 = (i + Offset2) % WorkedVerts.count();
XA << WorkedVerts.at(R0).Position;
XB << WorkedVerts.at(R1).Position;
XC << WorkedVerts.at(R2).Position;
}
PrepareDataPointers(XA, XB, XC);
Inset_Cuda(InputData0, InputData1, InputData2, OutputData, XA.count(), -Amount);
for (int x = 0; x < XA.count(); x++)
{
if (fabs(OutputData[x].x) < 0.0001f && fabs(OutputData[x].y) < 0.0001f && fabs(OutputData[x].z < 0.0001f))
{
int Start = x;
int Start1 = (x + (XA.count() - 1)) % XA.count();
QVector3D StartVec = QVector3D(OutputData[Start1].x, OutputData[Start1].y, OutputData[Start1].z);
QVector3D EndVec = StartVec;
int End = 0;
while (true)
{
End = Start++;
if (fabs(OutputData[End].x) > 0.0001f && fabs(OutputData[End].y) > 0.0001f && fabs(OutputData[End].z > 0.0001f))
{
EndVec = QVector3D(OutputData[End].x, OutputData[End].y, OutputData[End].z);
break;
}
}
QVector3D OffsetX0 = WorkedVerts.at(Start).Position - StartVec;
QVector3D OffsetX1 = WorkedVerts.at(End).Position - EndVec;
QVector3D Mid2 = OffsetX0 + (OffsetX1 - OffsetX0) * 0.5f;
OutputData[x].x = Mid2.x();
OutputData[x].y = Mid2.y();
OutputData[x].z = Mid2.z();
}
}
int VertsCounter = SharedVerts.count();
for (int i = 0; i < WorkedVerts.count(); i++)
{
SharedVertex NewVert;
int Count3 = WorkedVerts.count();
int index = (i + (Count3 - 1)) % Count3;
NewVert.Position = QVector3D(OutputData[index].x, OutputData[index].y, OutputData[index].z);
NewVert.Index = VertsCounter++;
SV2 << NewVert;
}
GuttaPerchaCock 26.05.2017 21:47 # −1
CrashTesterAnusov 28.05.2017 23:22 # 0
begmst 24.08.2021 00:47 # 0