Apollo 11.0
自动驾驶开放平台
apollo::planning::STPoint类 参考

#include <st_point.h>

类 apollo::planning::STPoint 继承关系图:
apollo::planning::STPoint 的协作图:

Public 成员函数

 STPoint ()=default
 
 STPoint (const double s, const double t)
 
 STPoint (const common::math::Vec2d &vec2d_point)
 
double x () const =delete
 
double y () const =delete
 
double s () const
 
double t () const
 
void set_s (const double s)
 
void set_t (const double t)
 
std::string DebugString () const
 
- Public 成员函数 继承自 apollo::common::math::Vec2d
constexpr Vec2d (const double x, const double y) noexcept
 Constructor which takes x- and y-coordinates.
 
constexpr Vec2d () noexcept
 Constructor returning the zero vector.
 
double x () const
 Getter for x component
 
double y () const
 Getter for y component
 
void set_x (const double x)
 Setter for x component
 
void set_y (const double y)
 Setter for y component
 
double Length () const
 Gets the length of the vector
 
double LengthSquare () const
 Gets the squared length of the vector
 
double Angle () const
 Gets the angle between the vector and the positive x semi-axis
 
void Normalize ()
 Returns the unit vector that is co-linear with this vector
 
double DistanceTo (const Vec2d &other) const
 Returns the distance to the given vector
 
double DistanceSquareTo (const Vec2d &other) const
 Returns the squared distance to the given vector
 
double CrossProd (const Vec2d &other) const
 Returns the "cross" product between these two Vec2d (non-standard).
 
double InnerProd (const Vec2d &other) const
 Returns the inner product between these two Vec2d.
 
Vec2d rotate (const double angle) const
 rotate the vector by angle.
 
void SelfRotate (const double angle)
 rotate the vector itself by angle.
 
Vec2d operator+ (const Vec2d &other) const
 Sums two Vec2d
 
Vec2d operator- (const Vec2d &other) const
 Subtracts two Vec2d
 
Vec2d operator* (const double ratio) const
 Multiplies Vec2d by a scalar
 
Vec2d operator/ (const double ratio) const
 Divides Vec2d by a scalar
 
Vec2d & operator+= (const Vec2d &other)
 Sums another Vec2d to the current one
 
Vec2d & operator-= (const Vec2d &other)
 Subtracts another Vec2d to the current one
 
Vec2d & operator*= (const double ratio)
 Multiplies this Vec2d by a scalar
 
Vec2d & operator/= (const double ratio)
 Divides this Vec2d by a scalar
 
bool operator== (const Vec2d &other) const
 Compares two Vec2d
 
std::string DebugString () const
 Returns a human-readable string representing this object
 

额外继承的成员函数

- 静态 Public 成员函数 继承自 apollo::common::math::Vec2d
static Vec2d CreateUnitVec2d (const double angle)
 Creates a unit-vector with a given angle to the positive x semi-axis
 
- Protected 属性 继承自 apollo::common::math::Vec2d
double x_ = 0.0
 
double y_ = 0.0
 

详细描述

在文件 st_point.h 第 30 行定义.

构造及析构函数说明

◆ STPoint() [1/3]

apollo::planning::STPoint::STPoint ( )
default

◆ STPoint() [2/3]

apollo::planning::STPoint::STPoint ( const double  s,
const double  t 
)

在文件 st_point.cc 第 30 行定义.

30: Vec2d(t, s) {}
constexpr Vec2d() noexcept
Constructor returning the zero vector.
Definition vec2d.h:48

◆ STPoint() [3/3]

apollo::planning::STPoint::STPoint ( const common::math::Vec2d &  vec2d_point)
explicit

在文件 st_point.cc 第 32 行定义.

32: Vec2d(vec2d_point) {}

成员函数说明

◆ DebugString()

std::string apollo::planning::STPoint::DebugString ( ) const

在文件 st_point.cc 第 42 行定义.

42 {
43 return StrFormat("{ \"s\" : %.6f, \"t\" : %.6f }", s(), t());
44}

◆ s()

double apollo::planning::STPoint::s ( ) const

在文件 st_point.cc 第 34 行定义.

34{ return y_; }

◆ set_s()

void apollo::planning::STPoint::set_s ( const double  s)

在文件 st_point.cc 第 38 行定义.

38{ y_ = s; }

◆ set_t()

void apollo::planning::STPoint::set_t ( const double  t)

在文件 st_point.cc 第 40 行定义.

40{ x_ = t; }

◆ t()

double apollo::planning::STPoint::t ( ) const

在文件 st_point.cc 第 36 行定义.

36{ return x_; }

◆ x()

double apollo::planning::STPoint::x ( ) const
delete

◆ y()

double apollo::planning::STPoint::y ( ) const
delete

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