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

class shapeworks::PlaneConstraint;

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

Public Functions Documentation

function isViolated

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

virtual void print() const override

Prints the constraint neatly.

Reimplements: shapeworks::Constraint::print

function getPlaneNormal

inline Eigen::Vector3d getPlaneNormal()

Get plane normal.

function setPlaneNormal

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

Set plane normal.

function getPlanePoint

inline Eigen::Vector3d getPlanePoint()

Get plane center point.

function setPlanePoint

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

Set plane center point.

function setPlanePoint

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

Set plane center point.

function constraintGradient

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

Returns the gradient of the constraint.

Reimplements: shapeworks::Constraint::constraintGradient

function points

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

function getOffset

double getOffset()

function setOffset

void setOffset(
    double offset
)

function constraintEval

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

void updatePlaneFromPoints()

function getVTKPlane

vtkSmartPointer< vtkPlane > getVTKPlane()

Return this plane as a vtkPlane.


Updated on 2024-11-11 at 19:51:46 +0000