1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
|
////////////////////////////////////////////////////////
//
// GEM - Graphics Environment for Multimedia
//
// Implementation file
//
// Copyright (c) 2002-2011 IOhannes m zmölnig. forum::für::umläute. IEM. zmoelnig@iem.at
// zmoelnig@iem.kug.ac.at
// For information on usage and redistribution, and for a DISCLAIMER
// * OF ALL WARRANTIES, see the file, "GEM.LICENSE.TERMS"
//
// this file has been generated...
////////////////////////////////////////////////////////
#include "GEMglColor3f.h"
CPPEXTERN_NEW_WITH_THREE_ARGS ( GEMglColor3f , t_floatarg, A_DEFFLOAT, t_floatarg, A_DEFFLOAT, t_floatarg, A_DEFFLOAT);
/////////////////////////////////////////////////////////
//
// GEMglViewport
//
/////////////////////////////////////////////////////////
// Constructor
//
GEMglColor3f :: GEMglColor3f (t_floatarg arg0=0, t_floatarg arg1=0, t_floatarg arg2=0) :
red(static_cast<GLfloat>(arg0)),
green(static_cast<GLfloat>(arg1)),
blue(static_cast<GLfloat>(arg2))
{
m_inlet[0] = inlet_new(this->x_obj, &this->x_obj->ob_pd, &s_float, gensym("red"));
m_inlet[1] = inlet_new(this->x_obj, &this->x_obj->ob_pd, &s_float, gensym("green"));
m_inlet[2] = inlet_new(this->x_obj, &this->x_obj->ob_pd, &s_float, gensym("blue"));
}
/////////////////////////////////////////////////////////
// Destructor
//
GEMglColor3f :: ~GEMglColor3f () {
inlet_free(m_inlet[0]);
inlet_free(m_inlet[1]);
inlet_free(m_inlet[2]);
}
/////////////////////////////////////////////////////////
// Render
//
void GEMglColor3f :: render(GemState *state) {
glColor3f (red, green, blue);
}
/////////////////////////////////////////////////////////
// Variables
//
void GEMglColor3f :: redMess (t_float arg1) { // FUN
red = static_cast<GLfloat>(arg1);
setModified();
}
void GEMglColor3f :: greenMess (t_float arg1) { // FUN
green = static_cast<GLfloat>(arg1);
setModified();
}
void GEMglColor3f :: blueMess (t_float arg1) { // FUN
blue = static_cast<GLfloat>(arg1);
setModified();
}
/////////////////////////////////////////////////////////
// static member functions
//
void GEMglColor3f :: obj_setupCallback(t_class *classPtr) {
class_addmethod(classPtr, reinterpret_cast<t_method>(&GEMglColor3f::redMessCallback), gensym("red"), A_DEFFLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&GEMglColor3f::greenMessCallback), gensym("green"), A_DEFFLOAT, A_NULL);
class_addmethod(classPtr, reinterpret_cast<t_method>(&GEMglColor3f::blueMessCallback), gensym("blue"), A_DEFFLOAT, A_NULL);
};
void GEMglColor3f :: redMessCallback (void* data, t_floatarg arg0){
GetMyClass(data)->redMess ( static_cast<t_float>(arg0));
}
void GEMglColor3f :: greenMessCallback (void* data, t_floatarg arg0){
GetMyClass(data)->greenMess ( static_cast<t_float>(arg0));
}
void GEMglColor3f :: blueMessCallback (void* data, t_floatarg arg0){
GetMyClass(data)->blueMess ( static_cast<t_float>(arg0));
}
|