#include <TAPsAdvSimSupport_DS.hpp>

Public Member Functions | |
| AdvSimSupport_DS_InteractionSutureAndModel (unsigned int vertexIDSuture, DS::SimulationFlags *simFlagsSuture, Vector3< T > *vertexSuture, HEVertex< T > *vertexModel, T forceRatio) | |
| Constructor. | |
| void | ClearConstraint () |
| Clear constraint. | |
| void | EnforceConstraint () |
| Enforce constraint. | |
| std::string | StrInfo () const |
| Return this object info as a string. | |
Public Attributes | |
| T | ForceRatio |
| force ratio [0-1] (1 means suture's vertex completely dominates model's) | |
| DS::SimulationFlags * | SimFlagsSuture |
| simulation flags of suture Vector3<T> * VertexSuture; //!< vertex of suture | |
| unsigned int | VertexIDSuture |
| vertex ID of suture | |
| HEVertex< T > * | VertexModel |
| vertex of model | |
| Vector3< T > * | VertexSuture |
| a vertex of suture | |
Protected Member Functions | |
| void | EnforceConstraintSlidable () |
| Enforce slidable constraint. | |
| void | EnforceConstraintSlidableWithModelVertexFixed () |
| Enforce slidable constraint with model's vertex fixed. | |
Friends | |
| std::ostream & | operator<< (std::ostream &output, AdvSimSupport_DS_InteractionSutureAndModel< T > const &obj) |
| Output Operator <<. | |
Definition at line 134 of file TAPsAdvSimSupport_DS.hpp.
| AdvSimSupport_DS_InteractionSutureAndModel< T >::AdvSimSupport_DS_InteractionSutureAndModel | ( | unsigned int | vertexIDSuture, | |
| DS::SimulationFlags * | simFlagsSuture, | |||
| Vector3< T > * | vertexSuture, | |||
| HEVertex< T > * | vertexModel, | |||
| T | forceRatio | |||
| ) | [inline] |
Constructor.
| vertexIDSuture | vertex ID of suture |
| simFlagsSuture | simulation flags of suture |
| vertexSuture | a vertex of suture |
| vertexModel | a vertex of model |
| forceRatio | force ratio between the two vertices [0-1] (1 means suture's vertex completely dominates model's) |
Definition at line 148 of file TAPsAdvSimSupport_DS.hpp.
00154 : VertexIDSuture( vertexIDSuture ), SimFlagsSuture( simFlagsSuture ), VertexSuture( vertexSuture ), VertexModel( vertexModel ), ForceRatio( forceRatio ) 00155 {}
| void AdvSimSupport_DS_InteractionSutureAndModel< T >::ClearConstraint | ( | ) | [inline] |
Clear constraint.
Definition at line 122 of file TAPsAdvSimSupport_DS.cpp.
00123 { 00124 VertexModel->SimFlags.ClearAllSimulationConstraints(); 00125 SimFlagsSuture->ClearAllSimulationConstraints(); 00126 }
| void AdvSimSupport_DS_InteractionSutureAndModel< T >::EnforceConstraint | ( | ) | [inline] |
Enforce constraint.
Definition at line 64 of file TAPsAdvSimSupport_DS.cpp.
00065 { 00066 if ( SimFlagsSuture->CheckSimulationConstraints( Enum::AddOn::SLIDABLE ) ) { 00067 if ( VertexModel->SimFlags.CheckSimulationConstraints( Enum::AddOn::ATTACHED ) ) { 00068 Vector3<T> C = ForceRatio*(*VertexSuture) + (1.0 - ForceRatio)*VertexModel->GetPosition(); 00069 //*VertexSuture = C; // Already computed by CUDA 00070 VertexModel->SetPosition( C ); 00071 } 00072 else if ( VertexModel->SimFlags.CheckSimulationConstraints( Enum::AddOn::PUNCTURED ) ) { 00073 Vector3<T> C = ForceRatio*(*VertexSuture) + (1.0 - ForceRatio)*VertexModel->GetPosition(); 00074 //*VertexSuture = C; // Already computed by CUDA 00075 VertexModel->SetPosition( C ); 00076 } 00077 else if ( VertexModel->SimFlags.CheckSimulationConstraints( Enum::AddOn::FIXED ) ) { 00078 // Computed by CUDA 00079 } 00080 else if ( VertexModel->SimFlags.CheckSimulationConstraints( Enum::AddOn::SLIDABLE ) ) { 00081 // N/A 00082 } 00083 } 00084 else if ( SimFlagsSuture->CheckSimulationConstraints( Enum::AddOn::ATTACHED ) ) { 00085 if ( VertexModel->SimFlags.CheckSimulationConstraints( Enum::AddOn::ATTACHED ) ) { 00086 Vector3<T> C = ForceRatio*(*VertexSuture) + (1.0 - ForceRatio)*VertexModel->GetPosition(); 00087 //*VertexSuture = C; // Already computed by CUDA 00088 VertexModel->SetPosition( C ); 00089 } 00090 else if ( VertexModel->SimFlags.CheckSimulationConstraints( Enum::AddOn::PUNCTURED ) ) { 00091 Vector3<T> C = ForceRatio*(*VertexSuture) + (1.0 - ForceRatio)*VertexModel->GetPosition(); 00092 //*VertexSuture = C; // Already computed by CUDA 00093 VertexModel->SetPosition( C ); 00094 } 00095 else if ( VertexModel->SimFlags.CheckSimulationConstraints( Enum::AddOn::FIXED ) ) { 00096 // Should be computed by CUDA 00097 *VertexSuture = VertexModel->GetPosition(); 00098 } 00099 else if ( VertexModel->SimFlags.CheckSimulationConstraints( Enum::AddOn::SLIDABLE ) ) { 00100 // N/A 00101 } 00102 } 00103 else if ( SimFlagsSuture->CheckSimulationConstraints( Enum::AddOn::FIXED ) ) { 00104 if ( VertexModel->SimFlags.CheckSimulationConstraints( Enum::AddOn::ATTACHED ) ) { 00105 VertexModel->SetPosition( *VertexSuture ); 00106 } 00107 else if ( VertexModel->SimFlags.CheckSimulationConstraints( Enum::AddOn::PUNCTURED ) ) { 00108 VertexModel->SetPosition( *VertexSuture ); 00109 } 00110 else if ( VertexModel->SimFlags.CheckSimulationConstraints( Enum::AddOn::FIXED ) ) { 00111 // N/A 00112 } 00113 else if ( VertexModel->SimFlags.CheckSimulationConstraints( Enum::AddOn::SLIDABLE ) ) { 00114 // N/A 00115 } 00116 } 00117 }
| void AdvSimSupport_DS_InteractionSutureAndModel< T >::EnforceConstraintSlidable | ( | ) | [inline, protected] |
Enforce slidable constraint.
Definition at line 131 of file TAPsAdvSimSupport_DS.cpp.
00132 { 00133 EnforceConstraintSlidableWithModelVertexFixed(); 00134 }
| void AdvSimSupport_DS_InteractionSutureAndModel< T >::EnforceConstraintSlidableWithModelVertexFixed | ( | ) | [inline, protected] |
Enforce slidable constraint with model's vertex fixed.
Definition at line 139 of file TAPsAdvSimSupport_DS.cpp.
00140 { 00141 Vector3<T> C = ForceRatio*(*VertexSuture) + (1.0 - ForceRatio)*VertexModel->GetPosition(); 00142 //VertexModel->SetPosition( C ); 00143 00144 /* 00145 // The start point of suture 00146 if ( vertexIDSuture >= 0 ) { 00147 } 00148 // The end point of suture 00149 else if ( vertexIDSuture <= 96 ) { 00150 } 00151 // a mid point of suture 00152 else { 00153 } 00154 //*/ 00155 }
| std::string AdvSimSupport_DS_InteractionSutureAndModel< T >::StrInfo | ( | ) | const [inline] |
Return this object info as a string.
Definition at line 32 of file TAPsAdvSimSupport_DS.cpp.
00033 { 00034 std::stringstream ss; 00035 ss << "{Suture: ID[" << VertexIDSuture << "] vertex[" << VertexSuture 00036 << "] with " << *SimFlagsSuture 00037 << ", Model:" << VertexModel << " with " << VertexModel->SimFlags 00038 << " with ForceRatio of " << ForceRatio << "}\n"; 00039 return ss.str(); 00040 }
| std::ostream& operator<< | ( | std::ostream & | output, | |
| AdvSimSupport_DS_InteractionSutureAndModel< T > const & | obj | |||
| ) | [friend] |
Output Operator <<.
Definition at line 138 of file TAPsAdvSimSupport_DS.hpp.
00139 { 00140 output << obj.StrInfo(); 00141 return output; 00142 }
| T AdvSimSupport_DS_InteractionSutureAndModel< T >::ForceRatio |
force ratio [0-1] (1 means suture's vertex completely dominates model's)
Definition at line 172 of file TAPsAdvSimSupport_DS.hpp.
| DS::SimulationFlags* AdvSimSupport_DS_InteractionSutureAndModel< T >::SimFlagsSuture |
simulation flags of suture Vector3<T> * VertexSuture; //!< vertex of suture
Definition at line 169 of file TAPsAdvSimSupport_DS.hpp.
| unsigned int AdvSimSupport_DS_InteractionSutureAndModel< T >::VertexIDSuture |
| HEVertex<T>* AdvSimSupport_DS_InteractionSutureAndModel< T >::VertexModel |
| Vector3<T>* AdvSimSupport_DS_InteractionSutureAndModel< T >::VertexSuture |
1.5.6