BALL 1.5.0
Loading...
Searching...
No Matches
common.h File Reference
#include <BALL/DATATYPE/string.h>
#include <BALL/MATHS/vector3.h>
#include <BALL/CONCEPT/composite.h>
#include <BALL/DATATYPE/regularData3D.h>
#include <QtCore/QEvent>
#include <QtWidgets/QColorDialog>
#include <QtWidgets/QLabel>
#include <QtGui/QDropEvent>

Go to the source code of this file.

Classes

class  BALL::VIEW::LogEvent
 Event class used for thread safe output to logview. More...
 

Namespaces

namespace  BALL
 
namespace  BALL::VIEW
 

Macros

defines
#define VIEW_DEFAULT_PORT   20000
 
#define BALL_ASSIGN_NAME(OBJ)
 

Enumerations

General enumerations, methods and typedefs

These predefined types are used in VIEW for portability and comprehensibility.

enum  BALL::VIEW::EventsIDs {
  BALL::VIEW::MESSAGE_EVENT = 60000 , BALL::VIEW::LOG_EVENT , BALL::VIEW::TRANSFORMATION_EVENT_6D , BALL::VIEW::HEADTRACKING_EVENT ,
  BALL::VIEW::MOTIONTRACKING_EVENT , BALL::VIEW::BUTTON_PRESS_EVENT , BALL::VIEW::BUTTON_RELEASE_EVENT , BALL::VIEW::NOTIFICATION_EVENT ,
  BALL::VIEW::RENDER_TO_BUFFER_FINISHED_EVENT
}
 

Enumerations for Representations and Renderer

Enums and methods to describe the models and drawing methods.

#define BALL_VIEW_MAXIMAL_DRAWING_MODE   4
 Number of drawing modes.
 
#define BALL_VIEW_MAXIMAL_DRAWING_PRECISION   4
 Number of drawing precisions.
 
#define BALL_VIEW_MAXIMAL_DISPLAY_LIST_OBJECT_SIZE   BALL_VIEW_MAXIMAL_DRAWING_PRECISION * BALL_VIEW_MAXIMAL_DRAWING_MODE
 MAXIMAL_DRAWING_PRECISION * MAXIMAL_DRAWING_MODE.
 
#define BALLVIEW_DEBUG
 BALLView Debug macro.
 
enum  BALL::VIEW::DrawingMode { BALL::VIEW::DRAWING_MODE_DOTS = 0 , BALL::VIEW::DRAWING_MODE_WIREFRAME , BALL::VIEW::DRAWING_MODE_SOLID , BALL::VIEW::DRAWING_MODE_TOON }
 Enumeration for Drawing Modes. More...
 
enum  BALL::VIEW::DrawingPrecision {
  BALL::VIEW::DRAWING_PRECISION_INVALID = -1 , BALL::VIEW::DRAWING_PRECISION_LOW = 0 , BALL::VIEW::DRAWING_PRECISION_MEDIUM , BALL::VIEW::DRAWING_PRECISION_HIGH ,
  BALL::VIEW::DRAWING_PRECISION_ULTRA
}
 Enumeration for Drawing Precisions. More...
 
enum  BALL::VIEW::ModelType {
  BALL::VIEW::MODEL_LINES = 0 , BALL::VIEW::MODEL_STICK , BALL::VIEW::MODEL_BALL_AND_STICK , BALL::VIEW::MODEL_VDW ,
  BALL::VIEW::MODEL_SE_SURFACE , BALL::VIEW::MODEL_SA_SURFACE , BALL::VIEW::MODEL_BACKBONE , BALL::VIEW::MODEL_CARTOON ,
  BALL::VIEW::MODEL_RIBBON , BALL::VIEW::MODEL_HBONDS , BALL::VIEW::MODEL_FORCES , BALL::VIEW::MODEL_LABEL = 100 ,
  BALL::VIEW::MODEL_CONTOUR_SURFACE , BALL::VIEW::MODEL_GRID_SLICE , BALL::VIEW::MODEL_GRID_VOLUME , BALL::VIEW::MODEL_FIELD_LINES ,
  BALL::VIEW::MODEL_INFORMATIONS , BALL::VIEW::MODEL_COORDINATE_SYSTEM , BALL::VIEW::MODEL_PROXIMITY_LIGHT , BALL::VIEW::MODEL_PLANE ,
  BALL::VIEW::MODEL_SPHERE , BALL::VIEW::MODEL_UNKNOWN = 200
}
 
enum  BALL::VIEW::ColoringMethod {
  BALL::VIEW::COLORING_ELEMENT = 0 , BALL::VIEW::COLORING_RESIDUE_INDEX , BALL::VIEW::COLORING_RESIDUE_NAME , BALL::VIEW::COLORING_SECONDARY_STRUCTURE ,
  BALL::VIEW::COLORING_ATOM_CHARGE , BALL::VIEW::COLORING_DISTANCE , BALL::VIEW::COLORING_TEMPERATURE_FACTOR , BALL::VIEW::COLORING_OCCUPANCY ,
  BALL::VIEW::COLORING_FORCES , BALL::VIEW::COLORING_RESIDUE_TYPE , BALL::VIEW::COLORING_CHAIN , BALL::VIEW::COLORING_MOLECULE ,
  BALL::VIEW::COLORING_CUSTOM , BALL::VIEW::COLORING_UNKNOWN = 200
}
 
