Tangential Collisions

class TangentialCollisions

Public Types

using value_type = TangentialCollision

The type of the collisions.

Public Functions

TangentialCollisions() = default
inline void build(const CollisionMesh& mesh,
    const
 Eigen::MatrixXd& vertices
,
    const
 NormalCollisions& collisions
,
    const
 NormalPotential& normal_potential
,
    double
 normal_stiffness
, double mu)
void build(const CollisionMesh& mesh,
    const
 Eigen::MatrixXd& vertices
,
    const
 NormalCollisions& collisions
,
    const
 NormalPotential& normal_potential
,
    const
 double normal_stiffness
, const Eigen::VectorXd& mus,
    const
 std::function<double(double, double)>& blend_mu
    
= default_blend_mu
)
size_t size() const

Get the number of friction collisions.

bool empty() const

Get if the friction collisions are empty.

void clear()

Clear the friction collisions.

TangentialCollision& operator[](const size_t i)

Get a reference to collision at index i.

Parameters:
const size_t i

The index of the collision.

Returns:

A reference to the collision.

const TangentialCollision& operator[](const size_t i) const

Get a const reference to collision at index i.

Parameters:
const size_t i

The index of the collision.

Returns:

A const reference to the collision.

Public Members

std::vector<VertexVertexTangentialCollision> vv_collisions

Vertex-vertex tangential collisions.

std::vector<EdgeVertexTangentialCollision> ev_collisions

Edge-vertex tangential collisions.

std::vector<EdgeEdgeTangentialCollision> ee_collisions

Edge-edge tangential collisions.

std::vector<FaceVertexTangentialCollision> fv_collisions

Face-vertex tangential collisions.

Public Static Functions

static inline double default_blend_mu(double mu0, double mu1)

Tangential Collision

class TangentialCollision : public virtual ipc::CollisionStencil

Inheritence diagram for ipc::TangentialCollision:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="ipc::CollisionStencil" tooltip="ipc::CollisionStencil"] "5" [label="ipc::FaceVertexTangentialCollision" tooltip="ipc::FaceVertexTangentialCollision"] "4" [label="ipc::EdgeVertexTangentialCollision" tooltip="ipc::EdgeVertexTangentialCollision"] "3" [label="ipc::EdgeEdgeTangentialCollision" tooltip="ipc::EdgeEdgeTangentialCollision"] "6" [label="ipc::VertexVertexTangentialCollision" tooltip="ipc::VertexVertexTangentialCollision"] "1" [label="ipc::TangentialCollision" tooltip="ipc::TangentialCollision" fillcolor="#BFBFBF"] "5" -> "1" [dir=forward tooltip="public-inheritance"] "4" -> "1" [dir=forward tooltip="public-inheritance"] "3" -> "1" [dir=forward tooltip="public-inheritance"] "6" -> "1" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for ipc::TangentialCollision:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "2" [label="ipc::CollisionStencil" tooltip="ipc::CollisionStencil"] "1" [label="ipc::TangentialCollision" tooltip="ipc::TangentialCollision" fillcolor="#BFBFBF"] "1" -> "2" [dir=forward tooltip="public-inheritance"] }

Subclassed by ipc::EdgeEdgeTangentialCollision, ipc::EdgeVertexTangentialCollision, ipc::FaceVertexTangentialCollision, ipc::VertexVertexTangentialCollision

Public Functions

virtual ~TangentialCollision() = default
inline int dim() const

Get the dimension of the collision.

inline int ndof() const

Get the number of degrees of freedom for the collision.

virtual MatrixMax<double, 3, 2> compute_tangent_basis(
    const
 VectorMax12d& positions
)
 const = 0

Compute the tangent basis of the collision.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Tangent basis of the collision.

virtual MatrixMax<double, 36, 2> compute_tangent_basis_jacobian(
    const
 VectorMax12d& positions
)
 const = 0

Compute the Jacobian of the tangent basis of the collision.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Jacobian of the tangent basis of the collision.

virtual VectorMax2d compute_closest_point(
    const
 VectorMax12d& positions
)
 const = 0

Compute the barycentric coordinates of the closest point.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Barycentric coordinates of the closest point.

virtual MatrixMax<double, 2, 12> compute_closest_point_jacobian(
    const
 VectorMax12d& positions
)
 const = 0

Compute the Jacobian of the barycentric coordinates of the closest point.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Jacobian of the barycentric coordinates of the closest point.

virtual VectorMax3d relative_velocity(
    const
 VectorMax12d& velocities
)
 const = 0

