Skip to content

Container

Rafael C Fatou edited this page Dec 24, 2018 · 6 revisions

Description

The container class holds masses and springs, and is subclassed by a variety of utility containers. The container has several utility functions which are useful, and enables efficient getting and setting of values to/from the GPU.

Methods

void setMassValues(double m); // set masses for all Mass objects
void setSpringConstants(double k); // set k for all Spring objects
void setDeltaT(double m); // set masses for all Mass objects
void setRestLengths(double len); // set masses for all Mass objects

void makeFixed(); // make all masses fixed

void add(Mass * m); // add a mass
void add(Spring * s); // add a spring
void add(Container * c); // add all masses and springs from another container

The use of containers for efficient computation is highly encouraged.