delphyne
|
Specializes BasicVector with specific getters and setters.
#include <src/gen/simple_car_state.h>
Public Types | |
typedef SimpleCarStateIndices | K |
An abbreviation for our row index constants. More... | |
Public Member Functions | |
SimpleCarState () | |
Default constructor. More... | |
Implements CopyConstructible, CopyAssignable, MoveConstructible, | |
MoveAssignable | |
SimpleCarState (const SimpleCarState &other) | |
SimpleCarState (SimpleCarState &&other) noexcept | |
SimpleCarState & | operator= (const SimpleCarState &other) |
SimpleCarState & | operator= (SimpleCarState &&other) noexcept |
template<typename U = T> | |
std::enable_if< std::is_same< U, drake::symbolic::Expression >::value >::type | SetToNamedVariables () |
Create a drake::symbolic::Variable for each element with the known variable name. More... | |
SimpleCarState< T > * | DoClone () const final |
Getters and Setters | |
const T & | x () const |
x More... | |
void | set_x (const T &x) |
Setter that matches x(). More... | |
DRAKE_VECTOR_GEN_NODISCARD SimpleCarState< T > | with_x (const T &x) const |
Fluent setter that matches x(). More... | |
const T & | y () const |
y More... | |
void | set_y (const T &y) |
Setter that matches y(). More... | |
DRAKE_VECTOR_GEN_NODISCARD SimpleCarState< T > | with_y (const T &y) const |
Fluent setter that matches y(). More... | |
const T & | heading () const |
heading More... | |
void | set_heading (const T &heading) |
Setter that matches heading(). More... | |
DRAKE_VECTOR_GEN_NODISCARD SimpleCarState< T > | with_heading (const T &heading) const |
Fluent setter that matches heading(). More... | |
const T & | velocity () const |
velocity More... | |
void | set_velocity (const T &velocity) |
Setter that matches velocity(). More... | |
DRAKE_VECTOR_GEN_NODISCARD SimpleCarState< T > | with_velocity (const T &velocity) const |
Fluent setter that matches velocity(). More... | |
drake::boolean< T > | IsValid () const |
Returns whether the current values of this vector are well-formed. More... | |
static const std::vector< std::string > & | GetCoordinateNames () |
See SimpleCarStateIndices::GetCoordinateNames(). More... | |
typedef SimpleCarStateIndices K |
An abbreviation for our row index constants.
SimpleCarState | ( | ) |
Default constructor.
Sets all rows to their default value:
x
defaults to 0.0 with unknown units. y
defaults to 0.0 with unknown units. heading
defaults to 0.0 with unknown units. velocity
defaults to 0.0 with unknown units. SimpleCarState | ( | const SimpleCarState< T > & | other | ) |
|
noexcept |
|
final |
|
static |
const T& heading | ( | ) | const |
heading
drake::boolean<T> IsValid | ( | ) | const |
Returns whether the current values of this vector are well-formed.
SimpleCarState& operator= | ( | const SimpleCarState< T > & | other | ) |
|
noexcept |
void set_heading | ( | const T & | heading | ) |
Setter that matches heading().
void set_velocity | ( | const T & | velocity | ) |
Setter that matches velocity().
void set_x | ( | const T & | x | ) |
Setter that matches x().
void set_y | ( | const T & | y | ) |
Setter that matches y().
std::enable_if<std::is_same<U, drake::symbolic::Expression>::value>::type SetToNamedVariables | ( | ) |
Create a drake::symbolic::Variable for each element with the known variable name.
This is only available for T == drake::symbolic::Expression.
const T& velocity | ( | ) | const |
velocity
DRAKE_VECTOR_GEN_NODISCARD SimpleCarState<T> with_heading | ( | const T & | heading | ) | const |
Fluent setter that matches heading().
Returns a copy of this
with heading set to a new value.
DRAKE_VECTOR_GEN_NODISCARD SimpleCarState<T> with_velocity | ( | const T & | velocity | ) | const |
Fluent setter that matches velocity().
Returns a copy of this
with velocity set to a new value.
DRAKE_VECTOR_GEN_NODISCARD SimpleCarState<T> with_x | ( | const T & | x | ) | const |
Fluent setter that matches x().
Returns a copy of this
with x set to a new value.
DRAKE_VECTOR_GEN_NODISCARD SimpleCarState<T> with_y | ( | const T & | y | ) | const |
Fluent setter that matches y().
Returns a copy of this
with y set to a new value.
const T& x | ( | ) | const |
x
const T& y | ( | ) | const |
y