Avogadro
1.1.0
|
Hits from OpenGL selections/picking. More...
#include <avogadro/glhit.h>
Public Member Functions | |
GLHit () | |
GLHit (const GLHit &glHit) | |
GLHit (GLuint type, GLuint name, GLuint minZ, GLuint maxZ) | |
~GLHit () | |
bool | operator< (const GLHit &other) const |
bool | operator== (const GLHit &other) const |
GLHit & | operator= (const GLHit &other) |
GLuint | type () const |
GLuint | name () const |
GLuint | minZ () const |
GLuint | maxZ () const |
void | setType (GLuint type) |
void | setName (GLuint name) |
void | setMinZ (GLuint minZ) |
void | setMaxZ (GLuint maxZ) |
Hits from OpenGL selections/picking.
Provides an easy to use class to contain OpenGL hits returned from the process of picking. This class relies on the Engine subclasses properly naming the objects that they are rendering. For more information see the Engine documentation.
Blank constructor.
Avogadro::GLHit::GLHit | ( | const GLHit & | glHit | ) |
Copy constructor.
Avogadro::GLHit::GLHit | ( | GLuint | type, |
GLuint | name, | ||
GLuint | minZ, | ||
GLuint | maxZ | ||
) |
Constructor.
type | The type of the OpenGL object that was picked which corresponds to the Primitive::Type for the object (i.e. type==Primitive::AtomType means an Atom was picked). |
name | The name of the OpenGL object that was picked corresponding to the primitive index (i.e. name==1 means Atom 1). |
minZ | minimum window Z value of the hit |
maxZ | maximum window Z value of the hit |
Destructor.
GLuint Avogadro::GLHit::maxZ | ( | ) | const |
GLuint Avogadro::GLHit::minZ | ( | ) | const |
GLuint Avogadro::GLHit::name | ( | ) | const |
Referenced by Avogadro::GLWidget::computeClickedAtom(), Avogadro::GLWidget::computeClickedBond(), Avogadro::GLWidget::computeClickedPrimitive(), GLHit(), and setName().
bool Avogadro::GLHit::operator< | ( | const GLHit & | other | ) | const |
Less than operator.
other | the other GLHit object to compare to. |
true
: false
bool Avogadro::GLHit::operator== | ( | const GLHit & | other | ) | const |
Equivalence operator.
other | the other GLHit object to test equivalence with. |
void Avogadro::GLHit::setMaxZ | ( | GLuint | maxZ | ) |
maxZ | maximum z value to set for this object. |
References maxZ().
void Avogadro::GLHit::setMinZ | ( | GLuint | minZ | ) |
minZ | minimum z value to set for this object. |
References minZ().
void Avogadro::GLHit::setName | ( | GLuint | name | ) |
name | new object name. |
References name().
void Avogadro::GLHit::setType | ( | GLuint | type | ) |
type | new object type. |
References type().
GLuint Avogadro::GLHit::type | ( | ) | const |
Referenced by Avogadro::GLWidget::computeClickedAtom(), Avogadro::GLWidget::computeClickedBond(), Avogadro::GLWidget::computeClickedPrimitive(), GLHit(), and setType().