6 #include <QOpenGLBuffer>
42 Q_DECLARE_FLAGS(Faces,
Face)
83 void sizeChanged(
double xvalue,
double yvalue,
double zvalue);
124 void setSize(
double xvalue,
double yvalue,
double zvalue,
unsigned int tesselate_x = 10,
125 unsigned int tesselate_y = 10,
unsigned int tesselate_z = 10);
158 virtual
void buildGeometry(
unsigned int tesselate_x,
unsigned int tesselate_y,
unsigned int tesselate_z);
214 Q_DECLARE_OPERATORS_FOR_FLAGS(
Box::Faces)
void colorChanged(QColor color)
signal that the color of has changed
show texture on the -z
Definition: box.h:40
void sizeChanged(double xvalue, double yvalue, double zvalue)
signal that the box size has changed
double m_halfYSize
half ysize
Definition: box.h:181
Base class for objects in OpenGL scene.
Definition: sceneobject.h:22
QOpenGLBuffer * m_verticesVBO
vertices buffer
Definition: box.h:196
void toggleImage()
toggle if texture is shown
void setColor(QColor color)
set the color
double m_xsize
x length
Definition: box.h:169
virtual void draw()
perform OpenGL drawing operations
double m_ysize
y length
Definition: box.h:172
void imageOnChanged(bool drawn)
signal that the texture is drawn changed
show texture on the +y
Definition: box.h:35
void facesChanged(Faces faces)
signal that which faces the texture appears on changed
QOpenGLBuffer * m_normalsVBO
normals buffer
Definition: box.h:199
QColor m_color
color of box
Definition: box.h:166
double m_zsize
z length
Definition: box.h:175
int getXSize() const
get x length
show texture on the +x
Definition: box.h:37
QOpenGLBuffer * m_indexVBO
index buffer CW
Definition: box.h:205
show texture on the -x
Definition: box.h:38
GLuint m_imageID
texture ID
Definition: box.h:187
bool imageIsOn() const
true if texture is showing
Box(LangmuirViewer &viewer, QObject *parent=0)
create the Box
bool m_imageOn
show texture
Definition: box.h:190
const QColor & getColor() const
get color
void setSize(double xvalue, double yvalue, double zvalue, unsigned int tesselate_x=10, unsigned int tesselate_y=10, unsigned int tesselate_z=10)
set the box size
virtual void init()
initialize object
void showImage(bool on=true)
show the texture
do not show texture on any face
Definition: box.h:34
Faces m_faces
texture faces
Definition: box.h:193
double m_halfZSize
half zsize
Definition: box.h:184
virtual void buildGeometry(unsigned int tesselate_x, unsigned int tesselate_y, unsigned int tesselate_z)
build cube geometry
int getYSize() const
get y length
int getZSize() const
get z length
Widget to view Langmuir Simulation in real time.
Definition: langmuirviewer.h:47
A class to represent a textured box.
Definition: box.h:13
void textureChanged(GLuint imageID)
signal that the texture has changed
show texture on the +z
Definition: box.h:39
QOpenGLBuffer * m_texturesVBO
texture buffer
Definition: box.h:202
Face
the faces to show texture on
Definition: box.h:32
unsigned int m_numIndices
index count
Definition: box.h:211
virtual void makeConnections()
make signal/slot connections
void setTexture(GLuint imageID)
set texture
double m_halfXSize
half xsize
Definition: box.h:178
unsigned int m_numVertices
number of vertices (3 * number of points)
Definition: box.h:208
void setFaces(Faces faces)
set the list of faces to show texture on
show texture on the -y
Definition: box.h:36