cpp_robotics::Vector4
4次元のベクトル More...
#include <vector4.hpp>
Public Types
Name | |
---|---|
using FLOATING_TYPE | value_type |
Public Functions
Name | |
---|---|
Vector4() =default Construct a new Vector 4 object. |
|
constexpr | Vector4(value_type vx, value_type vy, value_type vz, value_type vw) Construct a new Vector 4 object. |
Vector4(const Vector4 & v) =default Construct a new Vector 4 object. |
|
void | set(value_type vx, value_type vy, value_type vz, value_type vw) |
constexpr value_type | dot(const Vector4 & v) const |
constexpr value_type | norm_sq() const |
value_type | norm() Get the Magnitude object. |
void | normalize() 単位ベクトル化 |
Vector4 | get_normalized() Get the Normalized object. |
constexpr bool | is_zero() const |
constexpr bool | has_nan() const |
constexpr Vector4 | lerp(const Vector4 & b, const value_type t) const |
constexpr Vector4 | operator+() const |
constexpr Vector4 | operator-() const |
bool | operator==(const Vector4 & v) const |
bool | operator!=(const Vector4 & v) const |
constexpr Vector4 | operator+(const Vector4 & v) const |
constexpr Vector4 | operator-(const Vector4 & v) const |
constexpr Vector4 | operator*(const value_type value) const |
constexpr Vector4 | operator/(const value_type value) const |
constexpr Vector4 & | operator+=(const Vector4 & v) |
constexpr Vector4 & | operator-=(const Vector4 & v) |
constexpr Vector4 & | operator*=(const value_type value) |
constexpr Vector4 & | operator/=(const value_type value) |
value_type & | operator[](const int index) |
constexpr value_type | operator[](const int index) const |
constexpr value_type | dot(const Vector4 & a, const Vector4 & b) |
value_type | distance(const Vector4 & a, const Vector4 & b) |
constexpr Vector4 | lerp(const Vector4 & a, const Vector4 & b, const value_type t) |
constexpr Vector4 | zero() |
Public Attributes
Name | |
---|---|
value_type | x |
value_type | y |
value_type | z |
value_type | w |
Friends
Name | |
---|---|
constexpr friend Vector4 | operator*(Scaler s, Vector4 v) |
Detailed Description
template <typename FLOATING_TYPE >
struct cpp_robotics::Vector4;
4次元のベクトル
Public Types Documentation
using value_type
using cpp_robotics::Vector4< FLOATING_TYPE >::value_type = FLOATING_TYPE;
Public Functions Documentation
function Vector4
Vector4() =default
Construct a new Vector 4 object.
function Vector4
inline constexpr Vector4(
value_type vx,
value_type vy,
value_type vz,
value_type vw
)
Construct a new Vector 4 object.
Parameters:
- vx
- vy
- vz
- vw
function Vector4
Vector4(
const Vector4 & v
) =default
Construct a new Vector 4 object.
Parameters:
- v
function set
inline void set(
value_type vx,
value_type vy,
value_type vz,
value_type vw
)
Parameters:
- vx
- vy
- vz
- vw
function dot
inline constexpr value_type dot(
const Vector4 & v
) const
Parameters:
- v
Return: constexpr value_type
function norm_sq
inline constexpr value_type norm_sq() const
Return: constexpr value_type
function norm
inline value_type norm()
Get the Magnitude object.
Return: value_type
function normalize
inline void normalize()
単位ベクトル化
function get_normalized
inline Vector4 get_normalized()
Get the Normalized object.
Return: Vector4
function is_zero
inline constexpr bool is_zero() const
Return:
- true
- false
function has_nan
inline constexpr bool has_nan() const
Return:
- true
- false
function lerp
inline constexpr Vector4 lerp(
const Vector4 & b,
const value_type t
) const
Parameters:
- b
- t
Return: constexpr Vector4
function operator+
inline constexpr Vector4 operator+() const
Return: constexpr Vector4
function operator-
inline constexpr Vector4 operator-() const
Return: constexpr Vector4
function operator==
inline bool operator==(
const Vector4 & v
) const
Parameters:
- v
Return:
- true
- false
function operator!=
inline bool operator!=(
const Vector4 & v
) const
Parameters:
- v
Return:
- true
- false
function operator+
inline constexpr Vector4 operator+(
const Vector4 & v
) const
Parameters:
- v
Return: Vector4
function operator-
inline constexpr Vector4 operator-(
const Vector4 & v
) const
Parameters:
- v
Return: Vector4
function operator*
inline constexpr Vector4 operator*(
const value_type value
) const
Parameters:
- value
Return: Vector4
function operator/
inline constexpr Vector4 operator/(
const value_type value
) const
Parameters:
- value
Return: Vector4
function operator+=
inline constexpr Vector4 & operator+=(
const Vector4 & v
)
Parameters:
- v
Return: Vector4&
function operator-=
inline constexpr Vector4 & operator-=(
const Vector4 & v
)
Parameters:
- v
Return: Vector4&
function operator*=
inline constexpr Vector4 & operator*=(
const value_type value
)
Parameters:
- value
Return: Vector4&
function operator/=
inline constexpr Vector4 & operator/=(
const value_type value
)
Parameters:
- value
Return: Vector4&
function operator[]
inline value_type & operator[](
const int index
)
Parameters:
- index
Return: value_type&
function operator[]
inline constexpr value_type operator[](
const int index
) const
Parameters:
- index
Return: constexpr value_type
function dot
static inline constexpr value_type dot(
const Vector4 & a,
const Vector4 & b
)
Parameters:
- a
- b
Return: constexpr value_type
function distance
static inline value_type distance(
const Vector4 & a,
const Vector4 & b
)
Parameters:
- a
- b
Return: value_type
function lerp
static inline constexpr Vector4 lerp(
const Vector4 & a,
const Vector4 & b,
const value_type t
)
Parameters:
- a
- b
- t
Return: constexpr Vector4
function zero
static inline constexpr Vector4 zero()
Return: Vector4
Public Attributes Documentation
variable x
value_type x;
variable y
value_type y;
variable z
value_type z;
variable w
value_type w;
Friends
friend operator*
friend constexpr friend Vector4 operator*(
Scaler s,
Vector4 v
);
Parameters:
- s
- v
Template Parameters:
- Scaler
Return: constexpr Vector4
Updated on 2024-05-28 at 06:55:40 +0000