Commit 51a6d2e4 authored by Alexander Wiebel's avatar Alexander Wiebel
Browse files

[STYLE #396] fixed all the wrong style

parent c8b895bf
This diff is collapsed.
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2015 A. Betz, D- Gerlicher, OpenWalnut Community, Nemtics, BSV@Uni-Leipzig
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WMPICKINGDVR_H
#define WMPICKINGDVR_H
......@@ -9,11 +33,11 @@
//#define WMEDU_PICKING_DEBUG
//Module Defines
#define WMEDU_PICKING_MAX_INT "Picking - Maximum Intensity"
#define WMEDU_PICKING_FIRST_HIT "Picking - First Hit"
#define WMEDU_PICKING_THRESHOLD "Picking - Threshold"
#define WMEDU_PICKING_MOST_CONTRIBUTING "Picking - Most Contributing"
#define WMEDU_PICKING_WYSIWYP "Picking - WYSIWYP"
#define WMEDU_PICKING_MAX_INT "Picking - Maximum Intensity"
#define WMEDU_PICKING_FIRST_HIT "Picking - First Hit"
#define WMEDU_PICKING_THRESHOLD "Picking - Threshold"
#define WMEDU_PICKING_MOST_CONTRIBUTING "Picking - Most Contributing"
#define WMEDU_PICKING_WYSIWYP "Picking - WYSIWYP"
// forward declarations to reduce compile dependencies
......@@ -32,7 +56,7 @@ public:
/**
* Creates the module for drawing contour lines.
*/
WMPickingDVR();
WMPickingDVR();
/**
* Destroys this module.
......@@ -123,7 +147,7 @@ private:
*/
boost::shared_ptr< WCondition > m_propCondition;
/**
/**
* We want some nice shading effects, so we need a nice shader.
*/
WGEShader::RefPtr m_shader;
......@@ -147,18 +171,18 @@ private:
* Double Property: Alpha Value and alpha Percentage
*/
WPropDouble m_alphaThreshold;
/**
/**
* Double Property: Picking Crosshair Thinkness
*/
WPropDouble m_crossThickness;
/**
/**
* Double Property: Picking Crosshair Size
*/
WPropDouble m_crossSize;
/**
/**
* Current Method
*/
WPropSelection m_pickingCritereaCur;
......@@ -166,18 +190,18 @@ private:
/**
* Possible Criterion
*/
boost::shared_ptr< WItemSelection > m_pickingCritereaList;
boost::shared_ptr< WItemSelection > m_pickingCritereaList;
/**
* Intersection Positions
*/
osg::Vec3f m_posStart;
osg::Vec3f m_posEnd;
/**
* Intersection Positions
*/
osg::Vec3f m_posStart;
osg::Vec3f m_posEnd;
/**
* Boolean to check if the intersected positions are valid
*/
bool m_bIntersected;
/**
* Boolean to check if the intersected positions are valid
*/
bool m_bIntersected;
};
#endif // WMPICKINGDVR_H
#ifndef MODULES_PICKINGDVR_WMPICKINGDVRHELPER_H_
#define MODULES_PICKINGDVR_WMPICKINGDVRHELPER_H_
//---------------------------------------------------------------------------
//
// Project: OpenWalnut ( http://www.openwalnut.org )
//
// Copyright 2015 A. Betz, D. Gerlicher, OpenWalnut Community, Nemtics, BSV@Uni-Leipzig
// For more information see http://www.openwalnut.org/copying
//
// This file is part of OpenWalnut.
//
// OpenWalnut is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// OpenWalnut is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU Lesser General Public License for more details.
//
// You should have received a copy of the GNU Lesser General Public License
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
//
//---------------------------------------------------------------------------
#ifndef WMPICKINGDVRHELPER_H
#define WMPICKINGDVRHELPER_H
template <typename T>
class WMEDUColor
{
private:
T red;
T green;
T blue;
T alpha;
T red;
T green;
T blue;
T alpha;
public:
WMEDUColor();
WMEDUColor(T red, T green, T fBlue, T alpha);
//Getter
T getRed();
T getGreen();
T getBlue();
T getAlpha();
//Setter
void setRed(T red);
void setGreen(T green);
void setBlue(T blue);
void setAlpha(T alpha);
void normalize();
WMEDUColor();
WMEDUColor( T red, T green, T fBlue, T alpha );
//Getter
T getRed();
T getGreen();
T getBlue();
T getAlpha();
//Setter
void setRed( T red );
void setGreen( T green );
void setBlue( T blue );
void setAlpha( T alpha );
void normalize();
};
template <typename T>
WMEDUColor<T>::WMEDUColor()
: WMEDUColor(0.0, 0.0, 0.0, 0.0)
: WMEDUColor( 0.0, 0.0, 0.0, 0.0 )
{
}
template <typename T>
WMEDUColor<T>::WMEDUColor(T red, T green, T blue, T alpha)
: red(red), green(green), blue(blue), alpha(alpha)
WMEDUColor<T>::WMEDUColor( T red, T green, T blue, T alpha )
: red( red ), green( green ), blue( blue ), alpha( alpha )
{
}
......@@ -48,60 +71,60 @@ WMEDUColor<T>::WMEDUColor(T red, T green, T blue, T alpha)
template <typename T>
T WMEDUColor<T>::getRed()
{
return this->red;
return this->red;
}
template <typename T>
T WMEDUColor<T>::getGreen()
{
return this->green;
return this->green;
}
template <typename T>
T WMEDUColor<T>::getBlue()
{
return this->blue;
return this->blue;
}
template <typename T>
T WMEDUColor<T>::getAlpha()
{
return this->alpha;
return this->alpha;
}
//Setter
template <typename T>
void WMEDUColor<T>::setRed(T red)
void WMEDUColor<T>::setRed( T red )
{
this->red = red;
this->red = red;
}
template <typename T>
void WMEDUColor<T>::setGreen(T green)
void WMEDUColor<T>::setGreen( T green )
{
this->green = green;
this->green = green;
}
template <typename T>
void WMEDUColor<T>::setBlue(T blue)
void WMEDUColor<T>::setBlue( T blue )
{
this->blue = blue;
this->blue = blue;
}
template <typename T>
void WMEDUColor<T>::setAlpha(T alpha)
void WMEDUColor<T>::setAlpha( T alpha )
{
this->alpha = alpha;
this->alpha = alpha;
}
template <typename T>
void WMEDUColor<T>::normalize()
{
this->red = this->red / 255.0;
this->green = this->green / 255.0;
this->blue = this->blue / 255.0;
this->alpha = this->alpha / 255.0;
this->red = this->red / 255.0;
this->green = this->green / 255.0;
this->blue = this->blue / 255.0;
this->alpha = this->alpha / 255.0;
}
#endif /* MODULES_PICKINGDVR_WMPICKINGDVRHELPER_H_ */
#endif // WMPICKINGDVRHELPER_H
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