aboutsummaryrefslogtreecommitdiff
path: root/externals/gridflow/bundled/Base/GemShape.h
diff options
context:
space:
mode:
authorN.N. <matju@users.sourceforge.net>2008-07-08 05:56:10 +0000
committerN.N. <matju@users.sourceforge.net>2008-07-08 05:56:10 +0000
commit089475041fe26964d72cb2ebc3559a36ba89a2f2 (patch)
tree4ea7537e82b2ee34748ef7cbfc18c523425d4f7a /externals/gridflow/bundled/Base/GemShape.h
parentd1ad56f1da41e7a88eb9a52d6b0daaf145b54ea7 (diff)
trying to import gridflow 0.9.4
svn path=/trunk/; revision=10148
Diffstat (limited to 'externals/gridflow/bundled/Base/GemShape.h')
-rw-r--r--externals/gridflow/bundled/Base/GemShape.h115
1 files changed, 115 insertions, 0 deletions
diff --git a/externals/gridflow/bundled/Base/GemShape.h b/externals/gridflow/bundled/Base/GemShape.h
new file mode 100644
index 00000000..101c975d
--- /dev/null
+++ b/externals/gridflow/bundled/Base/GemShape.h
@@ -0,0 +1,115 @@
+/*-----------------------------------------------------------------
+LOG
+ GEM - Graphics Environment for Multimedia
+
+ Base class for shapes
+
+ Copyright (c) 1997-1999 Mark Danks. mark@danks.org
+ Copyright (c) Günther Geiger. geiger@epy.co.at
+ Copyright (c) 2001-2002 IOhannes m zmoelnig. forum::für::umläute. IEM. zmoelnig@iem.kug.ac.at
+ For information on usage and redistribution, and for a DISCLAIMER OF ALL
+ WARRANTIES, see the file, "GEM.LICENSE.TERMS" in this distribution.
+
+-----------------------------------------------------------------*/
+
+#ifndef INCLUDE_GEMSHAPE_H_
+#define INCLUDE_GEMSHAPE_H_
+
+#include "Base/GemBase.h"
+
+/*-----------------------------------------------------------------
+-------------------------------------------------------------------
+CLASS
+ GemShape
+
+ Base class for shapes
+
+DESCRIPTION
+
+ Inlet for a float - "ft1"
+
+ "ft1" - the size of the shape
+ "draw" - the drawing style
+ "width" - the line width when drawing with lines
+
+-----------------------------------------------------------------*/
+class GEM_EXTERN GemShape : public GemBase
+{
+ public:
+
+ //////////
+ // Constructor
+ // [in] size - A size of 0. means to just use the default (ie, 1.)
+ GemShape(t_floatarg size);
+ GemShape();
+
+ protected:
+
+ //////////
+ // Destructor
+ virtual ~GemShape();
+
+ //-----------------------------------
+ // GROUP: Access functions
+ //-----------------------------------
+
+ //////////
+ // The width of the lines in line draw mode
+ void linewidthMess(float linewidth);
+
+ //////////
+ // The size of the object
+ void sizeMess(float size);
+
+ //////////
+ // How the object should be drawn
+ virtual void typeMess(t_symbol *type);
+
+ //-----------------------------------
+ // GROUP: Utility functions
+ //-----------------------------------
+
+ void SetVertex(GemState* state,float x, float y, float z, float tx, float ty,int curCoord);
+
+ //-----------------------------------
+ // GROUP: Member variables
+ //-----------------------------------
+
+ //////////
+ // The line width for GL_LINE mode
+ GLfloat m_linewidth;
+
+ //////////
+ // The size of the object
+ GLfloat m_size;
+
+ //////////
+ // The drawing style (GL_LINE, GL_POLYGON, etc)
+ GLenum m_drawType;
+
+ //////////
+ // The size inlet
+ t_inlet *m_inlet;
+
+ //-----------------------------------
+ // GROUP: Setup functions
+ //-----------------------------------
+
+ //////////
+ // creation callback
+ static void real_obj_setupCallback(t_class *classPtr)
+ { GemBase::real_obj_setupCallback(classPtr); GemShape::obj_setupCallback(classPtr); }
+
+ private:
+
+ static inline GemShape *GetMyClass(void *data) {return((GemShape *)((Obj_header *)data)->data);}
+
+ //////////
+ // static member functions
+ static void obj_setupCallback(t_class *classPtr);
+ static void linewidthMessCallback(void *data, t_floatarg linewidth);
+ static void typeMessCallback(void *data, t_symbol *type);
+ static void sizeMessCallback(void *data, t_floatarg size);
+};
+
+#endif // for header file