CellModules
PhysicsConstraints::Plane Class Reference

Represents a plane constraint. More...

Public Member Functions

 Plane (MecaCell::Vec _n=MecaCell::Vec(0, 1, 0), MecaCell::Vec _p=MecaCell::Vec(0, 0, 0), bool _sticky=false)
 Constructor for Plane. More...
 
double distanceToPoint (MecaCell::Vec c)
 Computes the distance from a point to the plane. More...
 

Public Attributes

MecaCell::Vec n
 
MecaCell::Vec p
 
bool sticky
 

Detailed Description

Represents a plane constraint.

Definition at line 19 of file PhysicsConstraints.hpp.

Constructor & Destructor Documentation

◆ Plane()

PhysicsConstraints::Plane::Plane ( MecaCell::Vec  _n = MecaCell::Vec(0, 1, 0),
MecaCell::Vec  _p = MecaCell::Vec(0, 0, 0),
bool  _sticky = false 
)
inline

Constructor for Plane.

Parameters
_nNormal vector of the plane.
_pPoint on the plane.
_stickyIndicates if the plane is sticky.

Definition at line 32 of file PhysicsConstraints.hpp.

Member Function Documentation

◆ distanceToPoint()

double PhysicsConstraints::Plane::distanceToPoint ( MecaCell::Vec  c)
inline

Computes the distance from a point to the plane.

Parameters
cPoint to compute the distance from.
Returns
Distance to the plane.

Definition at line 45 of file PhysicsConstraints.hpp.

Member Data Documentation

◆ n

MecaCell::Vec PhysicsConstraints::Plane::n

Normal vector of the plane

Definition at line 21 of file PhysicsConstraints.hpp.

◆ p

MecaCell::Vec PhysicsConstraints::Plane::p

Point on the plane

Definition at line 22 of file PhysicsConstraints.hpp.

◆ sticky

bool PhysicsConstraints::Plane::sticky

Indicates if the plane is sticky

Definition at line 23 of file PhysicsConstraints.hpp.


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