Compute the relative velocity of the collision.

Parameters:
const VectorMax12d &velocities

Collision stencil’s vertex velocities.

Returns:

Relative velocity of the collision.

inline virtual MatrixMax<double, 3, 12>
relative_velocity_matrix() const

Construct the premultiplier matrix for the relative velocity.

Note

Uses the cached closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

virtual MatrixMax<double, 3, 12> relative_velocity_matrix(
    const
 VectorMax2d& closest_point
)
 const = 0

Construct the premultiplier matrix for the relative velocity.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

virtual MatrixMax<double, 6, 12> relative_velocity_matrix_jacobian(
    const
 VectorMax2d& closest_point
)
 const = 0

Construct the Jacobian of the relative velocity premultiplier wrt the closest points.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

Jacobian of the relative velocity premultiplier wrt the closest points.

Public Members

double normal_force_magnitude

Normal force magnitude.

double mu

Ratio between normal and tangential forces (e.g., friction coefficient)

double weight = 1

Weight.

Eigen::SparseVector<double> weight_gradient

Gradient of weight with respect to all DOF.

VectorMax2d closest_point

Barycentric coordinates of the closest point(s)

MatrixMax<double, 3, 2> tangent_basis

Tangent basis of the collision (max size 3×2)

Protected Functions

void init(const NormalCollision& collision,
    const
 VectorMax12d& positions
,
    const
 NormalPotential& normal_potential
,
    const
 double normal_stiffness
)

Initialize the collision.

Parameters:
const NormalCollision &collision

NormalCollision stencil.

const VectorMax12d &positions

Collision stencil’s vertex positions.

const NormalPotential &normal_potential

Normal potential used for normal force.

const double normal_stiffness

Normal potential stiffness.

Vertex-Vertex Tangential Collision

class VertexVertexTangentialCollision
    
: public ipc::VertexVertexCandidate,
      
public ipc::TangentialCollision

Inheritence diagram for ipc::VertexVertexTangentialCollision:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="ipc::ContinuousCollisionCandidate" tooltip="ipc::ContinuousCollisionCandidate"] "4" [label="ipc::CollisionStencil" tooltip="ipc::CollisionStencil"] "2" [label="ipc::VertexVertexCandidate" tooltip="ipc::VertexVertexCandidate"] "5" [label="ipc::TangentialCollision" tooltip="ipc::TangentialCollision"] "1" [label="ipc::VertexVertexTangentialCollision" tooltip="ipc::VertexVertexTangentialCollision" fillcolor="#BFBFBF"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "5" -> "4" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "5" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for ipc::VertexVertexTangentialCollision:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="ipc::ContinuousCollisionCandidate" tooltip="ipc::ContinuousCollisionCandidate"] "4" [label="ipc::CollisionStencil" tooltip="ipc::CollisionStencil"] "2" [label="ipc::VertexVertexCandidate" tooltip="ipc::VertexVertexCandidate"] "5" [label="ipc::TangentialCollision" tooltip="ipc::TangentialCollision"] "1" [label="ipc::VertexVertexTangentialCollision" tooltip="ipc::VertexVertexTangentialCollision" fillcolor="#BFBFBF"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "5" -> "4" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "5" [dir=forward tooltip="public-inheritance"] }

Public Functions

VertexVertexTangentialCollision(
    const
 VertexVertexNormalCollision& collision
)
VertexVertexTangentialCollision(
    const
 VertexVertexNormalCollision& collision
,
    const
 VectorMax12d& positions
,
    const
 NormalPotential& normal_potential
,
    const
 double normal_stiffness
)
VertexVertexCandidate(long vertex0_id, long vertex1_id)

Protected Functions

virtual MatrixMax<double, 3, 2> compute_tangent_basis(
    const
 VectorMax12d& positions
)
 const override

Compute the tangent basis of the collision.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Tangent basis of the collision.

virtual MatrixMax<double, 36, 2> compute_tangent_basis_jacobian(
    const
 VectorMax12d& positions
)
 const override

Compute the Jacobian of the tangent basis of the collision.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Jacobian of the tangent basis of the collision.

virtual VectorMax2d compute_closest_point(
    const
 VectorMax12d& positions
)
 const override

Compute the barycentric coordinates of the closest point.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Barycentric coordinates of the closest point.

virtual MatrixMax<double, 2, 12> compute_closest_point_jacobian(
    const
 VectorMax12d& positions
)
 const override

Compute the Jacobian of the barycentric coordinates of the closest point.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Jacobian of the barycentric coordinates of the closest point.

