72 lines
2.1 KiB
TypeScript
72 lines
2.1 KiB
TypeScript
import type { Actor } from '#root/UE/Actor.ts';
|
|
import type { Float } from '#root/UE/Float.ts';
|
|
import type { Integer } from '#root/UE/Integer.ts';
|
|
import { Name } from '#root/UE/Name.ts';
|
|
import type { PhysicalMaterial } from '#root/UE/PhysicalMaterial.ts';
|
|
import type { PrimitiveComponent } from '#root/UE/PrimitiveComponent.ts';
|
|
import { StructBase } from '#root/UE/StructBase.ts';
|
|
import { Vector } from '#root/UE/Vector.ts';
|
|
|
|
export class HitResult extends StructBase {
|
|
BlockingHit: boolean;
|
|
InitialOverlap: boolean;
|
|
Time: Float;
|
|
Distance: Float;
|
|
Location: Vector;
|
|
ImpactPoint: Vector;
|
|
Normal: Vector;
|
|
ImpactNormal: Vector;
|
|
PhysMat: PhysicalMaterial;
|
|
HitActor: Actor;
|
|
HitComponent: PrimitiveComponent;
|
|
HitBoneName: Name;
|
|
BoneName: Name;
|
|
HitItem: Integer;
|
|
ElementIndex: Integer;
|
|
FaceIndex: Integer;
|
|
TraceStart: Vector;
|
|
TraceEnd: Vector;
|
|
|
|
constructor(
|
|
BlockingHit: boolean = false,
|
|
InitialOverlap: boolean = false,
|
|
Time: number = 0.0,
|
|
Distance: number = 0.0,
|
|
Location: Vector = new Vector(),
|
|
ImpactPoint: Vector = new Vector(),
|
|
Normal: Vector = new Vector(),
|
|
ImpactNormal: Vector = new Vector(),
|
|
PhysMat?: PhysicalMaterial,
|
|
HitActor?: Actor,
|
|
HitComponent?: PrimitiveComponent,
|
|
HitBoneName: Name = new Name('None'),
|
|
BoneName: Name = new Name('None'),
|
|
HitItem: number = 0,
|
|
ElementIndex: number = 0,
|
|
FaceIndex: number = 0,
|
|
TraceStart: Vector = new Vector(),
|
|
TraceEnd: Vector = new Vector()
|
|
) {
|
|
super();
|
|
|
|
this.BlockingHit = BlockingHit;
|
|
this.InitialOverlap = InitialOverlap;
|
|
this.Time = Time;
|
|
this.Distance = Distance;
|
|
this.Location = Location;
|
|
this.ImpactPoint = ImpactPoint;
|
|
this.Normal = Normal;
|
|
this.ImpactNormal = ImpactNormal;
|
|
this.PhysMat = PhysMat!;
|
|
this.HitActor = HitActor!;
|
|
this.HitComponent = HitComponent!;
|
|
this.HitBoneName = HitBoneName;
|
|
this.BoneName = BoneName;
|
|
this.HitItem = HitItem;
|
|
this.ElementIndex = ElementIndex;
|
|
this.FaceIndex = FaceIndex;
|
|
this.TraceStart = TraceStart;
|
|
this.TraceEnd = TraceEnd;
|
|
}
|
|
}
|