proj home

Files   Classes   Functions   Hierarchy  

springlineargeom Class Reference

#include <springlineargeom.h>

Inheritance diagram for springlineargeom:
Collaboration diagram for springlineargeom:

List of all members.

Public Member Functions

void lengths_update ()
 lengths current updated.
void construct (uintc N_)

Public Attributes

uint N
 N points.
vector< double > xoffsets
 Relative to the mass point.
vector< double > lengths
 N+1 spring natural(no forces) lengths.
vector< double > lengthscurrent
 Actual spring lengths.


Detailed Description

Definition at line 10 of file springlineargeom.h.


Member Function Documentation

void springlineargeom::construct ( uintc  N_  ) 

Definition at line 3 of file springlineargeom.cpp.

References lengths, lengthscurrent, N, and xoffsets.

Referenced by springlineardraw::construct().

00004 {
00005   N=N_;
00006   lengths.resize(N+1);
00007   lengthscurrent.resize(N+1);
00008   xoffsets.resize(N);
00009 }

void springlineargeom::lengths_update (  ) 

lengths current updated.

Definition at line 11 of file springlineargeom.cpp.

References lengths, lengthscurrent, N, and xoffsets.

Referenced by springlineardraw::draw().

00012 {
00013   lengthscurrent[0] = lengths[0]+xoffsets[0];
00014   lengthscurrent[N] = lengths[N]-xoffsets[N-1];
00015   for (uint i=1; i<N; ++i)
00016     lengthscurrent[i] = lengths[i]-xoffsets[i-1]+xoffsets[i];
00017 }


Member Data Documentation

vector<double> springlineargeom::lengths

N+1 spring natural(no forces) lengths.

Definition at line 20 of file springlineargeom.h.

Referenced by construct(), springlineardraw::draw(), lengths_update(), helixtestscope::helixtest::test02(), and helixtestscope::helixtest::test03().

Actual spring lengths.

Definition at line 22 of file springlineargeom.h.

Referenced by construct(), springlineardraw::draw(), and lengths_update().

N points.

Definition at line 15 of file springlineargeom.h.

Referenced by construct(), springlineardraw::draw(), lengths_update(), and springlineardraw::update().

Relative to the mass point.

Definition at line 18 of file springlineargeom.h.

Referenced by construct(), springlineardraw::draw(), helixtestscope::helixtest::idle03(), and lengths_update().


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

Generated on Fri Mar 4 00:50:18 2011 for Chelton Evans Source by  doxygen 1.5.8