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

Ray. 更多...

#include <APIMath.h>

Public 成员函数

 Ray ()
 
 Ray (const Vector3 &origin, const Vector3 &direction)
 
void setOrigin (const Vector3 &origin)
 
const Vector3getOrigin (void) const
 
void setDirection (const Vector3 &dir)
 
const Vector3getDirection (void) const
 
Vector3 getPoint (Real t) const
 
RayResult Intersect (const Vector3 &pos, const Vector3 &dir) const
 

Protected 属性

Vector3 mOrigin
 
Vector3 mDirection
 

详细描述

Ray.

作者
AnyCAD

构造及析构函数说明

AnyCAD::API::Ray::Ray ( )
AnyCAD::API::Ray::Ray ( const Vector3 origin,
const Vector3 direction 
)
inline

成员函数说明

const Vector3& AnyCAD::API::Ray::getDirection ( void  ) const
inline

Gets the direction of the ray.

const Vector3& AnyCAD::API::Ray::getOrigin ( void  ) const
inline

Gets the origin of the ray.

Vector3 AnyCAD::API::Ray::getPoint ( Real  t) const
inline

Gets the position of a point t units along the ray.

RayResult AnyCAD::API::Ray::Intersect ( const Vector3 pos,
const Vector3 dir 
) const

Gets the intersection point of the the ray and the plane.

参数
posthe plane position
dirthe plane direction.
返回
the hit information.
void AnyCAD::API::Ray::setDirection ( const Vector3 dir)
inline

Sets the direction of the ray.

void AnyCAD::API::Ray::setOrigin ( const Vector3 origin)
inline

Sets the origin of the ray.

类成员变量说明

Vector3 AnyCAD::API::Ray::mDirection
protected
Vector3 AnyCAD::API::Ray::mOrigin
protected

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