maliput_sparse
RoadGeometryBuilder Class Referencefinal

Detailed Description

Builder class for maliput::api::RoadGeometry.

#include <include/maliput_sparse/builder/builder.h>

Public Member Functions

 RoadGeometryBuilder ()=default
 Construct a new RoadGeometry Builder object. More...
 
RoadGeometryBuilderId (const maliput::api::RoadGeometryId &road_geometry_id)
 Sets the maliput::api::RoadGeometryId of the maliput::api::RoadGeometry. More...
 
RoadGeometryBuilderLinearTolerance (double linear_tolerance)
 Sets the linear tolerance of the maliput::api::RoadGeometry. More...
 
RoadGeometryBuilderAngularTolerance (double angular_tolerance)
 Sets the angular tolerance of the maliput::api::RoadGeometry. More...
 
RoadGeometryBuilderScaleLength (double scale_length)
 Sets the scale length of the maliput::api::RoadGeometry. More...
 
RoadGeometryBuilderInertialToBackendFrameTranslation (const maliput::math::Vector3 &translation)
 Sets the initial to backend frame translation vector of the maliput::api::RoadGeometry. More...
 
JunctionBuilder StartJunction ()
 Starts the Junction builder for this RoadGeometry. More...
 
BranchPointBuilder StartBranchPoints ()
 Starts the BranchPoint builder for this RoadGeometry. More...
 
std::unique_ptr< maliput::api::RoadGeometry > Build ()
 Builds a maliput::api::RoadGeometry. More...
 
void SetJunction (maliput::common::Passkey< JunctionBuilder >, std::unique_ptr< maliput::geometry_base::Junction > junction)
 Sets a maliput::geometry_base::Junction into this builder to fill in the RoadGeometry. More...
 
void SetBranchPoints (maliput::common::Passkey< BranchPointBuilder >, std::vector< std::unique_ptr< maliput::geometry_base::BranchPoint >> &&branch_points)
 
std::unordered_map< maliput::api::LaneId, const maliput::geometry_base::Lane * > GetLanes (maliput::common::Passkey< BranchPointBuilder >) const
 
double linear_tolerance (maliput::common::Passkey< LaneGeometryBuilder >) const
 Getter for LaneGeometry of linear_tolerance. More...
 
double scale_length (maliput::common::Passkey< LaneGeometryBuilder >) const
 Getter for LaneGeometry of scale_length. More...
 

Constructor & Destructor Documentation

◆ RoadGeometryBuilder()

RoadGeometryBuilder ( )
default

Construct a new RoadGeometry Builder object.

Member Function Documentation

◆ AngularTolerance()

RoadGeometryBuilder & AngularTolerance ( double  angular_tolerance)

Sets the angular tolerance of the maliput::api::RoadGeometry.

Parameters
angular_toleranceThe angular tolerance of the maliput::api::RoadGeometry. It must be positive.
Returns
A reference to this RoadGeometryBuilder.

◆ Build()

std::unique_ptr< maliput::api::RoadGeometry > Build ( )

Builds a maliput::api::RoadGeometry.

The underlying type of the RoadGeometry is maliput_sparse::RoadGeometry which is derived from maliput::geometry_base::RoadGeometry.

Exceptions
maliput::common::assertion_errorWhen there is no Junction to add to the RoadGeometry.
maliput::common::assertion_errorWhen there is no BranchPoint to add to the RoadGeometry.
Returns
A std::unique_ptr<maliput::api::RoadGeometry>.

◆ GetLanes()

std::unordered_map< maliput::api::LaneId, const maliput::geometry_base::Lane * > GetLanes ( maliput::common::Passkey< BranchPointBuilder ) const

◆ Id()

RoadGeometryBuilder & Id ( const maliput::api::RoadGeometryId &  road_geometry_id)

Sets the maliput::api::RoadGeometryId of the maliput::api::RoadGeometry.

Parameters
road_geometry_idThe maliput::api::RoadGeometryId.
Returns
A reference to this RoadGeometryBuilder.

◆ InertialToBackendFrameTranslation()

RoadGeometryBuilder & InertialToBackendFrameTranslation ( const maliput::math::Vector3 &  translation)

Sets the initial to backend frame translation vector of the maliput::api::RoadGeometry.

Parameters
translationThe initial to backend frame translation vector of the maliput::api::RoadGeometry.
Returns
A reference to this RoadGeometryBuilder.

◆ linear_tolerance()

double linear_tolerance ( maliput::common::Passkey< LaneGeometryBuilder ) const

Getter for LaneGeometry of linear_tolerance.

See also
maliput::common::Passkey class description for further details.
Returns
The linear_tolerance.

◆ LinearTolerance()

RoadGeometryBuilder & LinearTolerance ( double  linear_tolerance)

Sets the linear tolerance of the maliput::api::RoadGeometry.

Parameters
linear_toleranceThe linear tolerance of the maliput::api::RoadGeometry. It must be positive.
Returns
A reference to this RoadGeometryBuilder.

◆ scale_length()

double scale_length ( maliput::common::Passkey< LaneGeometryBuilder ) const

Getter for LaneGeometry of scale_length.

See also
maliput::common::Passkey class description for further details.
Returns
The scale_length.

◆ ScaleLength()

RoadGeometryBuilder & ScaleLength ( double  scale_length)

Sets the scale length of the maliput::api::RoadGeometry.

Parameters
scale_lengthThe scale length of the maliput::api::RoadGeometry. It must be positive.
Returns
A reference to this RoadGeometryBuilder.

◆ SetBranchPoints()

void SetBranchPoints ( maliput::common::Passkey< BranchPointBuilder ,
std::vector< std::unique_ptr< maliput::geometry_base::BranchPoint >> &&  branch_points 
)

◆ SetJunction()

void SetJunction ( maliput::common::Passkey< JunctionBuilder ,
std::unique_ptr< maliput::geometry_base::Junction >  junction 
)

Sets a maliput::geometry_base::Junction into this builder to fill in the RoadGeometry.

This method is only intended to be called by JunctionBuilder instances.

See also
maliput::common::Passkey class description for further details.
Parameters
junctionA junction to be stored into the RoadGeometry. It must not be nullptr.
Exceptions
maliput::common::assertion_errorWhen junction is nullptr.

◆ StartBranchPoints()

BranchPointBuilder StartBranchPoints ( )

Starts the BranchPoint builder for this RoadGeometry.

Returns
A BranchPointBuilder.

◆ StartJunction()

JunctionBuilder StartJunction ( )

Starts the Junction builder for this RoadGeometry.

Returns
A JunctionBuilder.

The documentation for this class was generated from the following files: