Drake
Drake C++ Documentation
Fields Class Reference

Detailed Description

Allows combination of BaseField and DescriptorType for a PointCloud.

You may combine multiple BaseFields, but you may have only zero or one DescriptorType.

This provides the mechanism to use basic bit-mask operators (| &) to combine / intersect fields for convenience.

#include <drake/perception/point_cloud_flags.h>

Public Member Functions

 Fields (BaseFieldT base_fields, DescriptorType descriptor_type)
 
 Fields (BaseFieldT base_fields)
 
 Fields (const DescriptorType &descriptor_type)
 
BaseFieldT base_fields () const
 Returns the contained base fields. More...
 
bool has_base_fields () const
 Returns whether there are any base fields contained by this set of fields. More...
 
const DescriptorTypedescriptor_type () const
 Returns the contained descriptor type. More...
 
bool has_descriptor () const
 Returns whether there is a descriptor contained by this set of fields. More...
 
Fieldsoperator|= (const Fields &rhs)
 Provides in-place union. More...
 
Fields operator| (const Fields &rhs) const
 Provides union. More...
 
Fieldsoperator&= (const Fields &rhs)
 Provides in-place intersection. More...
 
Fields operator & (const Fields &rhs) const
 Provides intersection. More...
 
bool empty () const
 Returns whether both value types (BaseField + DescriptorType) are none. More...
 
bool contains (const Fields &rhs) const
 Returns whether this set of fields contains (is a superset of) rhs. More...
 
bool operator== (const Fields &rhs) const
 
bool operator!= (const Fields &rhs) const
 
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 Fields (const Fields &)=default
 
Fieldsoperator= (const Fields &)=default
 
 Fields (Fields &&)=default
 
Fieldsoperator= (Fields &&)=default
 

Friends

std::ostream & operator<< (std::ostream &os, const Fields &rhs)
 Provides human-readable output. More...
 

Constructor & Destructor Documentation

◆ Fields() [1/5]

Fields ( const Fields )
default

◆ Fields() [2/5]

Fields ( Fields &&  )
default

◆ Fields() [3/5]

Fields ( BaseFieldT  base_fields,
DescriptorType  descriptor_type 
)
Exceptions
std::exceptionif base_fields is not composed of valid BaseFields.

◆ Fields() [4/5]

Fields ( BaseFieldT  base_fields)
Exceptions
std::exceptionif base_fields is not composed of valid BaseFields.

◆ Fields() [5/5]

Fields ( const DescriptorType descriptor_type)

Member Function Documentation

◆ base_fields()

BaseFieldT base_fields ( ) const

Returns the contained base fields.

◆ contains()

bool contains ( const Fields rhs) const

Returns whether this set of fields contains (is a superset of) rhs.

◆ descriptor_type()

const DescriptorType& descriptor_type ( ) const

Returns the contained descriptor type.

◆ empty()

bool empty ( ) const

Returns whether both value types (BaseField + DescriptorType) are none.

◆ has_base_fields()

bool has_base_fields ( ) const

Returns whether there are any base fields contained by this set of fields.

◆ has_descriptor()

bool has_descriptor ( ) const

Returns whether there is a descriptor contained by this set of fields.

◆ operator &()

Fields operator & ( const Fields rhs) const

Provides intersection.

◆ operator!=()

bool operator!= ( const Fields rhs) const

◆ operator&=()

Fields& operator&= ( const Fields rhs)

Provides in-place intersection.

◆ operator=() [1/2]

Fields& operator= ( Fields &&  )
default

◆ operator=() [2/2]

Fields& operator= ( const Fields )
default

◆ operator==()

bool operator== ( const Fields rhs) const

◆ operator|()

Fields operator| ( const Fields rhs) const

Provides union.

See also
operator|= for preconditions.

◆ operator|=()

Fields& operator|= ( const Fields rhs)

Provides in-place union.

Exceptions
std::exceptionif multiple non-None DescriptorTypes are specified.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const Fields rhs 
)
friend

Provides human-readable output.


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