|
VoltMod
C++23 framework for CS2 server plugins
|
runtime.Trace: line and box traces against the physics world. Game-thread only.
More...
#include <Trace.hpp>
Public Member Functions | |
| Trace (const Bindings &bindings) | |
| Trace (const Trace &)=delete | |
| Trace & | operator= (const Trace &)=delete |
| Status | Available () const |
| Result< TraceHit > | Line (const Vector &from, const Vector &to, const TraceOptions &options={}) const |
| Result< TraceHit > | Box (const Vector &from, const Vector &to, const Vector &mins, const Vector &maxs, const TraceOptions &options={}) const |
| Result< TraceHit > | FromEyes (const Pawn &pawn, float distance, TraceLayers layers=TraceLayers::Solid) const |
| Result< bool > | Clear (const Vector &from, const Vector &to, const TraceOptions &options={}) const |
runtime.Trace: line and box traces against the physics world. Game-thread only.
| Status VoltMod::Trace::Available | ( | ) | const |
Unsupported when the Nav_TraceLine slot did not bind.
Definition at line 67 of file Trace.cpp.
References VoltMod::Bindings::NavTraceLine, and VoltMod::Error::Unsupported().
Referenced by Line().
| Result< TraceHit > VoltMod::Trace::Box | ( | const Vector & | from, |
| const Vector & | to, | ||
| const Vector & | mins, | ||
| const Vector & | maxs, | ||
| const TraceOptions & | options = {} |
||
| ) | const |
Sweeps mins..maxs along the path; End is the box origin. Unsupported when the Nav_TraceShape slot did not bind.
Definition at line 91 of file Trace.cpp.
References VoltMod::MakeFilter(), VoltMod::NavPhysics(), VoltMod::Bindings::NavTraceShape, VoltMod::ReadFile(), VoltMod::ToHit(), and VoltMod::Error::Unsupported().
| Result< bool > VoltMod::Trace::Clear | ( | const Vector & | from, |
| const Vector & | to, | ||
| const TraceOptions & | options = {} |
||
| ) | const |
Definition at line 113 of file Trace.cpp.
References Line(), and VoltMod::ReadFile().
| Result< TraceHit > VoltMod::Trace::FromEyes | ( | const Pawn & | pawn, |
| float | distance, | ||
| TraceLayers | layers = TraceLayers::Solid |
||
| ) | const |
Along pawn's aim, ignoring the pawn.
Definition at line 107 of file Trace.cpp.
References VoltMod::AngleToForward(), Line(), and VoltMod::ReadFile().
| Result< TraceHit > VoltMod::Trace::Line | ( | const Vector & | from, |
| const Vector & | to, | ||
| const TraceOptions & | options = {} |
||
| ) | const |
Definition at line 76 of file Trace.cpp.
References Available(), VoltMod::MakeFilter(), VoltMod::NavPhysics(), VoltMod::Bindings::NavTraceLine, VoltMod::ReadFile(), and VoltMod::ToHit().
Referenced by Clear(), and FromEyes().