Drake
Drake C++ Documentation
CameraConfig::FovDegrees Struct Reference

Detailed Description

Specification of focal length via fields of view (in degrees).

#include <drake/systems/sensors/camera_config.h>

Public Member Functions

template<typename Archive >
void Serialize (Archive *a)
 Passes this object to an Archive. More...
 
void ValidateOrThrow () const
 
double focal_x (int width, int height) const
 Resolves focal length along x-axis based on image dimensions and defined value for x and/or y. More...
 
double focal_y (int width, int height) const
 Resolves focal length along y-axis based on image dimensions and defined value for y and/or x. More...
 

Public Attributes

std::optional< doublex
 If specified, compute focal length along this axis; otherwise, use focal length given computation for y. More...
 
std::optional< doubley
 If specified, compute focal length along this axis; otherwise, use focal length given computation for x. More...
 

Member Function Documentation

◆ focal_x()

double focal_x ( int  width,
int  height 
) const

Resolves focal length along x-axis based on image dimensions and defined value for x and/or y.

Exceptions
std::exceptionif both x and y are null.

◆ focal_y()

double focal_y ( int  width,
int  height 
) const

Resolves focal length along y-axis based on image dimensions and defined value for y and/or x.

Exceptions
std::exceptionif both x and y are null.

◆ Serialize()

void Serialize ( Archive *  a)

Passes this object to an Archive.

Refer to YAML Serialization for background.

◆ ValidateOrThrow()

void ValidateOrThrow ( ) const

Member Data Documentation

◆ x

std::optional<double> x

If specified, compute focal length along this axis; otherwise, use focal length given computation for y.

◆ y

std::optional<double> y

If specified, compute focal length along this axis; otherwise, use focal length given computation for x.


The documentation for this struct was generated from the following file: