Diff
checker
टेक्स्ट
टेक्स्ट
छवियां
दस्तावेज़
Excel
फ़ोल्डर्स
Legal
Enterprise
डेस्कटॉप
मूल्य
साइन इन करें
Diffchecker डेस्कटॉप डाउनलोड करें
टेक्स्ट की तुलना करें
दो टेक्स्ट फ़ाइलों के बीच अंतर ढूंढें
उपकरण
इतिहास
रियल-टाइम एडिटर
अपरिवर्तित संक्षिप्त करें
लाइन रैप बंद
लेआउट
विभाजित
संयुक्त
परिवर्तन हाइलाइट करें
स्मार्ट
शब्द
अक्षर
सिंटैक्स हाइलाइटिंग
सिंटैक्स चुनें
अनदेखा करें
टेक्स्ट बदलें
पहले अंतर पर जाएँ
इनपुट संपादित करें
Diffchecker Desktop
Diffchecker चलाने का सबसे सुरक्षित तरीका। Diffchecker Desktop ऐप पाएं: आपके diffs कभी आपके कंप्यूटर से बाहर नहीं जाते!
Desktop पाएं
Subdivision Step Sampler diff 5.8 / 5.7
बनाया गया
19 घंटे पहले
Diff कभी समाप्त नहीं होता
साफ़
निर्यात करें
शेयर करें
समझाएं
0 हटाए गए
लाइनें
कुल
हटाया गया
अक्षर
कुल
हटाया गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
87 लाइनें
सभी को कॉपी करें
3 जोड़े गए
लाइनें
कुल
जोड़ा गया
अक्षर
कुल
जोड़ा गया
इस सुविधा का उपयोग जारी रखने के लिए, अपग्रेड करें
Diff
checker
Pro
मूल्य देखें
87 लाइनें
सभी को कॉपी करें
virtual void Step(FSamplerResult& OutResult) override
virtual void Step(FSamplerResult& OutResult) override
{
{
const int PreviousSegmentIndex = (CurrentSegmentIndex > 0 ? CurrentSegmentIndex : NumSegments) - 1;
const int PreviousSegmentIndex = (CurrentSegmentIndex > 0 ? CurrentSegmentIndex : NumSegments) - 1;
// To capture the last key point on the spline, we sample the point at the end of the previous segment.
// To capture the last key point on the spline, we sample the point at the end of the previous segment.
const bool bLastKeyPoint = CurrentSegmentIndex == LineData->GetNumSegments();
const bool bLastKeyPoint = CurrentSegmentIndex == LineData->GetNumSegments();
const int SegmentIndex = bLastKeyPoint ? PreviousSegmentIndex : CurrentSegmentIndex;
const int SegmentIndex = bLastKeyPoint ? PreviousSegmentIndex : CurrentSegmentIndex;
const FVector::FReal SegmentLength = LineData->GetSegmentLength(SegmentIndex);
const FVector::FReal SegmentLength = LineData->GetSegmentLength(SegmentIndex);
const FVector::FReal SegmentStep = SegmentLength / (SubdivisionsPerSegment + 1);
const FVector::FReal SegmentStep = SegmentLength / (SubdivisionsPerSegment + 1);
const FVector::FReal DistanceAlongSegment = bLastKeyPoint ? SegmentLength : SubpointIndex * SegmentStep;
const FVector::FReal DistanceAlongSegment = bLastKeyPoint ? SegmentLength : SubpointIndex * SegmentStep;
FBox& OutBox = OutResult.Box;
FBox& OutBox = OutResult.Box;
FTransform& OutTransform = OutResult.LocalTransform;
FTransform& OutTransform = OutResult.LocalTransform;
OutTransform = LineData->GetTransformAtDistance(SegmentIndex, DistanceAlongSegment, /*bWorldSpace=*/false, &OutBox);
OutTransform = LineData->GetTransformAtDistance(SegmentIndex, DistanceAlongSegment, /*bWorldSpace=*/false, &OutBox);
OutResult.SampleIndex = SampleIndex++;
OutResult.SampleIndex = SampleIndex++;
OutResult.SegmentIndex = LineData->IsClosed() ? CurrentSegmentIndex : SegmentIndex;
OutResult.SegmentIndex = LineData->IsClosed() ? CurrentSegmentIndex : SegmentIndex;
OutResult.SubsegmentIndex = SubpointIndex;
OutResult.SubsegmentIndex = SubpointIndex;
OutResult.InputKey = LineData->GetInputKeyAtDistance(SegmentIndex, DistanceAlongSegment);
OutResult.InputKey = LineData->GetInputKeyAtDistance(SegmentIndex, DistanceAlongSegment);
if (bComputeCurvature)
if (bComputeCurvature)
{
{
OutResult.Curvature = LineData->GetCurvatureAtDistance(SegmentIndex, DistanceAlongSegment);
OutResult.Curvature = LineData->GetCurvatureAtDistance(SegmentIndex, DistanceAlongSegment);
}
}
if (bComputeTangents)
if (bComputeTangents)
{
{
// Control points have actual Arrive and Leave tangents
// Control points have actual Arrive and Leave tangents
if (SubpointIndex == 0)
if (SubpointIndex == 0)
{
{
LineData->GetTangentsAtSegmentStart(CurrentSegmentIndex, OutResult.ArriveTangent, OutResult.LeaveTangent);
LineData->GetTangentsAtSegmentStart(CurrentSegmentIndex, OutResult.ArriveTangent, OutResult.LeaveTangent);
}
}
else
else
{
{
// For a non-control-point, we can get the normalized tangent at least.
// For a non-control-point, we can get the normalized tangent at least.
const FVector Forward = OutTransform.GetRotation().GetForwardVector();
const FVector Forward = OutTransform.GetRotation().GetForwardVector();
OutResult.ArriveTangent = Forward;
OutResult.ArriveTangent = Forward;
OutResult.LeaveTangent = Forward;
OutResult.LeaveTangent = Forward;
}
}
}
}
if (bComputeAlpha)
if (bComputeAlpha)
{
{
OutResult.Alpha = LineData->GetAlphaAtDistance(SegmentIndex, DistanceAlongSegment);
OutResult.Alpha = LineData->GetAlphaAtDistance(SegmentIndex, DistanceAlongSegment);
}
}
if (bComputeDistance)
if (bComputeDistance)
{
{
// When we step onto a new segment, add the length of the previous segment onto the distance to our current segment.
// When we step onto a new segment, add the length of the previous segment onto the distance to our current segment.
if (SegmentIndex > 0 && !bLastKeyPoint && SubpointIndex == 0)
if (SegmentIndex > 0 && !bLastKeyPoint && SubpointIndex == 0)
{
{
DistanceToCurrentSegment += LineData->GetSegmentLength(SegmentIndex - 1);
DistanceToCurrentSegment += LineData->GetSegmentLength(SegmentIndex - 1);
}
}
OutResult.Distance = DistanceToCurrentSegment + DistanceAlongSegment;
OutResult.Distance = DistanceToCurrentSegment + DistanceAlongSegment;
}
}
const double ScaleFactor = 0.5 * SegmentStep / (FMath::IsNearlyZero(OutTransform.GetScale3D().X) ? UE_DOUBLE_SMALL_NUMBER : OutTransform.GetScale3D().X);
const double ScaleFactor = 0.5 * SegmentStep / (FMath::IsNearlyZero(OutTransform.GetScale3D().X) ? UE_DOUBLE_SMALL_NUMBER : OutTransform.GetScale3D().X);
if (SubpointIndex == 0)
if (SubpointIndex == 0)
{
{
const FVector::FReal PreviousSegmentLength = LineData->GetSegmentLength(PreviousSegmentIndex);
const FVector::FReal PreviousSegmentLength = LineData->GetSegmentLength(PreviousSegmentIndex);
FTransform PreviousSegmentEndTransform = LineData->GetTransformAtDistance(PreviousSegmentIndex, PreviousSegmentLength, /*bWorldSpace=*/false);
FTransform PreviousSegmentEndTransform = LineData->GetTransformAtDistance(PreviousSegmentIndex, PreviousSegmentLength, /*bWorldSpace=*/false);
if ((PreviousSegmentEndTransform.GetLocation() - OutTransform.GetLocation()).Length() <= KINDA_SMALL_NUMBER)
if ((PreviousSegmentEndTransform.GetLocation() - OutTransform.GetLocation()).Length() <= KINDA_SMALL_NUMBER)
{
{
OutBox.Min.X *= 0.5 * PreviousSegmentLength / ((FMath::IsNearlyZero(PreviousSegmentEndTransform.GetScale3D().X) ? UE_DOUBLE_SMALL_NUMBER : PreviousSegmentEndTransform.GetScale3D().X) * (SubdivisionsPerSegment + 1));
OutBox.Min.X *= 0.5 * PreviousSegmentLength / ((FMath::IsNearlyZero(PreviousSegmentEndTransform.GetScale3D().X) ? UE_DOUBLE_SMALL_NUMBER : PreviousSegmentEndTransform.GetScale3D().X) * (SubdivisionsPerSegment + 1));
}
}
else
else
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
OutBox.Min.X *=
ScaleFactor;
OutBox.Min.X *=
0.5 * SegmentStep /
ScaleFactor;
}
}
}
}
else
else
{
{
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
OutBox.Min.X *=
ScaleFactor;
OutBox.Min.X *=
0.5 * SegmentStep /
ScaleFactor;
}
}
कॉपी
कॉपी हुआ
कॉपी
कॉपी हुआ
OutBox.Max.X *=
ScaleFactor;
OutBox.Max.X *=
0.5 * SegmentStep /
ScaleFactor;
++SubpointIndex;
++SubpointIndex;
if (SubpointIndex > SubdivisionsPerSegment || bLastKeyPoint)
if (SubpointIndex > SubdivisionsPerSegment || bLastKeyPoint)
{
{
SubpointIndex = 0;
SubpointIndex = 0;
++CurrentSegmentIndex;
++CurrentSegmentIndex;
}
}
}
}
सेव किए गए Diffs
ऑरिजनल टेक्स्ट
फ़ाइल खोलें
virtual void Step(FSamplerResult& OutResult) override { const int PreviousSegmentIndex = (CurrentSegmentIndex > 0 ? CurrentSegmentIndex : NumSegments) - 1; // To capture the last key point on the spline, we sample the point at the end of the previous segment. const bool bLastKeyPoint = CurrentSegmentIndex == LineData->GetNumSegments(); const int SegmentIndex = bLastKeyPoint ? PreviousSegmentIndex : CurrentSegmentIndex; const FVector::FReal SegmentLength = LineData->GetSegmentLength(SegmentIndex); const FVector::FReal SegmentStep = SegmentLength / (SubdivisionsPerSegment + 1); const FVector::FReal DistanceAlongSegment = bLastKeyPoint ? SegmentLength : SubpointIndex * SegmentStep; FBox& OutBox = OutResult.Box; FTransform& OutTransform = OutResult.LocalTransform; OutTransform = LineData->GetTransformAtDistance(SegmentIndex, DistanceAlongSegment, /*bWorldSpace=*/false, &OutBox); OutResult.SampleIndex = SampleIndex++; OutResult.SegmentIndex = LineData->IsClosed() ? CurrentSegmentIndex : SegmentIndex; OutResult.SubsegmentIndex = SubpointIndex; OutResult.InputKey = LineData->GetInputKeyAtDistance(SegmentIndex, DistanceAlongSegment); if (bComputeCurvature) { OutResult.Curvature = LineData->GetCurvatureAtDistance(SegmentIndex, DistanceAlongSegment); } if (bComputeTangents) { // Control points have actual Arrive and Leave tangents if (SubpointIndex == 0) { LineData->GetTangentsAtSegmentStart(CurrentSegmentIndex, OutResult.ArriveTangent, OutResult.LeaveTangent); } else { // For a non-control-point, we can get the normalized tangent at least. const FVector Forward = OutTransform.GetRotation().GetForwardVector(); OutResult.ArriveTangent = Forward; OutResult.LeaveTangent = Forward; } } if (bComputeAlpha) { OutResult.Alpha = LineData->GetAlphaAtDistance(SegmentIndex, DistanceAlongSegment); } if (bComputeDistance) { // When we step onto a new segment, add the length of the previous segment onto the distance to our current segment. if (SegmentIndex > 0 && !bLastKeyPoint && SubpointIndex == 0) { DistanceToCurrentSegment += LineData->GetSegmentLength(SegmentIndex - 1); } OutResult.Distance = DistanceToCurrentSegment + DistanceAlongSegment; } const double ScaleFactor = 0.5 * SegmentStep / (FMath::IsNearlyZero(OutTransform.GetScale3D().X) ? UE_DOUBLE_SMALL_NUMBER : OutTransform.GetScale3D().X); if (SubpointIndex == 0) { const FVector::FReal PreviousSegmentLength = LineData->GetSegmentLength(PreviousSegmentIndex); FTransform PreviousSegmentEndTransform = LineData->GetTransformAtDistance(PreviousSegmentIndex, PreviousSegmentLength, /*bWorldSpace=*/false); if ((PreviousSegmentEndTransform.GetLocation() - OutTransform.GetLocation()).Length() <= KINDA_SMALL_NUMBER) { OutBox.Min.X *= 0.5 * PreviousSegmentLength / ((FMath::IsNearlyZero(PreviousSegmentEndTransform.GetScale3D().X) ? UE_DOUBLE_SMALL_NUMBER : PreviousSegmentEndTransform.GetScale3D().X) * (SubdivisionsPerSegment + 1)); } else { OutBox.Min.X *= ScaleFactor; } } else { OutBox.Min.X *= ScaleFactor; } OutBox.Max.X *= ScaleFactor; ++SubpointIndex; if (SubpointIndex > SubdivisionsPerSegment || bLastKeyPoint) { SubpointIndex = 0; ++CurrentSegmentIndex; } }
परिवर्तित टेक्स्ट
फ़ाइल खोलें
virtual void Step(FSamplerResult& OutResult) override { const int PreviousSegmentIndex = (CurrentSegmentIndex > 0 ? CurrentSegmentIndex : NumSegments) - 1; // To capture the last key point on the spline, we sample the point at the end of the previous segment. const bool bLastKeyPoint = CurrentSegmentIndex == LineData->GetNumSegments(); const int SegmentIndex = bLastKeyPoint ? PreviousSegmentIndex : CurrentSegmentIndex; const FVector::FReal SegmentLength = LineData->GetSegmentLength(SegmentIndex); const FVector::FReal SegmentStep = SegmentLength / (SubdivisionsPerSegment + 1); const FVector::FReal DistanceAlongSegment = bLastKeyPoint ? SegmentLength : SubpointIndex * SegmentStep; FBox& OutBox = OutResult.Box; FTransform& OutTransform = OutResult.LocalTransform; OutTransform = LineData->GetTransformAtDistance(SegmentIndex, DistanceAlongSegment, /*bWorldSpace=*/false, &OutBox); OutResult.SampleIndex = SampleIndex++; OutResult.SegmentIndex = LineData->IsClosed() ? CurrentSegmentIndex : SegmentIndex; OutResult.SubsegmentIndex = SubpointIndex; OutResult.InputKey = LineData->GetInputKeyAtDistance(SegmentIndex, DistanceAlongSegment); if (bComputeCurvature) { OutResult.Curvature = LineData->GetCurvatureAtDistance(SegmentIndex, DistanceAlongSegment); } if (bComputeTangents) { // Control points have actual Arrive and Leave tangents if (SubpointIndex == 0) { LineData->GetTangentsAtSegmentStart(CurrentSegmentIndex, OutResult.ArriveTangent, OutResult.LeaveTangent); } else { // For a non-control-point, we can get the normalized tangent at least. const FVector Forward = OutTransform.GetRotation().GetForwardVector(); OutResult.ArriveTangent = Forward; OutResult.LeaveTangent = Forward; } } if (bComputeAlpha) { OutResult.Alpha = LineData->GetAlphaAtDistance(SegmentIndex, DistanceAlongSegment); } if (bComputeDistance) { // When we step onto a new segment, add the length of the previous segment onto the distance to our current segment. if (SegmentIndex > 0 && !bLastKeyPoint && SubpointIndex == 0) { DistanceToCurrentSegment += LineData->GetSegmentLength(SegmentIndex - 1); } OutResult.Distance = DistanceToCurrentSegment + DistanceAlongSegment; } const double ScaleFactor = 0.5 * SegmentStep / (FMath::IsNearlyZero(OutTransform.GetScale3D().X) ? UE_DOUBLE_SMALL_NUMBER : OutTransform.GetScale3D().X); if (SubpointIndex == 0) { const FVector::FReal PreviousSegmentLength = LineData->GetSegmentLength(PreviousSegmentIndex); FTransform PreviousSegmentEndTransform = LineData->GetTransformAtDistance(PreviousSegmentIndex, PreviousSegmentLength, /*bWorldSpace=*/false); if ((PreviousSegmentEndTransform.GetLocation() - OutTransform.GetLocation()).Length() <= KINDA_SMALL_NUMBER) { OutBox.Min.X *= 0.5 * PreviousSegmentLength / ((FMath::IsNearlyZero(PreviousSegmentEndTransform.GetScale3D().X) ? UE_DOUBLE_SMALL_NUMBER : PreviousSegmentEndTransform.GetScale3D().X) * (SubdivisionsPerSegment + 1)); } else { OutBox.Min.X *= 0.5 * SegmentStep / ScaleFactor; } } else { OutBox.Min.X *= 0.5 * SegmentStep / ScaleFactor; } OutBox.Max.X *= 0.5 * SegmentStep / ScaleFactor; ++SubpointIndex; if (SubpointIndex > SubdivisionsPerSegment || bLastKeyPoint) { SubpointIndex = 0; ++CurrentSegmentIndex; } }
अंतर खोजें