112 FVector Begin = FVector(Arrow.
line.
begin);
113 FVector End = FVector(Arrow.
line.
end);
120 const auto Diff = End - Begin;
121 const FRotator LookAt = FRotationMatrix::MakeFromX(Diff).Rotator();
122 const FTransform Transform = {LookAt, Begin};
125 const auto Dist = Diff.Size();
126 const auto ArrowSize = 1e2f * Arrow.
arrow_size;
127 const auto ArrowTipDist = Dist - ArrowSize;
130 World->PersistentLineBatcher->DrawLines(TArray<FBatchedLine>({
134 Transform.TransformPosition(FVector(ArrowTipDist, +ArrowSize, +ArrowSize)),
137 Transform.TransformPosition(FVector(ArrowTipDist, +ArrowSize, -ArrowSize)),
140 Transform.TransformPosition(FVector(ArrowTipDist, -ArrowSize, +ArrowSize)),
143 Transform.TransformPosition(FVector(ArrowTipDist, -ArrowSize, -ArrowSize)),
150 FVector Begin = FVector(Arrow.
line.
begin);
151 FVector End = FVector(Arrow.
line.
end);
158 const auto Diff = End - Begin;
159 const FRotator LookAt = FRotationMatrix::MakeFromX(Diff).Rotator();
160 const FTransform Transform = {LookAt, Begin};
163 const auto Dist = Diff.Size();
165 const auto ArrowTipDist = Dist - ArrowSize;
168 Hud->AddHUDLine(Begin, End, Thickness, Color.Quantize(),
LifeTime);
170 Transform.TransformPosition(FVector(ArrowTipDist, +ArrowSize, +ArrowSize)),
171 End, Thickness, Color.Quantize(),
LifeTime);
173 Transform.TransformPosition(FVector(ArrowTipDist, +ArrowSize, -ArrowSize)),
174 End, Thickness, Color.Quantize(),
LifeTime);
176 Transform.TransformPosition(FVector(ArrowTipDist, -ArrowSize, +ArrowSize)),
177 End, Thickness, Color.Quantize(),
LifeTime);
179 Transform.TransformPosition(FVector(ArrowTipDist, -ArrowSize, -ArrowSize)),
180 End, Thickness, Color.Quantize(),
LifeTime);
185 const FVector Extent = 1e2f * FVector{Box.box.extent.x, Box.box.extent.y, Box.box.extent.z};
186 FTransform Transform = {FRotator(Box.rotation), Box.box.location};
187 const auto Thickness = 1e2f * Box.thickness;
199 for(int32 i = 0; i < 2; ++i)
201 for(int32 j = 0; j < 2; ++j)
203 P.X=B[i].X; Q.X=B[i].X; P.Y=B[j].Y;
204 Q.Y=B[j].Y; P.Z=B[0].Z; Q.Z=B[1].Z;
205 World->PersistentLineBatcher->DrawLine(
206 Transform.TransformPosition(P), Transform.TransformPosition(Q),
209 P.Y=B[i].Y; Q.Y=B[i].Y; P.Z=B[j].Z;
210 Q.Z=B[j].Z; P.X=B[0].X; Q.X=B[1].X;
211 World->PersistentLineBatcher->DrawLine(
212 Transform.TransformPosition(P), Transform.TransformPosition(Q),
215 P.Z=B[i].Z; Q.Z=B[i].Z; P.X=B[j].X;
216 Q.X=B[j].X; P.Y=B[0].Y; Q.Y=B[1].Y;
217 World->PersistentLineBatcher->DrawLine(
218 Transform.TransformPosition(P), Transform.TransformPosition(Q),
227 const FVector Extent = 1e2f * FVector{Box.box.extent.x, Box.box.extent.y, Box.box.extent.z};
228 FTransform Transform = {FRotator(Box.rotation), Box.box.location};
229 const auto Thickness = Box.thickness;
241 for(int32 i = 0; i < 2; ++i)
243 for(int32 j = 0; j < 2; ++j)
245 P.X=B[i].X; Q.X=B[i].X; P.Y=B[j].Y;
246 Q.Y=B[j].Y; P.Z=B[0].Z; Q.Z=B[1].Z;
248 Transform.TransformPosition(P), Transform.TransformPosition(Q),
249 Thickness, Color.Quantize(),
LifeTime);
251 P.Y=B[i].Y; Q.Y=B[i].Y; P.Z=B[j].Z;
252 Q.Z=B[j].Z; P.X=B[0].X; Q.X=B[1].X;
254 Transform.TransformPosition(P), Transform.TransformPosition(Q),
255 Thickness, Color.Quantize(),
LifeTime);
257 P.Z=B[i].Z; Q.Z=B[i].Z; P.X=B[j].X;
258 Q.X=B[j].X; P.Y=B[0].Y; Q.Y=B[1].Y;
260 Transform.TransformPosition(P), Transform.TransformPosition(Q),
261 Thickness, Color.Quantize(),
LifeTime);