Skip to content

shapeworks::PlaneConstraint

More...

#include <PlaneConstraint.h>

Inherits from shapeworks::Constraint

Public Functions

Name
virtual bool isViolated(const Eigen::Vector3d & pt) const override
Returns if pt in Eigen format is violated by the constraint.
virtual void print() const override
Prints the constraint neatly.
Eigen::Vector3d getPlaneNormal()
Get plane normal.
void setPlaneNormal(const Eigen::Vector3d & inPlane)
Set plane normal.
Eigen::Vector3d getPlanePoint()
Get plane center point.
void setPlanePoint(const vnl_vector< double > & point)
Set plane center point.
void setPlanePoint(const Eigen::Vector3d & p)
Set plane center point.
virtual Eigen::Vector3d constraintGradient(const Eigen::Vector3d & pt) const override
Returns the gradient of the constraint.
std::vector< Eigen::Vector3d > & points()
double getOffset()
void setOffset(double offset)
virtual double constraintEval(const Eigen::Vector3d & pt) const override
Returns the evaluation on the constraint, i.e. the signed distance to the constraint boundary.
void updatePlaneFromPoints()
vtkSmartPointer< vtkPlane > getVTKPlane()
Return this plane as a vtkPlane.

Additional inherited members

Public Functions inherited from shapeworks::Constraint

Name
void setMus(std::vector< double > inmu)
Initializes mu.
std::vector< double > getMus()
Gets mu.
void updateMu(const Eigen::Vector3d & pt, double C, size_t index)
Updates the value of mu according to the augmented lagrangian update.
Eigen::Vector3d lagragianGradient(const Eigen::Vector3d & pt, double C, size_t index) const
Computes the lagrangian gradient based on lagrangian inequality equations. NOTE: Not actually lagrangian. We are using quadratic penalty and not lagrangian because it works better.

Protected Functions inherited from shapeworks::Constraint

Name
int sgn(double val)
Returns the sign of the double.

Protected Attributes inherited from shapeworks::Constraint

Name
std::vector< double > mus_
Mu is the lagrangian momentum term.

Detailed Description

cpp class shapeworks::PlaneConstraint;

Encapsulate functionality related to cutting-plane constraints. Inherits from Constraint. See [Constraint.h] for more information

Public Functions Documentation

function isViolated

cpp virtual bool isViolated( const Eigen::Vector3d & pt ) const override

Returns if pt in Eigen format is violated by the constraint.

Reimplements: shapeworks::Constraint::isViolated

function print

cpp virtual void print() const override

Prints the constraint neatly.

Reimplements: shapeworks::Constraint::print

function getPlaneNormal

cpp inline Eigen::Vector3d getPlaneNormal()

Get plane normal.

function setPlaneNormal

cpp inline void setPlaneNormal( const Eigen::Vector3d & inPlane )

Set plane normal.

function getPlanePoint

cpp inline Eigen::Vector3d getPlanePoint()

Get plane center point.

function setPlanePoint

cpp inline void setPlanePoint( const vnl_vector< double > & point )

Set plane center point.

function setPlanePoint

cpp inline void setPlanePoint( const Eigen::Vector3d & p )

Set plane center point.

function constraintGradient

cpp inline virtual Eigen::Vector3d constraintGradient( const Eigen::Vector3d & pt ) const override

Returns the gradient of the constraint.

Reimplements: shapeworks::Constraint::constraintGradient

function points

cpp inline std::vector< Eigen::Vector3d > & points()

function getOffset

cpp double getOffset()

function setOffset

cpp void setOffset( double offset )

function constraintEval

cpp virtual double constraintEval( const Eigen::Vector3d & pt ) const override

Returns the evaluation on the constraint, i.e. the signed distance to the constraint boundary.

Reimplements: shapeworks::Constraint::constraintEval

function updatePlaneFromPoints

cpp void updatePlaneFromPoints()

function getVTKPlane

cpp vtkSmartPointer< vtkPlane > getVTKPlane()

Return this plane as a vtkPlane.


Updated on 2026-03-31 at 16:02:10 +0000