Skip to content

Commit

Permalink
Usar precompiled headers
Browse files Browse the repository at this point in the history
  • Loading branch information
robjperez committed Oct 18, 2020
1 parent 164520b commit 0b04866
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 18 deletions.
25 changes: 8 additions & 17 deletions EjerciciosFundamentos/EjerciciosFundamentos.cpp
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
// EjerciciosFundamentos.cpp : This file contains the 'main' function. Program execution begins and ends there.
//

#include <iostream>
#include <igl/cotmatrix.h>
#include <igl/readPLY.h>
#include <igl/opengl/glfw/Viewer.h>
#include "stdafx.h"

#include <Eigen/Dense>
#include <Eigen/Sparse>
using namespace std;

int main()
{
Expand All @@ -16,24 +12,19 @@ int main()
igl::readPLY("..\\gargoyle.25kv.ply", V, F);

// Ejercicio 1
/*Eigen::Vector3d centroide;
Eigen::Vector3d centroide = { 0, 0, 0 };

for (size_t i = 0; i < V.rows(); i++) {
centroide[0] += V(i, 0);
centroide[1] += V(i, 1);
centroide[2] += V(i, 2);
std::cout << centroide << std::endl;
for (size_t i = 0; i < V.rows(); i++) {
centroide += V.row(i);
}
centroide /= V.rows();

std::cout << "Centroide: " << centroide << std::endl;*/
cout << "Centroide= " << endl << centroide << endl;

// Plot the mesh
igl::opengl::glfw::Viewer viewer;
/*igl::opengl::glfw::Viewer viewer;
viewer.data().set_mesh(V, F);
viewer.launch();
viewer.launch();*/


return 0;
Expand Down
11 changes: 10 additions & 1 deletion EjerciciosFundamentos/EjerciciosFundamentos.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(SolutionDir)glfw\include;$(SolutionDir)glad\include;$(SolutionDir)libigl-master\include;$(SolutionDir)eigen-3.3.8</AdditionalIncludeDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<PrecompiledHeader>Use</PrecompiledHeader>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
Expand All @@ -146,8 +147,16 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\glad\src\glad.c" />
<ClCompile Include="..\glad\src\glad.c">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">NotUsing</PrecompiledHeader>
</ClCompile>
<ClCompile Include="EjerciciosFundamentos.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
8 changes: 8 additions & 0 deletions EjerciciosFundamentos/EjerciciosFundamentos.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,13 @@
<ClCompile Include="..\glad\src\glad.c">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
</Project>
1 change: 1 addition & 0 deletions EjerciciosFundamentos/stdafx.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
#include "stdafx.h"
8 changes: 8 additions & 0 deletions EjerciciosFundamentos/stdafx.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#pragma once
#include <iostream>
#include <igl/cotmatrix.h>
#include <igl/readPLY.h>
#include <igl/opengl/glfw/Viewer.h>

#include <Eigen/Dense>
#include <Eigen/Sparse>

0 comments on commit 0b04866

Please sign in to comment.