Commit 38706c26 authored by reichenbach's avatar reichenbach
Browse files

[MERGE] updated grid branch

parents 9438255f c465e29c
[usersubs]
allopenwalnutcommits@dergrosse.de = *
math@informatik.uni-leipzig.de = *
ebaum@informatik.uni-leipzig.de = *
reichenbach@informatik.uni-leipzig.de = *
philips@zimbra.cbs.mpg.de = *
wiebel@informatik.uni-leipzig.de = *
\ No newline at end of file
all-openwalnut-commits@lists.informatik.uni-leipzig.de = *
\ No newline at end of file
......@@ -1324,7 +1324,11 @@ INCLUDE_FILE_PATTERNS =
PREDEFINED = OUTLINE \
_GNU_SOURCE \
NODEBUG
NODEBUG \
WGE_EXPORT \
OWCOMMON_EXPORT \
OWDATAHANDLER_EXPORT \
OWKERNEL_EXPORT
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
......
......@@ -1324,7 +1324,11 @@ INCLUDE_FILE_PATTERNS =
PREDEFINED = OUTLINE \
_GNU_SOURCE \
NODEBUG
NODEBUG \
WGE_EXPORT \
OWCOMMON_EXPORT \
OWDATAHANDLER_EXPORT \
OWKERNEL_EXPORT
# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
# this tag can be used to specify a list of macro names that should be expanded.
......
......@@ -55,6 +55,14 @@ compatiblesToolBarPos = 0 # position of the compatibles toolbar (overrides toolB
# dsbInvisibleByDefault = yes # hide the control panel on startup. Can be shown using F9.
# dsbFloatingByDefault = yes # should the control panel be undocked on startup?
# Here you can put any key sequence you would like to result in removing modules or ROIs
# Examples:
# deleteKey = Backspace
# deleteKey = Ctrl+J
# deleteKey = B
deleteModuleKey = Backspace
deleteROIKey = Del
####################################################################
# Other GUI settings
......@@ -65,4 +73,4 @@ compatiblesToolBarPos = 0 # position of the compatibles toolbar (overrides toolB
# bgColor.g = .9 # background color (green part)
# bgColor.b = .9 # background color (blue part)
zoomTrackballManipulator.allowThrow = yes # allow the auto-rotation thing when "throwing" an object with the mouse
# multiThreadedViewers = no # Use multiple threads for the multiple viewers. Causes hanging on some machines when opening a new view.
multiThreadedViewers = no # Use multiple threads for the multiple viewers. Causes hanging on some machines when opening a new view.
## This is a sample configuration file for OpenWalnut.
## Uncomment the options you are interested in.
[general]
allowOnlyOneFiberDataSet = yes # This will prevent you from accidently loading multiple fiber data sets.
[modules]
## use this to specify the default module to add during load.
## It is a comma seperated list. If this is not specified the
......@@ -12,7 +9,7 @@ allowOnlyOneFiberDataSet = yes # This will prevent you from accidently loading m
# default=HUD
## A list of modules that will be provided through the GUI.
## If the list is empty all available modules are provided.
whiteList = Arbitrary Plane,Coordinate System,Image Extractor,Paint Texture,Arbitrary Rois,Bounding Box,Distance Map Isosurface,Gauss Filtering,HUD,Isosurface,Isosurface Raytracer,LIC,Read Mesh,Voxelizer,Superquadric Glyphs,Triangle Mesh Renderer,Vector Plot,Write NIfTI
whiteList = Arbitrary Plane,Coordinate System,Image Extractor,Paint Texture,Arbitrary Rois,Bounding Box,Distance Map Isosurface,Gauss Filtering,HUD,Isosurface,Isosurface Raytracer,LIC,Read Mesh,Voxelizer,Superquadric Glyphs,Triangle Mesh Renderer,Vector Plot,Write NIfTI,Fiber Display,Read Spherical Harmonics,Navigation Slices,Deterministic Tract Clustering using Gaussian Processes,Deterministic Tract to Gaussian Process Converter,Cluster Param Display,Write Tracts,Fiber Resampling,Teem Glyphs
## Specify a ";" separated list of additional paths for modules. The order of appearance is the order of loading. The following additional rules apply here:
## 1. if the directory contains one or more libOWmodule_XYZ it/they get loaded
......@@ -61,6 +58,14 @@ compatiblesToolBarPos = 0 # position of the compatibles toolbar (overrides toolB
# dsbInvisibleByDefault = yes # hide the control panel on startup. Can be shown using F9.
# dsbFloatingByDefault = yes # should the control panel be undocked on startup?
# Here you can put any key sequence you would like to result in removing modules or ROIs
# Examples:
# deleteKey = Backspace
# deleteKey = Ctrl+J
# deleteKey = B
deleteModuleKey = Backspace
deleteROIKey = Del
####################################################################
# Other GUI settings
......@@ -70,5 +75,5 @@ compatiblesToolBarPos = 0 # position of the compatibles toolbar (overrides toolB
# bgColor.r = .9 # background color (red part)
# bgColor.g = .9 # background color (green part)
# bgColor.b = .9 # background color (blue part)
# zoomTrackballManipulator.allowThrow = yes # allow the auto-rotation thing when "throwing" an object with the mouse
zoomTrackballManipulator.allowThrow = no # allow the auto-rotation thing when "throwing" an object with the mouse
multiThreadedViewers = no # Use multiple threads for the multiple viewers. Causes hanging on some machines when opening a new view.
#!/bin/sh
# This script allows you to use PyClewn (Vim GDB integration) with walnut.
# get path of this script
BINDIR=`dirname "$0"`
SRCDIR=$BINDIR # we assume this. We test lateron whether this
# we assume that your source dir is two or tree levels up. Setting the working directory to the source dir
# eases file browsing vim later
if [ -d "$BINDIR/../../src" ]; then
SRCDIR="$BINDIR/../../src"
else
if [ -d "$BINDIR/../../../src" ]; then
SRCDIR="$BINDIR/../../../src"
else
echo "Could not find source dir." # this is not really critical.
fi
fi
# run walnut
pyclewn -c "-c \"cd $SRCDIR\"" -a $BINDIR/walnut "$*"
......@@ -13,6 +13,7 @@ ENDIF()
LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/../tools/CMakeModules )
# include custom CMake commands like assert
INCLUDE( ${PROJECT_SOURCE_DIR}/../tools/CMakeModules/Utils.cmake )
INCLUDE( ${PROJECT_SOURCE_DIR}/../tools/CMakeModules/OnlyOneBuildFile.cmake )
# mimic layout of install dir for build:
#----------------------------------------
......@@ -34,6 +35,17 @@ IF( CMAKE_GENERATOR MATCHES "Visual Studio" )
INCLUDE_DIRECTORIES( "${PROJECT_SOURCE_DIR}/common/platformDependent/visualStudio/" )
ENDIF()
OPTION( OW_BUILD_AS_ONE_BIG_FILE "Build every library as one big cpp" OFF )
INCLUDE( FindPythonInterp )
# define libnames
SET( OWCommonName "OWcommon" )
SET( OWDatahandlerName "OWdataHandler" )
SET( OWgeName "OWge" )
SET( OWguiName "OWgui" )
SET( OWguiqt4Name "OWguiqt4" )
SET( OWKernelName "OWkernel" )
SET( OWmodulesPrefix "OWmodule" )
# Package dependencies:
#----------------------
......@@ -139,6 +151,19 @@ IF( EIGEN3_FOUND )
MARK_AS_ADVANCED( EIGEN3_VERSION )
ENDIF()
### OPENCL ###
OPTION( OW_USE_OPENCL "Enable OpenCL if available." )
IF( OW_USE_OPENCL )
FIND_PACKAGE( OpenCL QUIET )
IF( OPENCL_FOUND )
INCLUDE_DIRECTORIES( ${OPENCL_INCLUDE_DIR} )
INCLUDE_DIRECTORIES( ${OPENCL_CPP_INCLUDE_DIR} )
LINK_LIBRARIES( ${OPENCL_LIBRARY} )
MARK_AS_ADVANCED( OPENCL_INCLUDE_DIR )
MARK_AS_ADVANCED( OPENCL_LIBRARY )
ENDIF()
ENDIF( OW_USE_OPENCL )
### CUDA #### (e.g. for the detTractClustering module )
OPTION( OW_USE_CUDA "Enable CUDA if available. Minimum version required is 2.3" )
IF( OW_USE_CUDA )
......@@ -202,7 +227,7 @@ IF( CMAKE_GENERATOR MATCHES "Visual Studio" )
SET( CMAKE_SHARED_LINKER_FLAGS " /STACK:10000000 /machine:I386 /NODEFAULTLIB:${EXCLUDE_LIBRARIES}" CACHE STRING "" FORCE )
SET( CMAKE_EXE_LINKER_FLAGS " /STACK:10000000 /machine:I386 /NODEFAULTLIB:${EXCLUDE_LIBRARIES}" CACHE STRING "" FORCE )
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /D \"NOMINMAX\"" )
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP" )
SET( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /wd4101" )
SET( CMAKE_DEBUG_POSTFIX "d" CACHE STRING "add a postfix, usually d on windows" )
ELSE()
# Unfortunately libstdc++'s header files don't work with mingw in ansi mode (basically libstdc++'s fault)
......@@ -252,7 +277,7 @@ ENDIF()
# finally, build walnut
ADD_EXECUTABLE( walnut OpenWalnut.cpp version.h )
TARGET_LINK_LIBRARIES( walnut OWkernel OWdataHandler OWgui OWguiqt4 OWcommon OWge ${Boost_LIBRARIES} )
TARGET_LINK_LIBRARIES( walnut ${OWKernelName} ${OWDatahandlerName} ${OWguiName} ${OWguiqt4Name} ${OWCommonName} ${OWgeName} ${Boost_LIBRARIES} )
IF(MSVC_IDE)
SET_TARGET_PROPERTIES( walnut PROPERTIES DEBUG_POSTFIX "d")
......@@ -293,8 +318,8 @@ ENDIF()
#---------- walnut.cfg file -------------
IF( NOT EXISTS ${PROJECT_BINARY_DIR}/bin/${SHARED_FILES_RELATIVE}/walnut.cfg )
CONFIGURE_FILE( ${PROJECT_SOURCE_DIR}/../doc/user/walnut.cfg.mpi ${PROJECT_BINARY_DIR}/bin/${SHARED_FILES_RELATIVE}/walnut.cfg COPYONLY )
MESSAGE( STATUS "Copied ${PROJECT_SOURCE_DIR}/../doc/user/walnut.cfg.mpi to ${PROJECT_BINARY_DIR}/bin/${SHARED_FILES_RELATIVE}/walnut.cfg" )
CONFIGURE_FILE( ${PROJECT_SOURCE_DIR}/../doc/user/walnut.cfg.official ${PROJECT_BINARY_DIR}/bin/${SHARED_FILES_RELATIVE}/walnut.cfg COPYONLY )
MESSAGE( STATUS "Copied ${PROJECT_SOURCE_DIR}/../doc/user/walnut.cfg.official to ${PROJECT_BINARY_DIR}/bin/${SHARED_FILES_RELATIVE}/walnut.cfg" )
ENDIF()
# Special targets:
......@@ -401,7 +426,25 @@ ADD_CUSTOM_TARGET( stylecheck
COMMENT "Check if code complies to CodingStandard"
)
#-------------------------------------------------------------------------------------------------------------
# Removes nasty windows line endings
ADD_CUSTOM_TARGET( removewinlineendings
COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/../tools/removeWinLineEnding.py ${PROJECT_BINARY_DIR}/brainlintlist
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
COMMENT "Removes Windows Line endings"
)
#-------------------------------------------------------------------------------------------------------------
# windows helper script to copy all files needed to build a release to one folder
IF( CMAKE_GENERATOR MATCHES "Visual Studio" )
ADD_CUSTOM_TARGET( copyWinRelease
COMMAND ${PYTHON_EXECUTABLE} ${PROJECT_SOURCE_DIR}/../tools/copyWinRelease.py
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}
COMMENT "Copys all the necessary Windows dll's and executables so binaries can easyly be distributed"
)
ENDIF( CMAKE_GENERATOR MATCHES "Visual Studio" )
#-------------------------------------------------------------------------------------------------------------
# Prints the verbose output of the test runners, so you may identify the source of error early, if any
ADD_CUSTOM_TARGET( vtest
COMMAND $(MAKE) test ARGS="-V"
......
......@@ -6,6 +6,6 @@ Directory Structure:
-gui
-dataHandler
-graphicsEngine
-math
-common
-kernel
-tools
......@@ -7,11 +7,28 @@ ADD_SUBDIRECTORY( datastructures )
ADD_SUBDIRECTORY( constraints )
ADD_SUBDIRECTORY( math )
ADD_LIBRARY( OWcommon SHARED ${COMMON_SRC} ${COMMON_DATASTRUCTURES_SRC} ${COMMON_EXCEPTIONS_SRC} ${MATH_SRC} ${FIBERSIMILARITY_SRC} )
TARGET_LINK_LIBRARIES( OWcommon ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} )
SET( LIB_NAME "${OWCommonName}" )
SET( ${LIB_NAME}_COMBINER_SRC ${COMMON_SRC} ${COMMON_DATASTRUCTURES_SRC} ${COMMON_EXCEPTIONS_SRC} ${MATH_SRC} )
SET( ${LIB_NAME}_ALL_CPP ${COMMON_SRC} ${COMMON_DATASTRUCTURES_SRC} ${COMMON_EXCEPTIONS_SRC} ${MATH_SRC} )
FILE( GLOB_RECURSE ${LIB_NAME}_REMOVE_H "*.h" )
LIST( REMOVE_ITEM ${LIB_NAME}_ALL_CPP ${${LIB_NAME}_REMOVE_H} )
IF( OW_BUILD_AS_ONE_BIG_FILE )
SET( UNITY_BUILD_FILE_NAME "${LIB_NAME}UnityBuildFile.cpp" )
GENERATE_UNITY_BUILD_FILE( ${LIB_NAME}_ALL_CPP )
ADD_LIBRARY( ${LIB_NAME} SHARED ${UNITY_BUILD_FILE_NAME} ${${LIB_NAME}_COMBINER_SRC} )
ENDIF( OW_BUILD_AS_ONE_BIG_FILE )
IF( NOT OW_BUILD_AS_ONE_BIG_FILE )
ADD_LIBRARY( ${LIB_NAME} SHARED ${${LIB_NAME}_COMBINER_SRC} )
ENDIF( NOT OW_BUILD_AS_ONE_BIG_FILE )
TARGET_LINK_LIBRARIES( ${LIB_NAME} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${OPENSCENEGRAPH_LIBRARIES} )
IF(MSVC_IDE)
SET_TARGET_PROPERTIES( OWcommon PROPERTIES PREFIX "../")
SET_TARGET_PROPERTIES( ${LIB_NAME} PROPERTIES PREFIX "../")
ENDIF(MSVC_IDE)
# Set the prefix and suffix of dynamically loadable modules to match
......@@ -28,7 +45,7 @@ ENDIF()
# Unit tests
IF( OW_COMPILE_TESTS )
CXXTEST_ADD_TESTS_FROM_LIST( "${COMMON_SRC}"
"OWcommon"
"${LIB_NAME}"
"WSegmentationFault.cpp" # can't test seg-faults ;-)
"WTransferable.cpp" # its an empty class
"WPropertyBase.cpp" # its an abstract class. Its small functionality is tested in WPropertyVariable_test.h
......
......@@ -148,6 +148,19 @@ public:
using osg::BoundingBoxImpl< VT >::contains;
/**
* Gives the front lower left aka minimum corner.
*
* \return Minimum corner.
*/
const vec_type& getMin() const;
/**
* Gives the back upper right aka maximum corner.
*
* \return Maximum corner.
*/
const vec_type& getMax() const;
protected:
private:
......@@ -271,6 +284,18 @@ inline std::ostream& operator<<( std::ostream& out, const WBoundingBoxImpl< VT >
return out;
}
template< class VT >
inline const typename WBoundingBoxImpl< VT >::vec_type& WBoundingBoxImpl< VT >::getMin() const
{
return osg::BoundingBoxImpl< VT >::_min;
}
template< class VT >
inline const typename WBoundingBoxImpl< VT >::vec_type& WBoundingBoxImpl< VT >::getMax() const
{
return osg::BoundingBoxImpl< VT >::_max;
}
typedef WBoundingBoxImpl< wmath::WVector3D > WBoundingBox;
#endif // WBOUNDINGBOX_H
......@@ -23,84 +23,15 @@
//---------------------------------------------------------------------------
#include <cmath>
#include <cassert>
#include <string>
#include <vector>
#include <boost/lexical_cast.hpp>
#include "../common/WStringUtils.h"
#include "../common/exceptions/WOutOfBounds.h"
#include "../common/WStringUtils.h"
#include "WColor.h"
WColor::WColor( float red, float green, float blue, float alpha )
: m_red( red ),
m_green( green ),
m_blue( blue ),
m_alpha( alpha )
{
// check if the given values are correct in range
// TODO(lmath): reenable asserts to WAsserts as soon as LIC module doesn't procude invalid colors
// assert( m_green <= 1.0 && m_green >= 0.0 && "WColor comopnent out of range" );
// assert( m_blue <= 1.0 && m_blue >= 0.0 && "WColor comopnent out of range" );
// assert( m_red <= 1.0 && m_red >= 0.0 && "WColor comopnent out of range" );
// assert( m_alpha <= 1.0 && m_alpha >= 0.0 && "WColor comopnent out of range" );
}
void WColor::setGreen( float green )
{
// TODO(lmath): reenable asserts to WAsserts as soon as LIC module doesn't procude invalid colors
// assert( green <= 1.0 && green >= 0.0 );
m_green = green;
}
void WColor::setBlue( float blue )
{
// TODO(lmath): reenable asserts to WAsserts as soon as LIC module doesn't procude invalid colors
// assert( blue <= 1.0 && blue >= 0.0 );
m_blue = blue;
}
void WColor::setRed( float red )
{
// TODO(lmath): reenable asserts to WAsserts as soon as LIC module doesn't procude invalid colors
// assert( red <= 1.0 && red >= 0.0 );
m_red = red;
}
void WColor::setAlpha( float alpha )
{
// TODO(lmath): reenable asserts to WAsserts as soon as LIC module doesn't procude invalid colors
// assert( alpha <= 1.0 && alpha >= 0.0 );
m_alpha = alpha;
}
float WColor::getRed() const
{
return m_red;
}
float WColor::getGreen() const
{
return m_green;
}
float WColor::getBlue() const
{
return m_blue;
}
float WColor::getAlpha() const
{
return m_alpha;
}
void WColor::setRGB( double r, double g, double b )
{
setRed( r );
setGreen( g );
setBlue( b );
}
// This function is taken from VTK 5.4.2. Since its BSD licensed the license
// notice follows below. It is not taken from FAnToM since it seems more self
// documenting.
......@@ -129,7 +60,7 @@ void WColor::setRGB( double r, double g, double b )
// Contact: pppebay@sandia.gov,dcthomp@sandia.gov,
//
// =========================================================================*/
void WColor::setHSV( double h, double s, double v )
WColor convertHSVtoRGBA( double h, double s, double v )
{
const double onethird = 1.0 / 3.0;
const double onesixth = 1.0 / 6.0;
......@@ -182,63 +113,10 @@ void WColor::setHSV( double h, double s, double v )
g = ( s * g + ( 1.0 - s ) ) * v;
b = ( s * b + ( 1.0 - s ) ) * v;
setRGB( r, g, b );
return WColor( r, g, b, 1.0f );
}
std::ostream& operator<<( std::ostream& out, const WColor& c )
WColor inverseColor( const WColor& other )
{
float r = c.getRed();
float g = c.getGreen();
float b = c.getBlue();
float a = c.getAlpha();
out << r << ";" << g << ";" << b << ";" << a;
return out;
return WColor( std::abs( 1.0f - other[0] ), std::abs( 1.0f - other[1] ), std::abs( 1.0f - other[2] ), other[3] );
}
std::istream& operator>>( std::istream& in, WColor& c )
{
std::string str;
in >> str;
std::vector<std::string> tokens;
tokens = string_utils::tokenize( str, ";" );
assert( tokens.size() == 4 && "There weren't 4 color values for a WColor" );
c.setRed( boost::lexical_cast< float >( tokens[0] ) );
c.setGreen( boost::lexical_cast< float >( tokens[1] ) );
c.setBlue( boost::lexical_cast< float >( tokens[2] ) );
c.setAlpha( boost::lexical_cast< float >( tokens[3] ) );
return in;
}
bool WColor::operator==( const WColor &rhs ) const
{
return m_red == rhs.m_red &&
m_green == rhs.m_green &&
m_blue == rhs.m_blue &&
m_alpha == rhs.m_alpha;
}
bool WColor::operator!=( const WColor &rhs ) const
{
return !( *this == rhs );
}
void WColor::inverse()
{
m_red = std::abs( 1. - m_red );
m_green = std::abs( 1. - m_green );
m_blue = std::abs( 1. - m_blue );
}
void WColor::average( const WColor& other )
{
m_red = ( m_red + other.getRed() ) / 2.0;
m_green = ( m_green + other.getGreen() ) / 2.0;
m_blue = ( m_blue + other.getBlue() ) / 2.0;
}
const WColor WColor::green( 0.0, 1.0, 0.0, 1.0 );
const WColor WColor::red( 1.0, 0.0, 0.0, 1.0 );
const WColor WColor::blue( 0.0, 0.0, 1.0, 1.0 );
......@@ -25,173 +25,50 @@
#ifndef WCOLOR_H
#define WCOLOR_H
#include <cassert>
#include <istream>
#include <ostream>
#include <string>
#include <vector>
#include <iostream>
#include <osg/Vec4>
#include <osg/io_utils> // for the operator<< and operator>> for Vec4
#include "math/WVector3D.h"
#include "WExportCommon.h"
/**
* Represents a RGBA Color
* Represents a RGBA Color.
*/
class OWCOMMON_EXPORT WColor
{
public:
/**
* Standard way of constructing colors, alpha is optional, and black is default
* \param red red value between [0,1]
* \param green green value between [0,1]
* \param blue blue value between [0,1]
* \param alpha opacity value between [0,1]
*/
WColor( float red = 0.0, float green = 0.0, float blue = 0.0, float alpha = 1.0 );
/**
* Casts a color to a vector comfortably.
*
* \return vector instance
*/
inline operator osg::Vec4f() const;
/**
* Casts a color to a vector comfortably. As the returned vector is three-dimensional, the alpha value is omitted.
*
* \return vector instance
*/
inline operator wmath::WVector3D() const;
/**
* Sets the green channel for this color
* \param green green value between [0,1]
*/
void setGreen( float green );
/**
* Sets the blue channel for this color
* \param blue blue value between [0,1]
*/
void setBlue( float blue );
/**
* Sets the red channel for this color
* \param red red value between [0,1]
*/
void setRed( float red );
/**
* Sets the alpha channel for this color
* \param alpha opacity value between [0,1]
*/
void setAlpha( float alpha );
/**
* \return red channel for this color
*/
float getRed() const;
/**
* \return green channel for this color
*/
float getGreen() const;
/**
* \return blue channel for this color
*/
float getBlue() const;
/**
* \return alpha channel for this color
*/
float getAlpha() const;
/**
* Reset this color via a given HSV color.
* \param h hue
* \param s saturation
* \param v value
*/
void setHSV( double h, double s, double v );
/**
* Reset all channels at once.
* \param r red value between [0,1]
* \param g green value between [0,1]
* \param b blue value between [0,1]
*/
void setRGB( double r, double g, double b );
/**
* Computes the inverse of this color in means of RGB space.
*/
void inverse();
/**
* Computes the arithmetic mean of this and the other color. This is done component wisely.
* For example red mixed with green will become yellow.
*
* \param other The other color to mix in here :D.
*/
void average( const WColor& other );
/**
* Compares two WColor instances on all four channels.
*
* \param rhs The other WColor instance
* \return True if they share the same values in all four channles:
* red, green, blue and alpha
*/
bool operator==( const WColor &rhs ) const;
/**
* Opposite of the operator==.
*
* \param rhs The other WColor instance
* \return True if they don't share the same values in all four channles:
* red, green, blue and alpha
*/
bool operator!=( const WColor &rhs ) const;
static const WColor green; //!< Default for green
static const WColor red; //!< Default for red
static const WColor blue; //!< Default for blue
protected:
private:
float m_red; //!< Red channel
float m_green; //!< Green channel
float m_blue; //!< Blue channel
float m_alpha; //!< Alpha channel
};
typedef osg::Vec4 WColor;
/**
* Write a color in string representation to the given output stream.