Commit f14e9612 authored by Mike Kremer's avatar Mike Kremer

Renamed class to InfoMeshObjectPlugin.

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@11432 383ad7c9-94d9-4d36-a494-682f7c89f535
parent b78354af
......@@ -42,7 +42,7 @@
//=============================================================================
//
// CLASS InfoPlugin - IMPLEMENTATION
// CLASS InfoMeshObjectPlugin - IMPLEMENTATION
//
//=============================================================================
......@@ -69,12 +69,12 @@
//== IMPLEMENTATION ==========================================================
void InfoPlugin::initializePlugin() {
void InfoMeshObjectPlugin::initializePlugin() {
infoBar_ = new InfoBar();
}
/// initialize the plugin
void InfoPlugin::pluginsInitialized() {
void InfoMeshObjectPlugin::pluginsInitialized() {
//set the slot descriptions
setDescriptions();
......@@ -88,14 +88,14 @@ void InfoPlugin::pluginsInitialized() {
//-----------------------------------------------------------------------------
DataType InfoPlugin::supportedDataTypes() {
DataType InfoMeshObjectPlugin::supportedDataTypes() {
return DataType(DATA_POLY_MESH | DATA_TRIANGLE_MESH);
}
//-----------------------------------------------------------------------------
template< class MeshT >
void InfoPlugin::printMeshInfo( MeshT* _mesh , int _id, unsigned int _face, ACG::Vec3d& _hitPoint ) {
void InfoMeshObjectPlugin::printMeshInfo( MeshT* _mesh , int _id, unsigned int _face, ACG::Vec3d& _hitPoint ) {
QLocale locale;
......@@ -366,7 +366,7 @@ void InfoPlugin::printMeshInfo( MeshT* _mesh , int _id, unsigned int _face, ACG:
*/
template <class MeshT>
int InfoPlugin::getClosestVertex(MeshT* _mesh, int _face_idx) {
int InfoMeshObjectPlugin::getClosestVertex(MeshT* _mesh, int _face_idx) {
typename MeshT::FaceVertexIter fv_it;
......@@ -403,7 +403,7 @@ int InfoPlugin::getClosestVertex(MeshT* _mesh, int _face_idx) {
*/
template <class MeshT>
int InfoPlugin::getClosestEdge(MeshT* _mesh, int _face_idx) {
int InfoMeshObjectPlugin::getClosestEdge(MeshT* _mesh, int _face_idx) {
typename MeshT::ConstFaceHalfedgeIter fh_it;
typename MeshT::VertexHandle v1, v2;
......@@ -444,7 +444,7 @@ int InfoPlugin::getClosestEdge(MeshT* _mesh, int _face_idx) {
//----------------------------------------------------------------------------------------------
void
InfoPlugin::
InfoMeshObjectPlugin::
slotInformationRequested(const QPoint _clickedPoint, DataType _type) {
// Only respond on mesh objects
......@@ -478,7 +478,7 @@ InfoPlugin::
//------------------------------------------------------------------------------
template< class MeshT >
void InfoPlugin::getEdgeLengths(MeshT* _mesh, double &min, double &max, double &mean)
void InfoMeshObjectPlugin::getEdgeLengths(MeshT* _mesh, double &min, double &max, double &mean)
{
typename MeshT::ConstEdgeIter e_it(_mesh->edges_sbegin()),
e_end(_mesh->edges_end());
......@@ -500,7 +500,7 @@ void InfoPlugin::getEdgeLengths(MeshT* _mesh, double &min, double &max, double &
//------------------------------------------------------------------------------
bool InfoPlugin::getEdgeLengths(int _id, double &min, double &max, double &mean)
bool InfoMeshObjectPlugin::getEdgeLengths(int _id, double &min, double &max, double &mean)
{
BaseObjectData* object;
if ( ! PluginFunctions::getObject(_id,object) )
......@@ -539,7 +539,7 @@ bool InfoPlugin::getEdgeLengths(int _id, double &min, double &max, double &mean)
//------------------------------------------------------------------------------
void InfoPlugin::slotObjectUpdated( int /*_identifier*/ , const UpdateType _type){
void InfoMeshObjectPlugin::slotObjectUpdated( int /*_identifier*/ , const UpdateType _type){
if ( (PluginFunctions::objectCount() == 1) || (PluginFunctions::targetCount() == 1) ){
......@@ -600,16 +600,16 @@ void InfoPlugin::slotObjectUpdated( int /*_identifier*/ , const UpdateType _type
//------------------------------------------------------------------------------
void InfoPlugin::slotObjectSelectionChanged( int _identifier ){
void InfoMeshObjectPlugin::slotObjectSelectionChanged( int _identifier ){
slotObjectUpdated( _identifier , UPDATE_ALL );
}
//------------------------------------------------------------------------------
void InfoPlugin::slotAllCleared(){
void InfoMeshObjectPlugin::slotAllCleared(){
infoBar_->hideCounts();
}
Q_EXPORT_PLUGIN2( InfoPlugin , InfoPlugin );
Q_EXPORT_PLUGIN2( InfoMeshObjectPlugin , InfoMeshObjectPlugin );
......@@ -42,7 +42,7 @@
//=============================================================================
//
// CLASS InfoPlugin
// CLASS InfoMeshObjectPlugin
//
// Author: David Bommes <bommes@cs.rwth-aachen.de>
//=============================================================================
......@@ -73,7 +73,7 @@
Plugin to visualize information about objects in the scene
*/
class InfoPlugin : public QObject, BaseInterface, InformationInterface, LoggingInterface, StatusbarInterface
class InfoMeshObjectPlugin : public QObject, BaseInterface, InformationInterface, LoggingInterface, StatusbarInterface
{
Q_OBJECT
Q_INTERFACES(BaseInterface)
......@@ -109,10 +109,10 @@ class InfoPlugin : public QObject, BaseInterface, InformationInterface, LoggingI
public :
// default constructor
InfoPlugin(): info_(0),infoBar_(0) {};
InfoMeshObjectPlugin(): info_(0),infoBar_(0) {};
// default destructor
~InfoPlugin() {};
~InfoMeshObjectPlugin() {};
/// Name of the Plugin
QString name(){ return (QString("InfoMeshObject")); };
......
......@@ -52,7 +52,7 @@
/** \brief set the descriptions for scripting slots
*
*/
void InfoPlugin::setDescriptions(){
void InfoMeshObjectPlugin::setDescriptions(){
emit setSlotDescription("vertexCount(int)",tr("get total number of vertices for a given object"),
QStringList(tr("objectID")), QStringList(tr("id of an object")));
......@@ -120,7 +120,7 @@ void InfoPlugin::setDescriptions(){
* @param _id object id
* @return number of vertices or -1 if an error occured
*/
int InfoPlugin::vertexCount(int _id)
int InfoMeshObjectPlugin::vertexCount(int _id)
{
BaseObjectData* object;
......@@ -162,7 +162,7 @@ int InfoPlugin::vertexCount(int _id)
* @param _id object id
* @return number of edges or -1 if an error occured
*/
int InfoPlugin::edgeCount(int _id)
int InfoMeshObjectPlugin::edgeCount(int _id)
{
BaseObjectData* object;
......@@ -204,7 +204,7 @@ int InfoPlugin::edgeCount(int _id)
* @param _id object id
* @return number of faces or -1 if an error occured
*/
int InfoPlugin::faceCount(int _id)
int InfoMeshObjectPlugin::faceCount(int _id)
{
BaseObjectData* object;
......@@ -246,7 +246,7 @@ int InfoPlugin::faceCount(int _id)
* @param _id object id
* @return number of boundaries or -1 if an error occured
*/
int InfoPlugin::boundaryCount(int _id)
int InfoMeshObjectPlugin::boundaryCount(int _id)
{
BaseObjectData* object;
......@@ -288,7 +288,7 @@ int InfoPlugin::boundaryCount(int _id)
* @param _id object id
* @return number of components or -1 if an error occured
*/
int InfoPlugin::componentCount(int _id)
int InfoMeshObjectPlugin::componentCount(int _id)
{
BaseObjectData* object;
......@@ -330,7 +330,7 @@ int InfoPlugin::componentCount(int _id)
* @param _id id of an object
* @return the genus
*/
int InfoPlugin::genus(int _id)
int InfoMeshObjectPlugin::genus(int _id)
{
BaseObjectData* object;
......@@ -372,7 +372,7 @@ int InfoPlugin::genus(int _id)
* @param _id id of an object
* @return the center of gravity
*/
Vector InfoPlugin::cog(int _id)
Vector InfoMeshObjectPlugin::cog(int _id)
{
BaseObjectData* object;
......@@ -414,7 +414,7 @@ Vector InfoPlugin::cog(int _id)
* @param _id id of an object
* @return minimum point of the bounding box
*/
Vector InfoPlugin::boundingBoxMin(int _id)
Vector InfoMeshObjectPlugin::boundingBoxMin(int _id)
{
BaseObjectData* object;
......@@ -464,7 +464,7 @@ Vector InfoPlugin::boundingBoxMin(int _id)
* @param _id id of an object
* @return maximum point of the bounding box
*/
Vector InfoPlugin::boundingBoxMax(int _id)
Vector InfoMeshObjectPlugin::boundingBoxMax(int _id)
{
BaseObjectData* object;
......@@ -514,7 +514,7 @@ Vector InfoPlugin::boundingBoxMax(int _id)
* @param _id id of an object
* @return size of the bounding box
*/
Vector InfoPlugin::boundingBoxSize(int _id)
Vector InfoMeshObjectPlugin::boundingBoxSize(int _id)
{
BaseObjectData* object;
......@@ -565,7 +565,7 @@ Vector InfoPlugin::boundingBoxSize(int _id)
* @param _edgeHandle edge handle
* @return edge length or -1 if an error occured
*/
double InfoPlugin::edgeLength(int _id, int _edgeHandle)
double InfoMeshObjectPlugin::edgeLength(int _id, int _edgeHandle)
{
BaseObjectData* object;
......@@ -630,7 +630,7 @@ double InfoPlugin::edgeLength(int _id, int _edgeHandle)
* @param _faceHandle face handle
* @return face area or -1 if an error occured
*/
double InfoPlugin::faceArea(int _id, int _faceHandle)
double InfoMeshObjectPlugin::faceArea(int _id, int _faceHandle)
{
BaseObjectData* object;
......@@ -705,7 +705,7 @@ double InfoPlugin::faceArea(int _id, int _faceHandle)
* @param _faceHandle face handle
* @return aspect ratio or -1 if an error occured
*/
double InfoPlugin::aspectRatio(int _id, int _faceHandle)
double InfoMeshObjectPlugin::aspectRatio(int _id, int _faceHandle)
{
BaseObjectData* object;
......@@ -758,7 +758,7 @@ double InfoPlugin::aspectRatio(int _id, int _faceHandle)
* @param _vertexHandle vertex handle
* @return vertex valence or -1 if an error occured
*/
int InfoPlugin::vertexValence (int _id, int _vertexHandle)
int InfoMeshObjectPlugin::vertexValence (int _id, int _vertexHandle)
{
BaseObjectData* object;
......@@ -827,7 +827,7 @@ int InfoPlugin::vertexValence (int _id, int _vertexHandle)
* @param _id object id
* @return minimal edge length or -1 if an error occured
*/
double InfoPlugin::minEdgeLength(int _id)
double InfoMeshObjectPlugin::minEdgeLength(int _id)
{
double min, max, mean;
......@@ -844,7 +844,7 @@ double InfoPlugin::minEdgeLength(int _id)
* @param _id object id
* @return maximal edge length or -1 if an error occured
*/
double InfoPlugin::maxEdgeLength(int _id)
double InfoMeshObjectPlugin::maxEdgeLength(int _id)
{
double min, max, mean;
......@@ -861,7 +861,7 @@ double InfoPlugin::maxEdgeLength(int _id)
* @param _id object id
* @return mean edge length or -1 if an error occured
*/
double InfoPlugin::meanEdgeLength(int _id)
double InfoMeshObjectPlugin::meanEdgeLength(int _id)
{
double min, max, mean;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment