ADORe
ADORe is a modular open source software library and toolkit for decision making, planning, control and simulation of automated vehicles
adore::mad::BoundingVolumes::OBB3d Class Reference

#include <boundingvolumes.h>

Collaboration diagram for adore::mad::BoundingVolumes::OBB3d:
Collaboration graph

Public Types

typedef boost::geometry::model::point< float, 3, boost::geometry::cs::cartesian > boost_point
 
typedef boost::geometry::model::box< boost_pointboost_box
 

Public Member Functions

 OBB3d ()
 
 OBB3d (OBB3d *other)
 
 OBB3d (float *values)
 
void setData (float *values)
 
void resetTransformation ()
 
void transform_forwards (float cos_psi, float sin_psi, float dx, float dy, float dz)
 
bool isCollisionFree (OBB3d *other)
 
bool isPointInside (float x, float y, float z)
 
void rotateZ (float cos, float sin, int istart=0)
 
void translate (float *t)
 
float * getData ()
 
void getPoint (float d1, float d2, float d3, float *value)
 
boost_box getAABox ()
 
void set_obb (float cx, float cy, float psi, float ac, float bd, float w, float zmin, float zmax)
 
void bound_points2d (float *pL, float *pR, float zmin, float zmax, int count)
 
void mean (float *x, int n, float &xm)
 
void projected_interval (float *x, float *y, int n, float bx, float by, float cx, float cy, float &bxmin, float &bxmax)
 
void bound_points3d (int n0, int n1, float *x0, float *x1, float *y0, float *y1, float z0, float z1)
 

Private Attributes

float v [12]
 
float v_backup [12]
 

Detailed Description

A three-dimensional, oriented bounding box

Member Typedef Documentation

◆ boost_box

typedef boost::geometry::model::box<boost_point> adore::mad::BoundingVolumes::OBB3d::boost_box

◆ boost_point

typedef boost::geometry::model::point<float,3,boost::geometry::cs::cartesian> adore::mad::BoundingVolumes::OBB3d::boost_point

Constructor & Destructor Documentation

◆ OBB3d() [1/3]

adore::mad::BoundingVolumes::OBB3d::OBB3d ( )
inline

◆ OBB3d() [2/3]

adore::mad::BoundingVolumes::OBB3d::OBB3d ( OBB3d other)
inline

copy constructor

Here is the call graph for this function:

◆ OBB3d() [3/3]

adore::mad::BoundingVolumes::OBB3d::OBB3d ( float *  values)
inline

construct from a float array of length 12

Here is the call graph for this function:

Member Function Documentation

◆ bound_points2d()

void adore::mad::BoundingVolumes::OBB3d::bound_points2d ( float *  pL,
float *  pR,
float  zmin,
float  zmax,
int  count 
)
inline

bound an object, which is described by a set of points on its left and right side left and right side are descriminated in order to find main axis for orientation of OBB

Here is the call graph for this function:

◆ bound_points3d()

void adore::mad::BoundingVolumes::OBB3d::bound_points3d ( int  n0,
int  n1,
float *  x0,
float *  x1,
float *  y0,
float *  y1,
float  z0,
float  z1 
)
inline

Bound two flat point clouds S0 and S1, which are located at the z position z0 and z1, by a parallelotope. S0 has n0 2d points in x and y, S1 has n1 2d points in x and y. The purpose of this function is to bound the straight line paths of all points in S0 to their counterparts in S1 over time (z).

Here is the call graph for this function:

◆ getAABox()

boost_box adore::mad::BoundingVolumes::OBB3d::getAABox ( )
inline

compute an axis aligned box containing the OBB3d

Here is the call graph for this function:

◆ getData()

float* adore::mad::BoundingVolumes::OBB3d::getData ( )
inline
Here is the caller graph for this function:

◆ getPoint()

void adore::mad::BoundingVolumes::OBB3d::getPoint ( float  d1,
float  d2,
float  d3,
float *  value 
)
inline

compute a point by traveling along the edges of the OBB3d, starting at corner

◆ isCollisionFree()

bool adore::mad::BoundingVolumes::OBB3d::isCollisionFree ( OBB3d other)
inline

Test whether two OBB3d overlap

Parameters
otherobject to be tested against this
Returns
true if this and other do not intersect
Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPointInside()

bool adore::mad::BoundingVolumes::OBB3d::isPointInside ( float  x,
float  y,
float  z 
)
inline

Test whether OBB3d contains a point

Returns
true if x,y,z is inside this

◆ mean()

void adore::mad::BoundingVolumes::OBB3d::mean ( float *  x,
int  n,
float &  xm 
)
inline

computes the mean of n values in one dimension

Here is the caller graph for this function:

◆ projected_interval()

void adore::mad::BoundingVolumes::OBB3d::projected_interval ( float *  x,
float *  y,
int  n,
float  bx,
float  by,
float  cx,
float  cy,
float &  bxmin,
float &  bxmax 
)
inline

computes the interval of the projection of a set of 2d points relative to a vector c unto a base vector b

Here is the caller graph for this function:

◆ resetTransformation()

void adore::mad::BoundingVolumes::OBB3d::resetTransformation ( )
inline

removes all previously applied transformations from v by resetting to v_backup

Here is the caller graph for this function:

◆ rotateZ()

void adore::mad::BoundingVolumes::OBB3d::rotateZ ( float  cos,
float  sin,
int  istart = 0 
)
inline

rotate OBB3d around z

Here is the call graph for this function:
Here is the caller graph for this function:

◆ set_obb()

void adore::mad::BoundingVolumes::OBB3d::set_obb ( float  cx,
float  cy,
float  psi,
float  ac,
float  bd,
float  w,
float  zmin,
float  zmax 
)
inline

sets the oriented bounding box from position, orientation and dimension information

Here is the call graph for this function:

◆ setData()

void adore::mad::BoundingVolumes::OBB3d::setData ( float *  values)
inline

reset with a float array of length 12

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transform_forwards()

void adore::mad::BoundingVolumes::OBB3d::transform_forwards ( float  cos_psi,
float  sin_psi,
float  dx,
float  dy,
float  dz 
)
inline

rotate OBB3d by angle psi around z and shift by dx, dy, dz

Here is the caller graph for this function:

◆ translate()

void adore::mad::BoundingVolumes::OBB3d::translate ( float *  t)
inline

translate the obb by dx=t[0], dy=t[1], dz=t[2]

Here is the caller graph for this function:

Member Data Documentation

◆ v

float adore::mad::BoundingVolumes::OBB3d::v[12]
private

v\in \mathbb{R}^{3x4}, v=[c,e0,e1,e2], with c corner point, e_{0..2} edges of the box

◆ v_backup

float adore::mad::BoundingVolumes::OBB3d::v_backup[12]
private

buffer space for v, contains original/untransformed version of v


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