virtual VectorMax3d relative_velocity(
    const
 VectorMax12d& velocities
)
 const override

Compute the relative velocity of the collision.

Parameters:
const VectorMax12d &velocities

Collision stencil’s vertex velocities.

Returns:

Relative velocity of the collision.

virtual MatrixMax<double, 3, 12> relative_velocity_matrix(
    const
 VectorMax2d& closest_point
)
 const override

Construct the premultiplier matrix for the relative velocity.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

virtual MatrixMax<double, 6, 12> relative_velocity_matrix_jacobian(
    const
 VectorMax2d& closest_point
)
 const override

Construct the Jacobian of the relative velocity premultiplier wrt the closest points.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

Jacobian of the relative velocity premultiplier wrt the closest points.

inline MatrixMax<double, 3, 12> relative_velocity_matrix() const

Construct the premultiplier matrix for the relative velocity.

Note

Uses the cached closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

MatrixMax<double, 3, 12> relative_velocity_matrix(
    const
 VectorMax2d& closest_point
)
 const = 0

Construct the premultiplier matrix for the relative velocity.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

Edge-Vertex Tangential Collision

class EdgeVertexTangentialCollision
    
: public ipc::EdgeVertexCandidate,
      
public ipc::TangentialCollision

Inheritence diagram for ipc::EdgeVertexTangentialCollision:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="ipc::ContinuousCollisionCandidate" tooltip="ipc::ContinuousCollisionCandidate"] "4" [label="ipc::CollisionStencil" tooltip="ipc::CollisionStencil"] "2" [label="ipc::EdgeVertexCandidate" tooltip="ipc::EdgeVertexCandidate"] "1" [label="ipc::EdgeVertexTangentialCollision" tooltip="ipc::EdgeVertexTangentialCollision" fillcolor="#BFBFBF"] "5" [label="ipc::TangentialCollision" tooltip="ipc::TangentialCollision"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "5" [dir=forward tooltip="public-inheritance"] "5" -> "4" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for ipc::EdgeVertexTangentialCollision:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="ipc::ContinuousCollisionCandidate" tooltip="ipc::ContinuousCollisionCandidate"] "4" [label="ipc::CollisionStencil" tooltip="ipc::CollisionStencil"] "2" [label="ipc::EdgeVertexCandidate" tooltip="ipc::EdgeVertexCandidate"] "1" [label="ipc::EdgeVertexTangentialCollision" tooltip="ipc::EdgeVertexTangentialCollision" fillcolor="#BFBFBF"] "5" [label="ipc::TangentialCollision" tooltip="ipc::TangentialCollision"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "5" [dir=forward tooltip="public-inheritance"] "5" -> "4" [dir=forward tooltip="public-inheritance"] }

Public Functions

EdgeVertexTangentialCollision(
    const
 EdgeVertexNormalCollision& collision
)
EdgeVertexTangentialCollision(
    const
 EdgeVertexNormalCollision& collision
,
    const
 VectorMax12d& positions
,
    const
 NormalPotential& normal_potential
,
    const
 double normal_stiffness
)
EdgeVertexCandidate(long edge_id, long vertex_id)

Protected Functions

virtual MatrixMax<double, 3, 2> compute_tangent_basis(
    const
 VectorMax12d& positions
)
 const override

Compute the tangent basis of the collision.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Tangent basis of the collision.

virtual MatrixMax<double, 36, 2> compute_tangent_basis_jacobian(
    const
 VectorMax12d& positions
)
 const override

Compute the Jacobian of the tangent basis of the collision.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Jacobian of the tangent basis of the collision.

virtual VectorMax2d compute_closest_point(
    const
 VectorMax12d& positions
)
 const override

Compute the barycentric coordinates of the closest point.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Barycentric coordinates of the closest point.

virtual MatrixMax<double, 2, 12> compute_closest_point_jacobian(
    const
 VectorMax12d& positions
)
 const override

Compute the Jacobian of the barycentric coordinates of the closest point.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Jacobian of the barycentric coordinates of the closest point.

virtual VectorMax3d relative_velocity(
    const
 VectorMax12d& velocities
)
 const override

Compute the relative velocity of the collision.

Parameters:
const VectorMax12d &velocities

Collision stencil’s vertex velocities.

Returns:

Relative velocity of the collision.

virtual MatrixMax<double, 3, 12> relative_velocity_matrix(
    const
 VectorMax2d& closest_point
)
 const override

Construct the premultiplier matrix for the relative velocity.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