BALL_VIEW_EXPORT float BALL::VIEW::SurfaceDrawingPrecisions [4]
 Mapping from the enum to the float values of Surfaces.
 
BALL_VIEW_EXPORT Composite BALL::VIEW::composite_to_be_ignored_for_colorprocessors_
 
float BALL::VIEW::icosaeder_vertices [12][3]
 Code to refine a icosaeder:
 
Position BALL::VIEW::icosaeder_indices [20][3]
 
BALL_VIEW_EXPORT String BALL::VIEW::vector3ToString (const Vector3 &v)
 
BALL_VIEW_EXPORT bool BALL::VIEW::stringToVector3 (const String &data, Vector3 &v)
 
BALL_VIEW_EXPORT String BALL::VIEW::createFloatString (float value, Size precision)
 create a string from a float and cut after a given number of digits after the dot
 
BALL_VIEW_EXPORT MainControlBALL::VIEW::getMainControl ()
 
BALL_VIEW_EXPORT String BALL::VIEW::createTemporaryFilename ()
 Create a temporary filename in the users home dir.
 
BALL_VIEW_EXPORT Vector3 BALL::VIEW::getNormal (const Vector3 &v)
 
BALL_VIEW_EXPORT void BALL::VIEW::logString (const String &data)
 thread safe output to logview
 
BALL_VIEW_EXPORT void BALL::VIEW::processDropEvent (QDropEvent *e)
 
BALL_VIEW_EXPORT Camera BALL::VIEW::focusCamera (Composite *composite)
 
BALL_VIEW_EXPORT Camera BALL::VIEW::focusCamera (const std::list< Vector3 > &points)
 
BALL_VIEW_EXPORT String BALL::VIEW::ascii (const QString &str)
 
BALL_VIEW_EXPORT ColorRGBA BALL::VIEW::getColor (const QLabel *label)
 
BALL_VIEW_EXPORT void BALL::VIEW::setColor (const QLabel *label, const ColorRGBA &color)
 
BALL_VIEW_EXPORT QColor BALL::VIEW::chooseColor (QLabel *label)
 
BALL_VIEW_EXPORT void BALL::VIEW::setTextColor (QLabel *label, const ColorRGBA &color)
 
BALL_VIEW_EXPORT void BALL::VIEW::cubicInterpolation (const Vector3 &a, const Vector3 &b, const Vector3 &tangent_a, const Vector3 &tangent_b, std::vector< Vector3 > &interpolated_values)
 
BALL_VIEW_EXPORT void BALL::VIEW::subdivideTriangle (vector< Vector3 > &results, Vector3 &v1, Vector3 &v2, Vector3 &v3, Size precision)
 
BALL_VIEW_EXPORT vector< Vector3BALL::VIEW::createSphere (Size precision)
 
BALL_VIEW_EXPORT void BALL::VIEW::calculateHistogramEqualization (const vector< float > &values, vector< float > &normalized_values, bool use_absolute_values=false)
 
BALL_VIEW_EXPORT void BALL::VIEW::calculateRandomPoints (const RegularData3D &grid, Size nr_points, vector< Vector3 > &resulting_points)
 calcualte a random set of points, dependening of the field strength of a grid
 

Macro Definition Documentation

◆ BALL_ASSIGN_NAME

#define BALL_ASSIGN_NAME ( OBJ)
Value:
OBJ->setObjectName(#OBJ);

Assign the name of a QObject to its variable name, needed e.g. for the GUI testing

Definition at line 54 of file VIEW/KERNEL/common.h.

◆ BALL_VIEW_MAXIMAL_DISPLAY_LIST_OBJECT_SIZE

#define BALL_VIEW_MAXIMAL_DISPLAY_LIST_OBJECT_SIZE   BALL_VIEW_MAXIMAL_DRAWING_PRECISION * BALL_VIEW_MAXIMAL_DRAWING_MODE

MAXIMAL_DRAWING_PRECISION * MAXIMAL_DRAWING_MODE.

Definition at line 150 of file VIEW/KERNEL/common.h.

◆ BALL_VIEW_MAXIMAL_DRAWING_MODE

#define BALL_VIEW_MAXIMAL_DRAWING_MODE   4

Number of drawing modes.

Definition at line 125 of file VIEW/KERNEL/common.h.

◆ BALL_VIEW_MAXIMAL_DRAWING_PRECISION

#define BALL_VIEW_MAXIMAL_DRAWING_PRECISION   4

Number of drawing precisions.

Definition at line 147 of file VIEW/KERNEL/common.h.

◆ BALLVIEW_DEBUG

#define BALLVIEW_DEBUG
Value:
logString(String("A problem occurred in ") + __FILE__ + " " + \
String(__LINE__) + ". Please notify us on GitHub: " + \
"https://github.com/ball-project/ball/issues\n");

BALLView Debug macro.

Definition at line 358 of file VIEW/KERNEL/common.h.

◆ VIEW_DEFAULT_PORT

#define VIEW_DEFAULT_PORT   20000

The default port for the VIEW::Server. Default port is 20000.

See also
Server

Definition at line 50 of file VIEW/KERNEL/common.h.