mirror of
https://github.com/lucaspalomodevelop/meshlab.git
synced 2026-03-15 00:54:38 +00:00
Merge branch 'master' of https://github.com/cnr-isti-vclab/meshlab into texdefrag-fix
This commit is contained in:
commit
52cfb990af
@ -29,10 +29,9 @@ apps:
|
||||
|
||||
parts:
|
||||
meshlab:
|
||||
plugin: [qmake, cmake]
|
||||
plugin: qmake
|
||||
qt-version: qt5
|
||||
source: https://github.com/cnr-isti-vclab/meshlab.git
|
||||
build-snaps: [cmake]
|
||||
build-packages:
|
||||
- cmake
|
||||
- qt5-default
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
# Copyright 2019, 2021, Visual Computing Lab, ISTI - Italian National Research Council
|
||||
# SPDX-License-Identifier: BSL-1.0
|
||||
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
project(MeshLab)
|
||||
|
||||
### Build options
|
||||
|
||||
@ -61,7 +61,7 @@ void GLExtensionsManager::initializeGLextensions()
|
||||
if (!glewInitialized) {
|
||||
glewExperimental = GL_TRUE;
|
||||
GLenum err = glewInit();
|
||||
if (err != GLEW_OK && err != GLEW_ERROR_NO_GLX_DISPLAY) {
|
||||
if (err != GLEW_OK) {
|
||||
throw MLException(QString("GLEW initialization failed: %1\n")
|
||||
.arg((const char *)glewGetErrorString(err)));
|
||||
}
|
||||
|
||||
@ -134,11 +134,15 @@ void MLPoliciesStandAloneFunctions::maskMeaninglessAttributesPerPrimitiveModalit
|
||||
}
|
||||
}
|
||||
|
||||
void MLPoliciesStandAloneFunctions::updatedRendAttsAccordingToPriorities(const MLRenderingData::PRIMITIVE_MODALITY pm,const MLRenderingData::RendAtts& updated,const MLRenderingData::RendAtts& current,MLRenderingData::RendAtts& result)
|
||||
void MLPoliciesStandAloneFunctions::updatedRendAttsAccordingToPriorities(
|
||||
const MLRenderingData::PRIMITIVE_MODALITY pm,
|
||||
const MLRenderingData::RendAtts& updated, //from the result of the filter
|
||||
const MLRenderingData::RendAtts& current, //from the current model
|
||||
MLRenderingData::RendAtts& result) //returned final result
|
||||
{
|
||||
MLRenderingData::RendAtts filteredupdated = updated;
|
||||
MLRenderingData::RendAtts tmp = current;
|
||||
tmp[MLRenderingData::ATT_NAMES::ATT_VERTPOSITION] |= filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTPOSITION];
|
||||
MLRenderingData::RendAtts filteredupdated = updated;
|
||||
MLRenderingData::RendAtts tmp = current; // tmp will be then saved in returned
|
||||
tmp[MLRenderingData::ATT_NAMES::ATT_VERTPOSITION] |= filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTPOSITION];
|
||||
if ((pm == MLRenderingData::PR_WIREFRAME_TRIANGLES) || (pm == MLRenderingData::PR_WIREFRAME_EDGES))
|
||||
{
|
||||
tmp[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL] = false;
|
||||
@ -146,15 +150,18 @@ void MLPoliciesStandAloneFunctions::updatedRendAttsAccordingToPriorities(const M
|
||||
}
|
||||
else
|
||||
{
|
||||
//vert normal shading if in current or in updated
|
||||
tmp[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL] |= filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL];
|
||||
tmp[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] = (tmp[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] || filteredupdated[MLRenderingData::ATT_NAMES::ATT_FACENORMAL]) && !(filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL]);
|
||||
// tmp[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] = (tmp[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] || filteredupdated[MLRenderingData::ATT_NAMES::ATT_FACENORMAL]) && !(filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTNORMAL]);
|
||||
//face normal shading if in current and in updated
|
||||
tmp[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] = (tmp[MLRenderingData::ATT_NAMES::ATT_FACENORMAL] && filteredupdated[MLRenderingData::ATT_NAMES::ATT_FACENORMAL]);
|
||||
}
|
||||
|
||||
|
||||
tmp[MLRenderingData::ATT_NAMES::ATT_VERTCOLOR] |= filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTCOLOR];
|
||||
tmp[MLRenderingData::ATT_NAMES::ATT_FACECOLOR] = (tmp[MLRenderingData::ATT_NAMES::ATT_FACECOLOR] || filteredupdated[MLRenderingData::ATT_NAMES::ATT_FACECOLOR]) && !(filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTCOLOR]);
|
||||
tmp[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE] |= filteredupdated[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE];
|
||||
tmp[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE] = (tmp[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE] || filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE]) && !(filteredupdated[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE]);
|
||||
result = tmp;
|
||||
tmp[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE] |= filteredupdated[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE];
|
||||
tmp[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE] = (tmp[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE] || filteredupdated[MLRenderingData::ATT_NAMES::ATT_VERTTEXTURE]) && !(filteredupdated[MLRenderingData::ATT_NAMES::ATT_WEDGETEXTURE]);
|
||||
result = tmp;
|
||||
}
|
||||
|
||||
void MLPoliciesStandAloneFunctions::suggestedDefaultPerViewRenderingData(MeshModel* meshmodel,MLRenderingData& dtout, size_t minpolnumpersmoothshading)
|
||||
|
||||
@ -74,13 +74,13 @@ QString FilterCameraPlugin::filterName(ActionIDType filterId) const
|
||||
QString FilterCameraPlugin::filterInfo(ActionIDType filterId) const
|
||||
{
|
||||
switch(filterId) {
|
||||
case FP_SET_MESH_CAMERA : return QString("This filter allows one to set a shot for the current mesh");
|
||||
case FP_SET_RASTER_CAMERA : return QString("This filter allows one to set a shot for the current mesh");
|
||||
case FP_QUALITY_FROM_CAMERA : return QString("Compute vertex quality using the camera definition, according to viewing angle or distance");
|
||||
case FP_CAMERA_ROTATE : return QString("Rotate the camera, or all the cameras of the project. The selected raster is the reference if viewpoint rotation is selected.");
|
||||
case FP_CAMERA_SCALE : return QString("Scale the camera, or all the cameras of the project. The selected raster is the reference if viewpoint scaling is selected.");
|
||||
case FP_CAMERA_TRANSLATE : return QString("Translate the camera, or all the cameras of the project.");
|
||||
case FP_CAMERA_TRANSFORM : return QString("Transform the camera extrinsics, or all the cameras of the project.");
|
||||
case FP_SET_MESH_CAMERA : return QString("This filter allows one to set a shot for the current mesh");
|
||||
case FP_SET_RASTER_CAMERA : return QString("This filter allows one to set a shot for the current mesh");
|
||||
case FP_QUALITY_FROM_CAMERA : return QString("Compute vertex quality using the camera definition, according to viewing angle or distance");
|
||||
case FP_CAMERA_ROTATE : return QString("Rotate the camera, or all the cameras of the project. The selected raster is the reference if viewpoint rotation is selected.");
|
||||
case FP_CAMERA_SCALE : return QString("Scale the camera, or all the cameras of the project. The selected raster is the reference if viewpoint scaling is selected.");
|
||||
case FP_CAMERA_TRANSLATE : return QString("Translate the camera, or all the cameras of the project.");
|
||||
case FP_CAMERA_TRANSFORM : return QString("Transform the camera extrinsics, or all the cameras of the project.");
|
||||
case FP_ORIENT_NORMALS_WITH_CAMERAS:return QString("Reorient vertex normals using cameras. For this filter to work the mesh needs to have the attribute 'correspondences' which is only created when loading Bundler files (.out projects)");
|
||||
default : assert(0);
|
||||
}
|
||||
|
||||
@ -1 +1 @@
|
||||
Subproject commit c150c3f6b66edbb21e96d02d373af264b44afdc2
|
||||
Subproject commit 5c0ea8b20ea95adfc3a443ef60e02ee54057ec41
|
||||
Loading…
x
Reference in New Issue
Block a user