|
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 |
What a trace hit | |
| std::optional< TraceHit > | FirstHit (const Vector &from, const Vector &to, const TraceOptions &options={}) const |
| std::optional< TraceHit > | FirstHit (const Vector &from, const Vector &to, const Vector &mins, const Vector &maxs, const TraceOptions &options={}) const |
| std::optional< TraceHit > | FirstHit (const Pawn &pawn, float distance, TraceLayers layers=TraceLayers::Solid) const |
runtime.Trace: line and box traces against the physics world. Game-thread only.
|
inlineexplicit |
bindings must outlive this service.
Definition at line 54 of file Trace.hpp.
Referenced by operator=(), and Trace().
|
delete |
References Trace().
| Status VoltMod::Trace::Available | ( | ) | const |
Unsupported when the Nav_TraceLine slot did not bind.
Definition at line 73 of file Trace.cpp.
References 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 97 of file Trace.cpp.
References VoltMod::MakeFilter(), VoltMod::NavPhysics(), VoltMod::ToHit(), and VoltMod::Error::Unsupported().
Referenced by FirstHit().
| Result< bool > VoltMod::Trace::Clear | ( | const Vector & | from, |
| const Vector & | to, | ||
| const TraceOptions & | options = {} ) const |
| std::optional< TraceHit > VoltMod::Trace::FirstHit | ( | const Pawn & | pawn, |
| float | distance, | ||
| TraceLayers | layers = TraceLayers::Solid ) const |
Definition at line 130 of file Trace.cpp.
References FromEyes(), and VoltMod::OnlyHit().
| std::optional< TraceHit > VoltMod::Trace::FirstHit | ( | const Vector & | from, |
| const Vector & | to, | ||
| const TraceOptions & | options = {} ) const |
Definition at line 119 of file Trace.cpp.
References Line(), and VoltMod::OnlyHit().
| std::optional< TraceHit > VoltMod::Trace::FirstHit | ( | const Vector & | from, |
| const Vector & | to, | ||
| const Vector & | mins, | ||
| const Vector & | maxs, | ||
| const TraceOptions & | options = {} ) const |
Definition at line 124 of file Trace.cpp.
References Box(), and VoltMod::OnlyHit().
| 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 113 of file Trace.cpp.
References VoltMod::Pawn::EyeForward(), VoltMod::Pawn::EyePosition(), and Line().
Referenced by FirstHit().
| Result< TraceHit > VoltMod::Trace::Line | ( | const Vector & | from, |
| const Vector & | to, | ||
| const TraceOptions & | options = {} ) const |
Definition at line 82 of file Trace.cpp.
References Available(), VoltMod::MakeFilter(), VoltMod::NavPhysics(), and VoltMod::ToHit().
Referenced by Clear(), FirstHit(), and FromEyes().