载入中...
搜索中...
未找到
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
 
float getZ () const
 
void setX (float x)
 
void setY (float y)
 
void setZ (float z)
 
void set (float x, float y, float z)
 Sets all three components.
 
float length () const
 Magnitude (and squared magnitude).
 
float lengthSquared () const
 
void normalize ()
 Normalizes in place / returns a normalized copy.
 
Vec3normalized () const
 
float dot (const Vec3 *other) const
 Dot/cross product and distance.
 
Vec3cross (const Vec3 *other) const
 
float distanceTo (const Vec3 *other) const
 
Vec3add (const Vec3 *other) const
 Arithmetic helpers returning new (caller-owned) vectors.
 
Vec3sub (const Vec3 *other) const
 
Vec3scale (float s) const
 
Vec3lerpTo (const Vec3 *other, float t) const
 Linear interpolation to other at t in [0,1].
 
Vec3clone () const
 Copies this vector.
 

详细描述

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

在文件 Vec3.h8 行定义.

构造及析构函数说明

◆ 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.h12 行定义.

成员函数说明

◆ add()

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

Arithmetic helpers returning new (caller-owned) vectors.

在文件 Vec3.cpp43 行定义.

引用了 Vec3().

◆ clone()

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

Copies this vector.

在文件 Vec3.cpp61 行定义.

引用了 Vec3().

◆ cross()

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

在文件 Vec3.cpp29 行定义.

引用了 Vec3().

◆ distanceTo()

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

在文件 Vec3.cpp35 行定义.

◆ dot()

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

Dot/cross product and distance.

在文件 Vec3.cpp24 行定义.

◆ getX()

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

Component accessors.

在文件 Vec3.h15 行定义.

◆ getY()

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

在文件 Vec3.h16 行定义.

◆ getZ()

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

在文件 Vec3.h17 行定义.

◆ length()

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

Magnitude (and squared magnitude).

在文件 Vec3.h29 行定义.

被这些函数引用 normalize().

◆ lengthSquared()

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

在文件 Vec3.h30 行定义.

◆ lerpTo()

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

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

在文件 Vec3.cpp55 行定义.

引用了 Vec3().

◆ normalize()

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

Normalizes in place / returns a normalized copy.

在文件 Vec3.cpp9 行定义.

引用了 length().

◆ normalized()

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

在文件 Vec3.cpp18 行定义.

引用了 v , 以及 Vec3().

◆ scale()

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

在文件 Vec3.cpp53 行定义.

引用了 s , 以及 Vec3().

◆ set()

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

Sets all three components.

在文件 Vec3.h22 行定义.

引用了 x, y , 以及 z.

◆ setX()

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

在文件 Vec3.h18 行定义.

引用了 x.

◆ setY()

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

在文件 Vec3.h19 行定义.

引用了 y.

◆ setZ()

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

在文件 Vec3.h20 行定义.

引用了 z.

◆ sub()

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

在文件 Vec3.cpp48 行定义.

引用了 Vec3().


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