Drake
Drake C++ Documentation
Loading...
Searching...
No Matches
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.
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.
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.

Public Attributes

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

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()

template<typename Archive>
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: