geom/src/OBJECT/GEOM_Constants.cxx

116 lines
3.3 KiB
C++
Raw Normal View History

2013-04-01 18:25:01 +06:00
// Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
2013-02-12 17:35:16 +06:00
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
//
// This library 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 2.1 of the License.
//
// This library 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 this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
// File : GEOM_Constants.cxx
// Author : Vadim SANDLER, Open CASCADE S.A.S. (vadim.sandler@opencascade.com)
#include "GEOM_Constants.h"
2014-01-15 15:27:18 +06:00
#include <limits.h>
2013-02-12 17:35:16 +06:00
namespace GEOM
{
/*!
\brief Get minimal allowed value for deflection coefficient
*/
double minDeflection()
{
return 1e-06; // DEFLECTION_MIN
}
/*!
\brief Get character used to separate parameter names
*/
QString sectionSeparator()
{
return "_"; // NAME_SEPARATOR
}
/*!
\brief Get character used to separate numeric parameter values (color = r:g:b)
*/
QString subSectionSeparator()
{
return ":"; // DIGIT_SEPARATOR
}
QString propertyName( Property type )
{
static const char* names[] = {
// visibility
"Visibility", // VISIBILITY_PROP
// transparency
"Transparency", // TRANSPARENCY_PROP
// display mode
"DisplayMode", // DISPLAY_MODE_PROP
// number of the iso lines (along u and v directions)
"Isos", // ISOS_PROP
// main / shading color
"Color", // COLOR_PROP
// "show edges direction" flag
"VectorMode", // VECTOR_MODE_PROP
// deflection coefficient
"DeflectionCoeff", // DEFLECTION_COEFF_PROP
// point marker data
"MarkerType", // MARKER_TYPE_PROP
// material
"Material", // MATERIAL_PROP
// general line width
"EdgeWidth", // EDGE_WIDTH_PROP
// isos width
"IsosWidth", // ISOS_WIDTH_PROP
// top-level flag
"TopLevelFlag", // TOP_LEVEL_PROP
// opacity
"Opacity", // OPACITY_PROP
// shading color
"ShadingColor", // -
// wireframe color
"WireframeColor", // -
// standalone edges color
"LineColor", // -
// free boundaries color
"FreeBndColor", // -
// points color
"PointColor", // -
// isos color
"IsosColor", // -
// outlines color
"OutlineColor", // -
2013-12-18 20:23:59 +06:00
// texture
"Texture", // -
2014-01-15 15:27:18 +06:00
// dimensions
"Dimensions" // -
2013-02-12 17:35:16 +06:00
};
return ( type >= GEOM::Visibility && type <= GEOM::LastProperty ) ? names[type] : QString();
}
2014-01-15 15:27:18 +06:00
/*!
\brief Id used for storing properties of objects in study shared between viewers.
*/
int sharedPropertiesId()
{
return INT_MIN;
}
2013-02-12 17:35:16 +06:00
} // namespace GEOM