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

Detailed Description

Specification of a camera's intrinsic focal properties as focal length (in pixels).

One or both values can be given. When only one value is given, the other is assumed to match. At least one value must be provided.

#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 () const
 Reports focal length along x-axis. More...
 
double focal_y () const
 Resolves focal length along y-axis. More...
 

Public Attributes

std::optional< doublex
 If specified, the focal length along this axis; otherwise, use focal length in the y-direction. More...
 
std::optional< doubley
 If specified, the focal length along this axis; otherwise, use focal length in the x-direction. More...
 

Member Function Documentation

◆ focal_x()

double focal_x ( ) const

Reports focal length along x-axis.

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

◆ focal_y()

double focal_y ( ) const

Resolves focal length along y-axis.

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, the focal length along this axis; otherwise, use focal length in the y-direction.

◆ y

std::optional<double> y

If specified, the focal length along this axis; otherwise, use focal length in the x-direction.


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