diff options
Diffstat (limited to 'thirdparty/thekla_atlas/nvmesh/geometry')
4 files changed, 0 insertions, 136 deletions
diff --git a/thirdparty/thekla_atlas/nvmesh/geometry/Bounds.cpp b/thirdparty/thekla_atlas/nvmesh/geometry/Bounds.cpp deleted file mode 100644 index 69fd1deb24..0000000000 --- a/thirdparty/thekla_atlas/nvmesh/geometry/Bounds.cpp +++ /dev/null @@ -1,54 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño <castano@gmail.com> - -#include "nvmesh.h" // pch - -#include "Bounds.h" - -#include "nvmesh/BaseMesh.h" -#include "nvmesh/halfedge/Mesh.h" -#include "nvmesh/halfedge/Vertex.h" - -#include "nvmath/Box.inl" - -using namespace nv; - -Box MeshBounds::box(const BaseMesh * mesh) -{ - nvCheck(mesh != NULL); - - Box bounds; - bounds.clearBounds(); - - const uint vertexCount = mesh->vertexCount(); - for (uint v = 0; v < vertexCount; v++) - { - const BaseMesh::Vertex & vertex = mesh->vertexAt(v); - bounds.addPointToBounds( vertex.pos ); - } - - return bounds; -} - -Box MeshBounds::box(const HalfEdge::Mesh * mesh) -{ - nvCheck(mesh != NULL); - - Box bounds; - bounds.clearBounds(); - - const uint vertexCount = mesh->vertexCount(); - for (uint v = 0; v < vertexCount; v++) - { - const HalfEdge::Vertex * vertex = mesh->vertexAt(v); - nvDebugCheck(vertex != NULL); - bounds.addPointToBounds( vertex->pos ); - } - - return bounds; -} - -/*Sphere MeshBounds::sphere(const HalfEdge::Mesh * mesh) -{ - // @@ TODO - return Sphere(); -}*/ diff --git a/thirdparty/thekla_atlas/nvmesh/geometry/Bounds.h b/thirdparty/thekla_atlas/nvmesh/geometry/Bounds.h deleted file mode 100644 index 1cb5b7b905..0000000000 --- a/thirdparty/thekla_atlas/nvmesh/geometry/Bounds.h +++ /dev/null @@ -1,28 +0,0 @@ -// This code is in the public domain -- Ignacio Castaño <castano@gmail.com> - -#pragma once -#ifndef NV_MESH_MESHBOUNDS_H -#define NV_MESH_MESHBOUNDS_H - -#include <nvmath/Sphere.h> -#include <nvmath/Box.h> - -#include <nvmesh/nvmesh.h> - -namespace nv -{ - class BaseMesh; - namespace HalfEdge { class Mesh; } - - // Bounding volumes computation. - namespace MeshBounds - { - Box box(const BaseMesh * mesh); - Box box(const HalfEdge::Mesh * mesh); - - Sphere sphere(const HalfEdge::Mesh * mesh); - } - -} // nv namespace - -#endif // NV_MESH_MESHBOUNDS_H diff --git a/thirdparty/thekla_atlas/nvmesh/geometry/Measurements.cpp b/thirdparty/thekla_atlas/nvmesh/geometry/Measurements.cpp deleted file mode 100644 index e0c271663b..0000000000 --- a/thirdparty/thekla_atlas/nvmesh/geometry/Measurements.cpp +++ /dev/null @@ -1,36 +0,0 @@ -// This code is in the public domain -- castano@gmail.com - -#include "nvmesh.h" // pch - -#include "Measurements.h" -#include "nvmesh/halfedge/Mesh.h" -#include "nvmesh/halfedge/Face.h" - -using namespace nv; - -float nv::computeSurfaceArea(const HalfEdge::Mesh * mesh) -{ - float area = 0; - - for (HalfEdge::Mesh::ConstFaceIterator it(mesh->faces()); !it.isDone(); it.advance()) - { - const HalfEdge::Face * face = it.current(); - area += face->area(); - } - nvDebugCheck(area >= 0); - - return area; -} - -float nv::computeParametricArea(const HalfEdge::Mesh * mesh) -{ - float area = 0; - - for (HalfEdge::Mesh::ConstFaceIterator it(mesh->faces()); !it.isDone(); it.advance()) - { - const HalfEdge::Face * face = it.current(); - area += face->parametricArea(); - } - - return area; -} diff --git a/thirdparty/thekla_atlas/nvmesh/geometry/Measurements.h b/thirdparty/thekla_atlas/nvmesh/geometry/Measurements.h deleted file mode 100644 index 0be863b79e..0000000000 --- a/thirdparty/thekla_atlas/nvmesh/geometry/Measurements.h +++ /dev/null @@ -1,18 +0,0 @@ -// This code is in the public domain -- castano@gmail.com - -#pragma once -#ifndef NV_MESH_MESHMEASUREMENTS_H -#define NV_MESH_MESHMEASUREMENTS_H - -#include "nvmesh/nvmesh.h" - -namespace nv -{ - namespace HalfEdge { class Mesh; } - - float computeSurfaceArea(const HalfEdge::Mesh * mesh); - float computeParametricArea(const HalfEdge::Mesh * mesh); - -} // nv namespace - -#endif // NV_MESH_MESHMEASUREMENTS_H |