mf
Media Framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
mf::plane Struct Reference

Oriented plane in 3D space. More...

#include <plane.h>

Public Member Functions

 plane ()=default
 
 plane (const plane &)=default
 
 plane (const pose &)
 
 plane (float a, float b, float c, float d)
 
 plane (const Eigen::Vector3f &p, const Eigen::Vector3f &n)
 
 plane (const Eigen::Vector3f &p1, const Eigen::Vector3f &p2, const Eigen::Vector3f &p3)
 
void normalize ()
 Normalize the plane representation. More...
 
Eigen::Vector3f project (const Eigen::Vector3f &) const
 
Eigen::Vector3f origin () const
 
pose to_pose () const
 
 operator Eigen::Hyperplane< float, 3 > () const
 
void apply_transformation (const Eigen::Affine3f &)
 
std::string to_string () const
 

Static Public Member Functions

static plane from_string (const std::string &)
 

Public Attributes

Eigen::Vector3f normal = Eigen::Vector3f::Zero()
 
float distance = 0
 

Detailed Description

Oriented plane in 3D space.

Represented using normal vector and distance value. That is the values (a, b, c, d) in the plane equation ax + by + cz = d. When normalized, representations are unique and distance is from origin to plane.

Constructor & Destructor Documentation

mf::plane::plane ( )
default
mf::plane::plane ( const plane )
default
mf::plane::plane ( const pose ps)
explicit
mf::plane::plane ( float  a,
float  b,
float  c,
float  d 
)

Create from coefficients. Creates plane for equation ax + by + cz = d. Resulting plane is normalized.

mf::plane::plane ( const Eigen::Vector3f &  p,
const Eigen::Vector3f &  n 
)

Create from any point on plane and normal vector. Normal vector does not need to be normalized. Resulting plane is normalized.

mf::plane::plane ( const Eigen::Vector3f &  p1,
const Eigen::Vector3f &  p2,
const Eigen::Vector3f &  p3 
)

Create any three points on the plane. Resulting plane is normalized. Points must not be aligned or coincide.

Member Function Documentation

void mf::plane::apply_transformation ( const Eigen::Affine3f &  t)
plane mf::plane::from_string ( const std::string &  str)
static
void mf::plane::normalize ( )

Normalize the plane representation.

mf::plane::operator Eigen::Hyperplane< float, 3 > ( ) const
Eigen::Vector3f mf::plane::origin ( ) const
Eigen::Vector3f mf::plane::project ( const Eigen::Vector3f &  p) const

Project point on plane. Result is the point on plane that is closest to the given point.

pose mf::plane::to_pose ( ) const
std::string mf::plane::to_string ( ) const

Member Data Documentation

float mf::plane::distance = 0
Eigen::Vector3f mf::plane::normal = Eigen::Vector3f::Zero()

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