Android-cuttlefish cvd tool
Public Member Functions | Protected Attributes | Friends | List of all members
teeui::ConvexObject< capacity > Class Template Reference

#include <utils.h>

Collaboration diagram for teeui::ConvexObject< capacity >:
Collaboration graph
[legend]

Public Member Functions

 ConvexObject ()
 
constexpr ConvexObject (std::initializer_list< PxPoint > l)
 
 ConvexObject (const ConvexObject &other)=default
 
 ConvexObject (ConvexObject &&other)=default
 
ConvexObjectoperator= (const ConvexObject &other)=default
 
ConvexObjectoperator= (ConvexObject &&other)=default
 
constexpr size_t size () const
 
constexpr const PxPointbegin () const
 
constexpr const PxPointend () const
 
template<size_t result_cap>
optional< ConvexObject< result_cap > > intersect (const PxPoint &A, const PxPoint &B) const
 
template<size_t result_cap, size_t arg_cap>
optional< ConvexObject< result_cap > > intersect (const ConvexObject< arg_cap > &other) const
 
template<size_t result_cap>
optional< ConvexObject< result_cap > > intersect (const PxPoint *begin, const PxPoint *end) const
 
pxs area () const
 
void push_back (const PxPoint &p)
 

Protected Attributes

PxPoint points_ [capacity]
 
size_t fill_
 

Friends

template<size_t other_cap>
class ConvexObject
 

Detailed Description

template<size_t capacity>
class teeui::ConvexObject< capacity >

A ConvexObject is given by a list of 2D vertexes. Each vertex must lie on the positive half-plane of the line denoted by its two predecessors. A point is considered inside of the convex object if it is on the positive half-plane of all lines given by any two subsequent vertexes.

ConvexObjects have fixed size given by the capacity template argument. The geometric object that they describe may have any number of vertexes between 3 and capacity.

Constructor & Destructor Documentation

◆ ConvexObject() [1/4]

template<size_t capacity>
teeui::ConvexObject< capacity >::ConvexObject ( )
inline

◆ ConvexObject() [2/4]

template<size_t capacity>
constexpr teeui::ConvexObject< capacity >::ConvexObject ( std::initializer_list< PxPoint l)
inlineexplicitconstexpr

◆ ConvexObject() [3/4]

template<size_t capacity>
teeui::ConvexObject< capacity >::ConvexObject ( const ConvexObject< capacity > &  other)
default

◆ ConvexObject() [4/4]

template<size_t capacity>
teeui::ConvexObject< capacity >::ConvexObject ( ConvexObject< capacity > &&  other)
default

Member Function Documentation

◆ area()

template<size_t capacity>
pxs teeui::ConvexObject< capacity >::area ( ) const
inline

◆ begin()

template<size_t capacity>
constexpr const PxPoint * teeui::ConvexObject< capacity >::begin ( ) const
inlineconstexpr

◆ end()

template<size_t capacity>
constexpr const PxPoint * teeui::ConvexObject< capacity >::end ( ) const
inlineconstexpr

◆ intersect() [1/3]

template<size_t capacity>
template<size_t result_cap, size_t arg_cap>
optional< ConvexObject< result_cap > > teeui::ConvexObject< capacity >::intersect ( const ConvexObject< arg_cap > &  other) const
inline

◆ intersect() [2/3]

template<size_t capacity>
template<size_t result_cap>
optional< ConvexObject< result_cap > > teeui::ConvexObject< capacity >::intersect ( const PxPoint A,
const PxPoint B 
) const
inline

◆ intersect() [3/3]

template<size_t capacity>
template<size_t result_cap>
optional< ConvexObject< result_cap > > teeui::ConvexObject< capacity >::intersect ( const PxPoint begin,
const PxPoint end 
) const
inline

◆ operator=() [1/2]

template<size_t capacity>
ConvexObject & teeui::ConvexObject< capacity >::operator= ( const ConvexObject< capacity > &  other)
default

◆ operator=() [2/2]

template<size_t capacity>
ConvexObject & teeui::ConvexObject< capacity >::operator= ( ConvexObject< capacity > &&  other)
default

◆ push_back()

template<size_t capacity>
void teeui::ConvexObject< capacity >::push_back ( const PxPoint p)
inline

◆ size()

template<size_t capacity>
constexpr size_t teeui::ConvexObject< capacity >::size ( ) const
inlineconstexpr

Friends And Related Function Documentation

◆ ConvexObject

template<size_t capacity>
template<size_t other_cap>
friend class ConvexObject
friend

Member Data Documentation

◆ fill_

template<size_t capacity>
size_t teeui::ConvexObject< capacity >::fill_
protected

◆ points_

template<size_t capacity>
PxPoint teeui::ConvexObject< capacity >::points_[capacity]
protected

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