virtual MatrixMax<double, 6, 12> relative_velocity_matrix_jacobian(
    const
 VectorMax2d& closest_point
)
 const override

Construct the Jacobian of the relative velocity premultiplier wrt the closest points.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

Jacobian of the relative velocity premultiplier wrt the closest points.

inline MatrixMax<double, 3, 12> relative_velocity_matrix() const

Construct the premultiplier matrix for the relative velocity.

Note

Uses the cached closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

MatrixMax<double, 3, 12> relative_velocity_matrix(
    const
 VectorMax2d& closest_point
)
 const = 0

Construct the premultiplier matrix for the relative velocity.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

Edge-Edge Tangential Collision

class EdgeEdgeTangentialCollision : public ipc::EdgeEdgeCandidate,
                                    
public ipc::TangentialCollision

Inheritence diagram for ipc::EdgeEdgeTangentialCollision:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="ipc::ContinuousCollisionCandidate" tooltip="ipc::ContinuousCollisionCandidate"] "4" [label="ipc::CollisionStencil" tooltip="ipc::CollisionStencil"] "2" [label="ipc::EdgeEdgeCandidate" tooltip="ipc::EdgeEdgeCandidate"] "1" [label="ipc::EdgeEdgeTangentialCollision" tooltip="ipc::EdgeEdgeTangentialCollision" fillcolor="#BFBFBF"] "5" [label="ipc::TangentialCollision" tooltip="ipc::TangentialCollision"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "5" [dir=forward tooltip="public-inheritance"] "5" -> "4" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for ipc::EdgeEdgeTangentialCollision:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="ipc::ContinuousCollisionCandidate" tooltip="ipc::ContinuousCollisionCandidate"] "4" [label="ipc::CollisionStencil" tooltip="ipc::CollisionStencil"] "2" [label="ipc::EdgeEdgeCandidate" tooltip="ipc::EdgeEdgeCandidate"] "1" [label="ipc::EdgeEdgeTangentialCollision" tooltip="ipc::EdgeEdgeTangentialCollision" fillcolor="#BFBFBF"] "5" [label="ipc::TangentialCollision" tooltip="ipc::TangentialCollision"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "5" [dir=forward tooltip="public-inheritance"] "5" -> "4" [dir=forward tooltip="public-inheritance"] }

Public Functions

EdgeEdgeTangentialCollision(
    const
 EdgeEdgeNormalCollision& collision
)
EdgeEdgeTangentialCollision(
    const
 EdgeEdgeNormalCollision& collision
,
    const
 VectorMax12d& positions
,
    const
 NormalPotential& normal_potential
,
    const
 double normal_stiffness
)
EdgeEdgeCandidate(long edge0_id, long edge1_id)

Protected Functions

inline virtual EdgeEdgeDistanceType known_dtype() const override
virtual MatrixMax<double, 3, 2> compute_tangent_basis(
    const
 VectorMax12d& positions
)
 const override

Compute the tangent basis of the collision.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Tangent basis of the collision.

virtual MatrixMax<double, 36, 2> compute_tangent_basis_jacobian(
    const
 VectorMax12d& positions
)
 const override

Compute the Jacobian of the tangent basis of the collision.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Jacobian of the tangent basis of the collision.

virtual VectorMax2d compute_closest_point(
    const
 VectorMax12d& positions
)
 const override

Compute the barycentric coordinates of the closest point.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Barycentric coordinates of the closest point.

virtual MatrixMax<double, 2, 12> compute_closest_point_jacobian(
    const
 VectorMax12d& positions
)
 const override

Compute the Jacobian of the barycentric coordinates of the closest point.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Jacobian of the barycentric coordinates of the closest point.

virtual VectorMax3d relative_velocity(
    const
 VectorMax12d& velocities
)
 const override

Compute the relative velocity of the collision.

Parameters:
const VectorMax12d &velocities

Collision stencil’s vertex velocities.

Returns:

Relative velocity of the collision.

virtual MatrixMax<double, 3, 12> relative_velocity_matrix(
    const
 VectorMax2d& closest_point
)
 const override

Construct the premultiplier matrix for the relative velocity.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

virtual MatrixMax<double, 6, 12> relative_velocity_matrix_jacobian(
    const
 VectorMax2d& closest_point
)
 const override

Construct the Jacobian of the relative velocity premultiplier wrt the closest points.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

Jacobian of the relative velocity premultiplier wrt the closest points.

inline MatrixMax<double, 3, 12> relative_velocity_matrix() const

Construct the premultiplier matrix for the relative velocity.

Note

Uses the cached closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

