+ setColorIndex(_colorIndex + 1);
+}
+
+
+
+/**
+ * Decrement current index to color table
+ */
+void Model::prevColor()
+{
+ setColorIndex(_colorIndex - 1);
+}
+
+
+
+/**
+ * Decrement diameter of segment
+ */
+void Model::decrementDiameter()
+{
+ _diameter *= _diameterFactor;
+}
+
+
+
+/**
+ * Set current color index
+ * @param index the color index
+ */
+void Model::setColorIndex(int index)
+{
+ // keep in range
+
+ if (index < 0)
+ {
+ _colorIndex = _colorTable.size() - 1;
+ }
+ else if (index > (_colorTable.size() - 1))
+ {
+ _colorIndex = 0;
+ }
+ else
+ {
+ _colorIndex = index;
+ }
+
+
+ // set color
+
+ Color color = _colorTable[_colorIndex];
+ double r = color.getR();
+ double g = color.getG();
+ double b = color.getB();
+
+ glColor3f(r, g, b);
+}
+
+
+
+/**
+ * Set current diameter of segment
+ * @param diameter the diameter
+ */
+void Model::setDiameter(double diameter)
+{
+ _diameter = diameter;
+}
+
+
+
+/**
+ * Set diameter factor
+ * @param diameter the diameter factor
+ */
+void Model::setDiameterFactor(double diameterFactor)
+{
+ _diameterFactor = diameterFactor;
+}
+
+
+
+/**
+ * Get current color index
+ * @return color index
+ */
+int Model::getColorIndex()
+{
+ return _colorIndex;
+}
+
+
+
+/**
+ * Get current diameter of segment
+ * @return diameter of segment
+ */
+double Model::getDiameter()
+{
+ return _diameter;