载入中...
搜索中...
未找到
eve::sensing::WorldPoint类 参考

Finite world-space point tagged as either World2D or World3D. 更多...

#include <Targeting.h>

Public 成员函数

 WorldPoint ()=default
 Constructs an invalid default point; use world2D/world3D for values.
 
CoordinateSpace space () const noexcept
 Returns the point coordinate space.
 
float x () const noexcept
 Returns the X coordinate in the tagged world space.
 
float y () const noexcept
 Returns the Y coordinate in the tagged world space.
 
float z () const noexcept
 Returns the Z coordinate; it is zero for World2D.
 
bool isValid () const noexcept
 Returns whether the point was constructed with finite coordinates.
 

静态 Public 成员函数

static Result< WorldPoint > world2D (float x, float y)
 Creates a finite 2D world point.
 
static Result< WorldPoint > world3D (float x, float y, float z)
 Creates a finite 3D world point.
 

友元

bool operator== (const WorldPoint &, const WorldPoint &) noexcept=default
 

详细描述

Finite world-space point tagged as either World2D or World3D.

Grid coordinates use GridPoint and cannot be passed as a WorldPoint. The constructors validate finite values and preserve the dimension tag.

在文件 Targeting.h 第 116 行定义.

构造及析构函数说明

◆ WorldPoint()

eve::sensing::WorldPoint::WorldPoint ( )
default

Constructs an invalid default point; use world2D/world3D for values.

被这些函数引用 world2D() , 以及 world3D().

成员函数说明

◆ isValid()

bool eve::sensing::WorldPoint::isValid ( ) const
inlinenoexcept

Returns whether the point was constructed with finite coordinates.

在文件 Targeting.h 第 142 行定义.

被这些函数引用 eve::sensing::WorldArea::cone2D().

◆ space()

CoordinateSpace eve::sensing::WorldPoint::space ( ) const
inlinenoexcept

Returns the point coordinate space.

在文件 Targeting.h 第 134 行定义.

被这些函数引用 eve::sensing::WorldArea::cone2D().

◆ world2D()

Result< WorldPoint > eve::sensing::WorldPoint::world2D ( float  x,
float  y 
)
static

Creates a finite 2D world point.

返回
A checked point or InvalidArgument.

在文件 Targeting.cpp 第 128 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Result< T >::success(), eve::sensing::World2D, WorldPoint(), x() , 以及 y().

被这些函数引用 eve::sensing::WorldArea::cone2D() , 以及 eve::sensing::SensingWorldCandidateProvider::query().

◆ world3D()

Result< WorldPoint > eve::sensing::WorldPoint::world3D ( float  x,
float  y,
float  z 
)
static

Creates a finite 3D world point.

返回
A checked point or InvalidArgument.

在文件 Targeting.cpp 第 135 行定义.

引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::InvalidArgument, eve::Result< T >::success(), eve::sensing::World3D, WorldPoint(), x(), y() , 以及 z().

◆ x()

float eve::sensing::WorldPoint::x ( ) const
inlinenoexcept

Returns the X coordinate in the tagged world space.

在文件 Targeting.h 第 136 行定义.

被这些函数引用 world2D() , 以及 world3D().

◆ y()

float eve::sensing::WorldPoint::y ( ) const
inlinenoexcept

Returns the Y coordinate in the tagged world space.

在文件 Targeting.h 第 138 行定义.

被这些函数引用 world2D() , 以及 world3D().

◆ z()

float eve::sensing::WorldPoint::z ( ) const
inlinenoexcept

Returns the Z coordinate; it is zero for World2D.

在文件 Targeting.h 第 140 行定义.

被这些函数引用 world3D().

友元及相关函数文档

◆ operator==

bool operator== ( const WorldPoint &  ,
const WorldPoint &   
)
friend

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