MatrixMax<double, 3, 12> relative_velocity_matrix(
    const
 VectorMax2d& closest_point
)
 const = 0

Construct the premultiplier matrix for the relative velocity.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

Face-Vertex Tangential Collision

class FaceVertexTangentialCollision
    
: public ipc::FaceVertexCandidate,
      
public ipc::TangentialCollision

Inheritence diagram for ipc::FaceVertexTangentialCollision:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="ipc::ContinuousCollisionCandidate" tooltip="ipc::ContinuousCollisionCandidate"] "2" [label="ipc::FaceVertexCandidate" tooltip="ipc::FaceVertexCandidate"] "4" [label="ipc::CollisionStencil" tooltip="ipc::CollisionStencil"] "1" [label="ipc::FaceVertexTangentialCollision" tooltip="ipc::FaceVertexTangentialCollision" fillcolor="#BFBFBF"] "5" [label="ipc::TangentialCollision" tooltip="ipc::TangentialCollision"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "5" [dir=forward tooltip="public-inheritance"] "5" -> "4" [dir=forward tooltip="public-inheritance"] }

Collaboration diagram for ipc::FaceVertexTangentialCollision:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="ipc::ContinuousCollisionCandidate" tooltip="ipc::ContinuousCollisionCandidate"] "2" [label="ipc::FaceVertexCandidate" tooltip="ipc::FaceVertexCandidate"] "4" [label="ipc::CollisionStencil" tooltip="ipc::CollisionStencil"] "1" [label="ipc::FaceVertexTangentialCollision" tooltip="ipc::FaceVertexTangentialCollision" fillcolor="#BFBFBF"] "5" [label="ipc::TangentialCollision" tooltip="ipc::TangentialCollision"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="public-inheritance"] "1" -> "5" [dir=forward tooltip="public-inheritance"] "5" -> "4" [dir=forward tooltip="public-inheritance"] }

Public Functions

FaceVertexTangentialCollision(
    const
 FaceVertexNormalCollision& collision
)
FaceVertexTangentialCollision(
    const
 FaceVertexNormalCollision& collision
,
    const
 VectorMax12d& positions
,
    const
 NormalPotential& normal_potential
,
    const
 double normal_stiffness
)
FaceVertexCandidate(long face_id, long vertex_id)

Protected Functions

virtual MatrixMax<double, 3, 2> compute_tangent_basis(
    const
 VectorMax12d& positions
)
 const override

Compute the tangent basis of the collision.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Tangent basis of the collision.

virtual MatrixMax<double, 36, 2> compute_tangent_basis_jacobian(
    const
 VectorMax12d& positions
)
 const override

Compute the Jacobian of the tangent basis of the collision.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Jacobian of the tangent basis of the collision.

virtual VectorMax2d compute_closest_point(
    const
 VectorMax12d& positions
)
 const override

Compute the barycentric coordinates of the closest point.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Barycentric coordinates of the closest point.

virtual MatrixMax<double, 2, 12> compute_closest_point_jacobian(
    const
 VectorMax12d& positions
)
 const override

Compute the Jacobian of the barycentric coordinates of the closest point.

Parameters:
const VectorMax12d &positions

Collision stencil’s vertex positions.

Returns:

Jacobian of the barycentric coordinates of the closest point.

virtual VectorMax3d relative_velocity(
    const
 VectorMax12d& velocities
)
 const override

Compute the relative velocity of the collision.

Parameters:
const VectorMax12d &velocities

Collision stencil’s vertex velocities.

Returns:

Relative velocity of the collision.

virtual MatrixMax<double, 3, 12> relative_velocity_matrix(
    const
 VectorMax2d& closest_point
)
 const override

Construct the premultiplier matrix for the relative velocity.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

virtual MatrixMax<double, 6, 12> relative_velocity_matrix_jacobian(
    const
 VectorMax2d& closest_point
)
 const override

Construct the Jacobian of the relative velocity premultiplier wrt the closest points.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

Jacobian of the relative velocity premultiplier wrt the closest points.

inline MatrixMax<double, 3, 12> relative_velocity_matrix() const

Construct the premultiplier matrix for the relative velocity.

Note

Uses the cached closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.

MatrixMax<double, 3, 12> relative_velocity_matrix(
    const
 VectorMax2d& closest_point
)
 const = 0

Construct the premultiplier matrix for the relative velocity.

Parameters:
const VectorMax2d &closest_point

Barycentric coordinates of the closest point.

Returns:

A matrix M such that relative_velocity = M * velocities.


Last update: Dec 12, 2024