AnyCAD C++ API  2018
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义 
Public 成员函数 | Public 属性 | 静态 Public 属性 | 所有成员列表
AnyCAD::API::Vector3类 参考

Point or vector. 更多...

#include <APIMath.h>

Public 成员函数

 Vector3 ()
 
 Vector3 (Real _x, Real _y, Real _z)
 
Vector3 operator- (const Vector3 &rhv) const
 
Vector3 operator+ (const Vector3 &rhv) const
 
Vector3 operator* (const Vector3 &rhv) const
 
Vector3 operator* (Real vv) const
 
Vector3 operator/ (Real vv) const
 
Real length () const
 
Real distance (const Vector3 &pt) const
 
Real dotProduct (const Vector3 &pt) const
 
Real normalize ()
 
Vector3 crossProduct (const Vector3 &pt) const
 
Real angleBetween (const Vector3 &vv) const
 
Vector3 angleBetweenZUp (Real angleZ) const
 

Public 属性

Real x
 
Real y
 
Real z
 

静态 Public 属性

static const Vector3 ZERO
 
static const Vector3 UNIT_X
 
static const Vector3 UNIT_Y
 
static const Vector3 UNIT_Z
 

详细描述

Point or vector.

作者
AnyCAD

构造及析构函数说明

AnyCAD::API::Vector3::Vector3 ( )
inline
AnyCAD::API::Vector3::Vector3 ( Real  _x,
Real  _y,
Real  _z 
)
inline

成员函数说明

Real AnyCAD::API::Vector3::angleBetween ( const Vector3 vv) const

the angle between two vectors

Vector3 AnyCAD::API::Vector3::angleBetweenZUp ( Real  angleZ) const

the angle between up

参数
angleZthe angle rotate around z axis
Vector3 AnyCAD::API::Vector3::crossProduct ( const Vector3 pt) const

the cross product of the two points

Real AnyCAD::API::Vector3::distance ( const Vector3 pt) const

the distance between two points

Real AnyCAD::API::Vector3::dotProduct ( const Vector3 pt) const

the dot product of the two points

Real AnyCAD::API::Vector3::length ( ) const

the length of the vector

Real AnyCAD::API::Vector3::normalize ( )

normalize the vector to be UNIT vector, return the original length

Vector3 AnyCAD::API::Vector3::operator* ( const Vector3 rhv) const
inline

a * b

Vector3 AnyCAD::API::Vector3::operator* ( Real  vv) const
inline

a * int

Vector3 AnyCAD::API::Vector3::operator+ ( const Vector3 rhv) const
inline

a + b

Vector3 AnyCAD::API::Vector3::operator- ( const Vector3 rhv) const
inline

a - b

Vector3 AnyCAD::API::Vector3::operator/ ( Real  vv) const
inline

a / int

类成员变量说明

const Vector3 AnyCAD::API::Vector3::UNIT_X
static
const Vector3 AnyCAD::API::Vector3::UNIT_Y
static
const Vector3 AnyCAD::API::Vector3::UNIT_Z
static
Real AnyCAD::API::Vector3::x
Real AnyCAD::API::Vector3::y
Real AnyCAD::API::Vector3::z
const Vector3 AnyCAD::API::Vector3::ZERO
static

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