载入中...
搜索中...
未找到
eve::math::Vec3类 参考

3D float vector (script-facing math module value). 更多...

#include <Vec3.h>

Public 成员函数

 Vec3 ()=default
 
 Vec3 (float x, float y, float z)
 Creates a vector from components.
 
float getX () const
 Component accessors.
 
float getY () const
 Y component.
 
float getZ () const
 Z component.
 
void setX (float x)
 Sets the X component.
 
void setY (float y)
 Sets the Y component.
 
void setZ (float z)
 Sets the Z component.
 
void set (float x, float y, float z)
 Sets all three components.
 
float length () const
 Magnitude (and squared magnitude).
 
float lengthSquared () const
 Squared Euclidean magnitude.
 
void normalize ()
 Normalizes in place / returns a normalized copy.
 
Vec3 * normalized () const
 
float dot (const Vec3 *other) const
 Dot/cross product and distance.
 
Vec3 * cross (const Vec3 *other) const
 
float distanceTo (const Vec3 *other) const
 Euclidean distance to other.
 
Vec3 * add (const Vec3 *other) const
 Arithmetic helpers returning new (caller-owned) vectors.
 
Vec3 * sub (const Vec3 *other) const
 
Vec3 * scale (float s) const
 
Vec3 * lerpTo (const Vec3 *other, float t) const
 Linear interpolation to other at t in [0,1].
 
Vec3 * clone () const
 Copies this vector.
 

详细描述

3D float vector (script-facing math module value).

在文件 Vec3.h 第 10 行定义.

构造及析构函数说明

◆ Vec3() [1/2]

eve::math::Vec3::Vec3 ( )
default

被这些函数引用 add(), clone(), cross(), lerpTo(), normalized(), scale() , 以及 sub().

◆ Vec3() [2/2]

eve::math::Vec3::Vec3 ( float  x,
float  y,
float  z 
)
inline

Creates a vector from components.

在文件 Vec3.h 第 14 行定义.

成员函数说明

◆ add()

Vec3 * eve::math::Vec3::add ( const Vec3 *  other) const

Arithmetic helpers returning new (caller-owned) vectors.

在文件 Vec3.cpp 第 43 行定义.

引用了 Vec3().

◆ clone()

Vec3 * eve::math::Vec3::clone ( ) const

Copies this vector.

在文件 Vec3.cpp 第 61 行定义.

引用了 Vec3().

◆ cross()

Vec3 * eve::math::Vec3::cross ( const Vec3 *  other) const

在文件 Vec3.cpp 第 29 行定义.

引用了 Vec3().

◆ distanceTo()

float eve::math::Vec3::distanceTo ( const Vec3 *  other) const

Euclidean distance to other.

在文件 Vec3.cpp 第 35 行定义.

引用了 dx, dy , 以及 dz.

◆ dot()

float eve::math::Vec3::dot ( const Vec3 *  other) const

Dot/cross product and distance.

在文件 Vec3.cpp 第 24 行定义.

◆ getX()

float eve::math::Vec3::getX ( ) const
inline

Component accessors.

在文件 Vec3.h 第 17 行定义.

◆ getY()

float eve::math::Vec3::getY ( ) const
inline

Y component.

在文件 Vec3.h 第 19 行定义.

◆ getZ()

float eve::math::Vec3::getZ ( ) const
inline

Z component.

在文件 Vec3.h 第 21 行定义.

◆ length()

float eve::math::Vec3::length ( ) const
inline

Magnitude (and squared magnitude).

在文件 Vec3.h 第 36 行定义.

被这些函数引用 normalize().

◆ lengthSquared()

float eve::math::Vec3::lengthSquared ( ) const
inline

Squared Euclidean magnitude.

在文件 Vec3.h 第 38 行定义.

◆ lerpTo()

Vec3 * eve::math::Vec3::lerpTo ( const Vec3 *  other,
float  t 
) const

Linear interpolation to other at t in [0,1].

在文件 Vec3.cpp 第 55 行定义.

引用了 t , 以及 Vec3().

◆ normalize()

void eve::math::Vec3::normalize ( )

Normalizes in place / returns a normalized copy.

在文件 Vec3.cpp 第 9 行定义.

引用了 length().

◆ normalized()

Vec3 * eve::math::Vec3::normalized ( ) const

在文件 Vec3.cpp 第 18 行定义.

引用了 v , 以及 Vec3().

◆ scale()

Vec3 * eve::math::Vec3::scale ( float  s) const

在文件 Vec3.cpp 第 53 行定义.

引用了 s , 以及 Vec3().

◆ set()

void eve::math::Vec3::set ( float  x,
float  y,
float  z 
)
inline

Sets all three components.

在文件 Vec3.h 第 29 行定义.

引用了 x, y , 以及 z.

◆ setX()

void eve::math::Vec3::setX ( float  x)
inline

Sets the X component.

在文件 Vec3.h 第 23 行定义.

引用了 x.

◆ setY()

void eve::math::Vec3::setY ( float  y)
inline

Sets the Y component.

在文件 Vec3.h 第 25 行定义.

引用了 y.

◆ setZ()

void eve::math::Vec3::setZ ( float  z)
inline

Sets the Z component.

在文件 Vec3.h 第 27 行定义.

引用了 z.

◆ sub()

Vec3 * eve::math::Vec3::sub ( const Vec3 *  other) const

在文件 Vec3.cpp 第 48 行定义.

引用了 Vec3().


该类的文档由以下文件生成: