GUIDOLib  1.7.7
Guido Engine Internal Documentation
Public Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
GRSpaceForceFunction2 Class Reference

This class realizes the second implementation of the space-force-function. More...

Inheritance diagram for GRSpaceForceFunction2:
GRBeginSpaceForceFunction2

Public Member Functions

 GRSpaceForceFunction2 (float force)
 
virtual ~GRSpaceForceFunction2 ()
 
 GRSpaceForceFunction2 (const GRSpaceForceFunction2 &sff)
 
void setOptForce (float newoptforce)
 
void writeAllExtents (std::ostream &os) const
 
float EvaluateBreak (float extent)
 
void UnfreezeSpring (GRSpring *spr)
 
void FreezeSpring (GRSpring *spr)
 
void ResetSprings ()
 
void addSFF (const GRSpaceForceFunction2 &sff)
 
float getOptForce ()
 
void addSpring (GRSpring *spr)
 
void deleteSpring (GRSpring *spr)
 
float getExtent (float force) const
 
float getForce (float extent)
 
float getOptConstant () const
 
float getXminOpt () const
 

Static Protected Member Functions

static float CalcSpringConstant (float c1, float c2)
 

Protected Attributes

SortedForceList sortedlist
 
float xmin
 
float cmax
 
float xminopt
 
float copt
 
float optforce
 

Detailed Description

This class realizes the second implementation of the space-force-function.

Instead of handling a map of values, a simple ordered list of springs is maintained. To calculate the force, we just have to follow the sorted list to find the line segment

Constructor & Destructor Documentation

◆ GRSpaceForceFunction2() [1/2]

GRSpaceForceFunction2::GRSpaceForceFunction2 ( float  force)

◆ ~GRSpaceForceFunction2()

virtual GRSpaceForceFunction2::~GRSpaceForceFunction2 ( )
virtual

◆ GRSpaceForceFunction2() [2/2]

GRSpaceForceFunction2::GRSpaceForceFunction2 ( const GRSpaceForceFunction2 sff)

Member Function Documentation

◆ addSFF()

void GRSpaceForceFunction2::addSFF ( const GRSpaceForceFunction2 sff)

◆ addSpring()

void GRSpaceForceFunction2::addSpring ( GRSpring spr)

◆ CalcSpringConstant()

static float GRSpaceForceFunction2::CalcSpringConstant ( float  c1,
float  c2 
)
inlinestaticprotected

◆ deleteSpring()

void GRSpaceForceFunction2::deleteSpring ( GRSpring spr)

◆ EvaluateBreak()

float GRSpaceForceFunction2::EvaluateBreak ( float  extent)

◆ FreezeSpring()

void GRSpaceForceFunction2::FreezeSpring ( GRSpring spr)

◆ getExtent()

float GRSpaceForceFunction2::getExtent ( float  force) const

◆ getForce()

float GRSpaceForceFunction2::getForce ( float  extent)

◆ getOptConstant()

float GRSpaceForceFunction2::getOptConstant ( ) const
inline

◆ getOptForce()

float GRSpaceForceFunction2::getOptForce ( )

◆ getXminOpt()

float GRSpaceForceFunction2::getXminOpt ( ) const
inline

◆ ResetSprings()

void GRSpaceForceFunction2::ResetSprings ( )

◆ setOptForce()

void GRSpaceForceFunction2::setOptForce ( float  newoptforce)

◆ UnfreezeSpring()

void GRSpaceForceFunction2::UnfreezeSpring ( GRSpring spr)

◆ writeAllExtents()

void GRSpaceForceFunction2::writeAllExtents ( std::ostream &  os) const

Member Data Documentation

◆ cmax

float GRSpaceForceFunction2::cmax
protected

◆ copt

float GRSpaceForceFunction2::copt
protected

◆ optforce

float GRSpaceForceFunction2::optforce
protected

◆ sortedlist

SortedForceList GRSpaceForceFunction2::sortedlist
protected

◆ xmin

float GRSpaceForceFunction2::xmin
protected

◆ xminopt

float GRSpaceForceFunction2::xminopt
protected

Guido Project Copyright © 2019 Grame-CNCM