#include <Runtime/Core/Public/Types.h>
template<typename VecType = SimFloat>
TVector3 struct
3-component vector parameterized on a scalar type.
| Template parameters | |
|---|---|
| VecType | Scalar element type — defaults to SimFloat (Fixed32 or float depending on build). |
Cross-type construction and assignment are available when TNX_FIXED_IMPLICIT_FLOAT is defined. Use CastTo<Dst>() or the ToFloat() / ToSim() helpers for explicit conversions.
Constructors, destructors, conversion operators
Public functions
-
template<typename Dst>auto CastTo() const -> TVector3<Dst>
- Explicit per-component type conversion.
- auto ToFloat() const -> TVector3<float>
- Convert to float components.
- auto ToSim() const -> TVector3<SimFloat>
- Convert to SimFloat components.
- auto operator+=(const TVector3& other) -> TVector3&
- auto operator-=(const TVector3& other) -> TVector3&
- auto operator*=(VecType scalar) -> TVector3&
- auto operator/=(VecType scalar) -> TVector3&
- auto operator+(const TVector3<VecType>& other) const -> TVector3
- auto operator-(const TVector3<VecType>& other) const -> TVector3
-
template<typename T>auto operator*(const T& scalar) const -> TVector3
-
template<typename T>auto operator/(const T& scalar) const -> TVector3
- auto operator-() const -> TVector3
- auto LengthSqr() const -> VecType
- auto DistanceSqr(const TVector3& o) const -> VecType
- auto Distance(const TVector3& o) const -> VecType
- auto IsNearZero(VecType eps2 = VecType(1e-8f)) const -> bool
- auto Length() const -> VecType
- auto LengthF() const -> float
- auto Normalized() const -> TVector3