Commit ea281a92 authored by Matthias Möller's avatar Matthias Möller
Browse files

fix type conversion

git-svn-id: http://www.openflipper.org/svnrepo/OpenFlipper/branches/Free@17170 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 35b330e1
......@@ -114,12 +114,12 @@ GLState::GLState(bool _updateGL)
max_render_passes_(1),
bb_min_(ACG::Vec3d(0.0,0.0,0.0)),
bb_max_(ACG::Vec3d(0.0,0.0,0.0)),
left_(-1.0),
bottom_(1.0),
width_(2.0),
height_(2.0),
glwidth_(2.0),
glheight_(2.0),
left_(-1),
bottom_(1),
width_(2),
height_(2),
glwidth_(2),
glheight_(2),
near_plane_(1.0),
far_plane_(100.0),
multisampling_(false),
......
......@@ -94,10 +94,10 @@ public:
bsplineCurve_(_bsc),
pick_radius_(0.1),
resolution_(16),
polygon_color_( Vec4f(34.0/255.0, 139.0/255.0, 34.0/255.0, 1.0) ),
polygon_highlight_color_( Vec4f(1.0, 1.0, 0.0, 1.0) ),
curve_color_( Vec4f(178.0/255.0, 34.0/255.0, 34.0/255.0, 1.0) ),
curve_highlight_color_( Vec4f(1.0, 1.0, 1.0, 1.0) ),
polygon_color_( Vec4f(34.f/255.f, 139.f/255.f, 34.f/255.f, 1.f) ),
polygon_highlight_color_( Vec4f(1.f, 1.f, 0.f, 1.f) ),
curve_color_( Vec4f(178.f/255.f, 34.f/255.f, 34.f/255.f, 1.f) ),
curve_highlight_color_( Vec4f(1.f, 1.f, 1.f, 1.f) ),
render_control_polygon_(true),
render_bspline_curve_(true),
bspline_draw_mode_(NORMAL),
......
......@@ -357,7 +357,7 @@ drawSurface(GLState& _state, bool _fill)
#else
gluNurbsProperty(theNurb, GLU_SAMPLING_METHOD, GLU_PARAMETRIC_ERROR);
#endif
gluNurbsProperty(theNurb, GLU_PARAMETRIC_TOLERANCE, 0.2);
gluNurbsProperty(theNurb, GLU_PARAMETRIC_TOLERANCE, 0.2f);
}
......@@ -1300,7 +1300,7 @@ draw_textured_nurbs( GLState& /*_state*/)
gluNurbsProperty(theNurb, GLU_SAMPLING_METHOD, GLU_PARAMETRIC_ERROR);
#endif
gluNurbsProperty(theNurb, GLU_PARAMETRIC_TOLERANCE, 0.2);
gluNurbsProperty(theNurb, GLU_PARAMETRIC_TOLERANCE, 0.2f);
// get min/max knots of domain defining patch (partition of unity)
float minu( knots_m[bsplineSurface_.degree_m()]);
......
......@@ -97,7 +97,7 @@ class BSplineSurfaceNodeT : public BaseNode
bspline_selection_draw_mode_(NONE),
pick_radius_(1.0),
resolution_(16),
controlnet_color_( Vec4f(34.0/255.0, 139.0/255.0, 34.0/255.0, 1.0) ),
controlnet_color_( Vec4f(34.f/255.f, 139.f/255.f, 34.f/255.f, 1.f) ),
controlnet_highlight_color_( Vec4f(1.0f, 1.0f, 1.0f, 1.0f) ),
surface_color_( Vec4f(178.0f/255.0f, 34.0f/255.0f, 34.0f/255.0f, 1.0f) ),
surface_highlight_color_( Vec4f(1.0f, 1.0f, 1.0f, 1.0f) ),
......
......@@ -16,7 +16,7 @@
namespace ACG {
namespace SceneGraph {
#define axis_length 0.1
const float axis_length = 0.1f;
//== IMPLEMENTATION ==========================================================
......@@ -422,9 +422,9 @@ void CameraNode::updateBoundingBoxes(GLMatrixd& _modelview) {
far_half_width_ = far_half_height_ * aspectRatio_;
}
OpenMesh::Vec3f e = OpenMesh::Vec3f(modelView_(0,3), modelView_(1,3), modelView_(2,3));
OpenMesh::Vec3d e = OpenMesh::Vec3d(modelView_(0,3), modelView_(1,3), modelView_(2,3));
OpenMesh::Vec3f tmp(std::max(1.41421, half_width_), std::max(1.41421, half_height_), 1.41421);
OpenMesh::Vec3d tmp(std::max(1.41421, half_width_), std::max(1.41421, half_height_), 1.41421);
bbmin_ = e - tmp;
bbmax_ = e + tmp;
......
......@@ -76,19 +76,19 @@ LightSource::LightSource()
enabled_ = false;
fixedPosition_ = false;
ambientColor_ = Vec4f(0.1,0.1,0.1,1.0);
diffuseColor_ = Vec4f(1.0,1.0,1.0,1.0);
specularColor_ = Vec4f(1.0,1.0,1.0,1.0);
ambientColor_ = Vec4f(0.1f,0.1f,0.1f,1.f);
diffuseColor_ = Vec4f(1.f,1.f,1.f,1.f);
specularColor_ = Vec4f(1.f,1.f,1.f,1.f);
position_ = Vec4f(0.0,0.0,1.0,0.0);
realPosition_ = Vec4f(0.0,0.0,1.0,0.0);
position_ = Vec4f(0.f,0.f,1.f,0.f);
realPosition_ = Vec4f(0.f,0.f,1.f,0.f);
spotDirection_ = Vec3d(0.0,0.0,-1.0);
realSpotDirection_ = Vec3d(0.0,0.0,-1.0);
// Holds initial light source position
// converted to camera coordinates
initialPosition_ = Vec4f(0.0, 0.0, 0.0, 0.0);
initialPosition_ = Vec4f(0.f, 0.f, 0.f, 0.f);
initialSpotDirection_ = Vec3d(0.0, 0.0, -1.0);
initialPositionInit_ = false;
......
......@@ -210,7 +210,7 @@ draw(GLState& _state, const DrawModes::DrawMode& _drawMode)
ACG::GLState::vertexPointer(&ps[0]);
float line_width_old = _state.line_width();
_state.set_color( Vec4f(0.8, 0, 0, 1) );
_state.set_color( Vec4f(0.8f, 0.f, 0.f, 1.f) );
_state.set_line_width(1);
int stride = polyline_.vertex_binormals_available() ? 3 : 2;
......@@ -222,7 +222,7 @@ draw(GLState& _state, const DrawModes::DrawMode& _drawMode)
glEnd();
if (polyline_.vertex_binormals_available()) {
_state.set_color( Vec4f(0, 0, 0.8, 1) );
_state.set_color( Vec4f(0.f, 0.f, 0.8f, 1.f) );
glBegin(GL_LINES);
for (unsigned int i = 0; i < polyline_.n_vertices(); ++i) {
glArrayElement(stride * i);
......
......@@ -79,7 +79,7 @@ VolumeMeshNodeT<VolumeMeshT>::VolumeMeshNodeT(const VolumeMesh& _mesh,
mesh_(_mesh),
scale_(1.0),
boundary_only_(false),
translucency_factor_(0.1),
translucency_factor_(0.1f),
selection_color_(ACG::Vec4f(1.0f, 0.0f, 0.0f, 1.0f)),
statusAttrib_(_statusAttrib),
colorAttrib_(_colorAttrib),
......
......@@ -46,8 +46,8 @@
//******************************************************************************
const ACG::Vec4f disabled_color (0.4,0.4,0.4,1.0);
const ACG::Vec4f selected_color (0.0,1.0,0.0,0.5);
const ACG::Vec4f disabled_color (0.4f,0.4f,0.4f,1.f);
const ACG::Vec4f selected_color (0.f,1.f,0.f,0.5f);
//******************************************************************************
......
Supports Markdown
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