From 4f3162ece5110d1668e07efff739a26b7cfcd369 Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Wed, 24 Mar 2021 15:48:57 +0100 Subject: [PATCH] all included from used_types.h have been made self sufficient --- vcg/complex/used_types.h | 1 - vcg/connectors/hedge.h | 9 ++++++++- vcg/connectors/hedge_component.h | 5 ++++- vcg/simplex/edge/base.h | 16 +++++++++++++--- vcg/simplex/edge/component.h | 13 ++++++++++--- vcg/simplex/face/base.h | 20 ++++++++++++++------ vcg/simplex/face/component.h | 12 +++++++++--- vcg/simplex/face/component_ocf.h | 12 +++++++++--- vcg/simplex/face/component_polygon.h | 6 +++++- vcg/simplex/tetrahedron/base.h | 11 +++++++---- vcg/simplex/tetrahedron/component.h | 2 ++ vcg/simplex/vertex/base.h | 11 ++++++++--- vcg/simplex/vertex/component.h | 12 +++++++++--- vcg/simplex/vertex/component_ocf.h | 16 ++++++++++------ 14 files changed, 108 insertions(+), 38 deletions(-) diff --git a/vcg/complex/used_types.h b/vcg/complex/used_types.h index 04daf9bb..570dd1ce 100755 --- a/vcg/complex/used_types.h +++ b/vcg/complex/used_types.h @@ -23,7 +23,6 @@ #ifndef VCG_USED_TYPES_H #define VCG_USED_TYPES_H -#include #include #include #include diff --git a/vcg/connectors/hedge.h b/vcg/connectors/hedge.h index e0785681..48f72a33 100644 --- a/vcg/connectors/hedge.h +++ b/vcg/connectors/hedge.h @@ -20,11 +20,18 @@ * for more details. * * * ****************************************************************************/ -#include #ifndef __VCG_HEDGE_ #define __VCG_HEDGE_ +#include +#include + +#include +#include + +#include "hedge_component.h" + namespace vcg { /*------------------------------------------------------------------*/ diff --git a/vcg/connectors/hedge_component.h b/vcg/connectors/hedge_component.h index 8c48a8d9..12c441a8 100644 --- a/vcg/connectors/hedge_component.h +++ b/vcg/connectors/hedge_component.h @@ -20,11 +20,14 @@ * for more details. * * * ****************************************************************************/ -#include #ifndef __VCG_HEDGE_COMPONENT #define __VCG_HEDGE_COMPONENT +#include +#include +#include + namespace vcg { namespace hedge { /* diff --git a/vcg/simplex/edge/base.h b/vcg/simplex/edge/base.h index 472a635b..42309db1 100644 --- a/vcg/simplex/edge/base.h +++ b/vcg/simplex/edge/base.h @@ -20,11 +20,21 @@ * for more details. * * * ****************************************************************************/ -#ifndef __VCG_MESH -#error "This file should not be included alone. It is automatically included by complex.h" -#endif +//#ifndef __VCG_MESH +//#error "This file should not be included alone. It is automatically included by complex.h" +//#endif #ifndef __VCG_EDGE_PLUS #define __VCG_EDGE_PLUS + +#include +#include +#include + +#include +#include + +#include "component.h" + namespace vcg { /*------------------------------------------------------------------*/ /* diff --git a/vcg/simplex/edge/component.h b/vcg/simplex/edge/component.h index 69d32765..9c44c073 100644 --- a/vcg/simplex/edge/component.h +++ b/vcg/simplex/edge/component.h @@ -20,12 +20,19 @@ * for more details. * * * ****************************************************************************/ -#ifndef __VCG_MESH -#error "This file should not be included alone. It is automatically included by complex.h" -#endif +//#ifndef __VCG_MESH +//#error "This file should not be included alone. It is automatically included by complex.h" +//#endif #ifndef __VCG_EDGE_PLUS_COMPONENT #define __VCG_EDGE_PLUS_COMPONENT +#include +#include +#include + +#include + + namespace vcg { namespace edge { diff --git a/vcg/simplex/face/base.h b/vcg/simplex/face/base.h index e96e541d..8f208cbd 100644 --- a/vcg/simplex/face/base.h +++ b/vcg/simplex/face/base.h @@ -20,12 +20,20 @@ * for more details. * * * ****************************************************************************/ -#ifndef __VCG_MESH -#error "This file should not be included alone. It is automatically included by complex.h" -#endif +//#ifndef __VCG_MESH +//#error "This file should not be included alone. It is automatically included by complex.h" +//#endif #ifndef __VCG_FACE_PLUS #define __VCG_FACE_PLUS +#include +#include + +#include +#include + +#include "component.h" + namespace vcg { /*------------------------------------------------------------------*/ @@ -163,16 +171,16 @@ public: /// select the Face void SetS() {this->Flags() |=SELECTED;} /// Un-select a Face - void ClearS() {this->Flags() &= ~SELECTED;} + void ClearS() {this->Flags() &= ~SELECTED;} /// select the Face void SetV() {this->Flags() |=VISITED;} /// Un-select a Face - void ClearV() {this->Flags() &= ~VISITED;} + void ClearV() {this->Flags() &= ~VISITED;} /// This function checks if the face is selected bool IsB(int i) const {return (this->cFlags() & (BORDER0<Flags() |=(BORDER0<Flags() |=(BORDER0<Flags() &= (~(BORDER0< +#include +#include + +#include +#include namespace vcg { namespace face { diff --git a/vcg/simplex/face/component_ocf.h b/vcg/simplex/face/component_ocf.h index 3f676006..919b1a55 100644 --- a/vcg/simplex/face/component_ocf.h +++ b/vcg/simplex/face/component_ocf.h @@ -22,9 +22,15 @@ ****************************************************************************/ #ifndef __VCG_FACE_PLUS_COMPONENT_OCF #define __VCG_FACE_PLUS_COMPONENT_OCF -#ifndef __VCG_MESH -#error "This file should not be included alone. It is automatically included by complex.h" -#endif +//#ifndef __VCG_MESH +//#error "This file should not be included alone. It is automatically included by complex.h" +//#endif + +#include +#include + +#include +#include namespace vcg { namespace face { diff --git a/vcg/simplex/face/component_polygon.h b/vcg/simplex/face/component_polygon.h index b17c2f85..0a7cdd04 100644 --- a/vcg/simplex/face/component_polygon.h +++ b/vcg/simplex/face/component_polygon.h @@ -24,6 +24,10 @@ #ifndef __VCG_POLYGON_COMPONENT #define __VCG_POLYGON_COMPONENT +#include +#include +#include + namespace vcg { namespace face { @@ -60,7 +64,7 @@ public: typedef typename T::VertexType::ScalarType ScalarType; typedef typename T::VertexType VertexType; - PFVAdj(){ _vpoly = NULL; } + PFVAdj(){ _vpoly = nullptr; } /* Note: the destructor will not be called in general because there are no virtual destructors. * Instead, the job of deallocating the memory will be done by the face allocator. * This destructor is only done for those who istance a face alone (outside a mesh) diff --git a/vcg/simplex/tetrahedron/base.h b/vcg/simplex/tetrahedron/base.h index b5e9bc71..d541503c 100644 --- a/vcg/simplex/tetrahedron/base.h +++ b/vcg/simplex/tetrahedron/base.h @@ -36,10 +36,13 @@ added #ifndef __VCG_TETRA_PLUS #define __VCG_TETRA_PLUS -//#include -//#include -//#include -//#include +#include +#include + +#include +#include + +#include "component.h" namespace vcg { diff --git a/vcg/simplex/tetrahedron/component.h b/vcg/simplex/tetrahedron/component.h index 7cd9781d..cb1a6e87 100644 --- a/vcg/simplex/tetrahedron/component.h +++ b/vcg/simplex/tetrahedron/component.h @@ -34,6 +34,8 @@ added #define __VCG_TETRAHEDRON_PLUS_COMPONENT #include + +#include #include namespace vcg { diff --git a/vcg/simplex/vertex/base.h b/vcg/simplex/vertex/base.h index 29ec6fb5..649546f1 100644 --- a/vcg/simplex/vertex/base.h +++ b/vcg/simplex/vertex/base.h @@ -20,12 +20,17 @@ * for more details. * * * ****************************************************************************/ -#ifndef __VCG_MESH -#error "This file should not be included alone. It is automatically included by complex.h" -#endif +//#ifndef __VCG_MESH +//#error "This file should not be included alone. It is automatically included by complex.h" +//#endif #ifndef __VCG_VERTEX_PLUS #define __VCG_VERTEX_PLUS +#include +#include + +#include "component.h" + namespace vcg { diff --git a/vcg/simplex/vertex/component.h b/vcg/simplex/vertex/component.h index f4cab3c9..4a1396d8 100644 --- a/vcg/simplex/vertex/component.h +++ b/vcg/simplex/vertex/component.h @@ -20,12 +20,18 @@ * for more details. * * * ****************************************************************************/ -#ifndef __VCG_MESH -#error "This file should not be included alone. It is automatically included by complex.h" -#endif +//#ifndef __VCG_MESH +//#error "This file should not be included alone. It is automatically included by complex.h" +//#endif #ifndef __VCG_VERTEX_PLUS_COMPONENT #define __VCG_VERTEX_PLUS_COMPONENT +#include +#include + +#include +#include + namespace vcg { namespace vertex { /** \addtogroup VertexComponentGroup diff --git a/vcg/simplex/vertex/component_ocf.h b/vcg/simplex/vertex/component_ocf.h index 35572cbc..919a3090 100644 --- a/vcg/simplex/vertex/component_ocf.h +++ b/vcg/simplex/vertex/component_ocf.h @@ -25,14 +25,18 @@ OCF = Optional Component Fast (hopefully) compare with OCC(Optional Component Compact) */ -#ifndef __VCG_MESH -#error "This file should not be included alone. It is automatically included by complex.h" -#endif +//#ifndef __VCG_MESH +//#error "This file should not be included alone. It is automatically included by complex.h" +//#endif #ifndef __VCG_VERTEX_PLUS_COMPONENT_OCF #define __VCG_VERTEX_PLUS_COMPONENT_OCF -#ifndef __VCG_MESH -#error "This file should not be included alone. It is automatically included by complex.h" -#endif + +#include +#include + +#include +#include + namespace vcg { namespace vertex {