AdvSimSupport_DS_InteractionModelAndModel< T > Class Template Reference

#include <TAPsAdvSimSupport_DS.hpp>

Collaboration diagram for AdvSimSupport_DS_InteractionModelAndModel< T >:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 AdvSimSupport_DS_InteractionModelAndModel (HEVertex< T > *vertexA, HEVertex< T > *vertexB, T forceRatio)
 Constructor.
void ClearConstraint ()
 Clear constraint.
void EnforceConstraint ()
 Enforce constraint.
std::string StrInfo () const
 Return this object info as a string.

Public Attributes

ForceRatio
 force ratio [0-1] (1 means model one's vertex completely dominates model two's)
HEVertex< T > * VertexModelA
 vertex of model one
HEVertex< T > * VertexModelB
 vertex of model two

Friends

std::ostream & operator<< (std::ostream &output, AdvSimSupport_DS_InteractionModelAndModel< T > const &obj)
 Output Operator <<.


Detailed Description

template<typename T>
class AdvSimSupport_DS_InteractionModelAndModel< T >

Definition at line 99 of file TAPsAdvSimSupport_DS.hpp.


Constructor & Destructor Documentation

template<typename T>
AdvSimSupport_DS_InteractionModelAndModel< T >::AdvSimSupport_DS_InteractionModelAndModel ( HEVertex< T > *  vertexA,
HEVertex< T > *  vertexB,
forceRatio 
) [inline]

Constructor.

Parameters:
vertexA  a vertex of model
vertexB  a vertex of model
forceRatio  force ratio between the two vertices [0-1] (1 means model one's vertex completely dominates model two's)

Definition at line 113 of file TAPsAdvSimSupport_DS.hpp.

00117       : VertexModelA( vertexA ), VertexModelA( vertexB ), ForceRatio( forceRatio )
00118     {}


Member Function Documentation

template<typename T>
void AdvSimSupport_DS_InteractionModelAndModel< T >::ClearConstraint (  )  [inline]

Clear constraint.

Definition at line 55 of file TAPsAdvSimSupport_DS.cpp.

00056 {
00057     VertexModelA->SimFlags.ClearAllSimulationConstraints();
00058     VertexModelB->SimFlags.ClearAllSimulationConstraints();
00059 }

template<typename T>
void AdvSimSupport_DS_InteractionModelAndModel< T >::EnforceConstraint (  )  [inline]

Enforce constraint.

Definition at line 45 of file TAPsAdvSimSupport_DS.cpp.

00046 {
00047     Vector3<T> C = ForceRatio*VertexModelA->GetPosition() + (1.0 - ForceRatio)*VertexModelB->GetPosition();
00048     VertexModelA->SetPosition( C );
00049     VertexModelB->SetPosition( C );
00050 }

template<typename T>
BEGIN_NAMESPACE_TAPs std::string AdvSimSupport_DS_InteractionModelAndModel< T >::StrInfo (  )  const [inline]

Return this object info as a string.

Definition at line 20 of file TAPsAdvSimSupport_DS.cpp.

00021 {
00022     std::stringstream ss;
00023     ss  << "{A:" << VertexModelA << " with " << VertexModelA->SimFlags 
00024         << " , B:" << VertexModelB << " with " << VertexModelB->SimFlags 
00025         << " with ForceRatio of " << ForceRatio << "}\n";
00026     return ss.str();
00027 }


Friends And Related Function Documentation

template<typename T>
std::ostream& operator<< ( std::ostream &  output,
AdvSimSupport_DS_InteractionModelAndModel< T > const &  obj 
) [friend]

Output Operator <<.

Definition at line 103 of file TAPsAdvSimSupport_DS.hpp.

00104     {
00105         output << obj.StrInfo();
00106         return output;
00107     }


Member Data Documentation

force ratio [0-1] (1 means model one's vertex completely dominates model two's)

Definition at line 128 of file TAPsAdvSimSupport_DS.hpp.

vertex of model one

Definition at line 126 of file TAPsAdvSimSupport_DS.hpp.

vertex of model two

Definition at line 127 of file TAPsAdvSimSupport_DS.hpp.


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

Generated on Mon Oct 13 11:43:59 2008 for TAPs by  doxygen 1.5.6