mirror of
https://github.com/OpenCMT/uLib.git
synced 2025-12-06 07:21:31 +01:00
Removed dependencies from Core lib
This commit is contained in:
@@ -29,13 +29,11 @@
|
||||
|
||||
#include <boost/static_assert.hpp>
|
||||
#include <boost/type_traits.hpp>
|
||||
//#include <Core/CommaInitializer.h>
|
||||
#include <Math/Dense.h>
|
||||
|
||||
#include <Core/Mpl.h>
|
||||
#include <boost/mpl/vector_c.hpp>
|
||||
#include <boost/mpl/set_c.hpp>
|
||||
|
||||
#include <Math/Dense.h>
|
||||
|
||||
namespace uLib {
|
||||
|
||||
|
||||
|
||||
@@ -27,8 +27,8 @@
|
||||
|
||||
|
||||
#include "Dense.h"
|
||||
#include "Core/Archives.h"
|
||||
|
||||
#ifdef ULIB_SERIALIZATION_ON
|
||||
ULIB_SERIALIZE(uLib::HPoint3f) {
|
||||
ar & boost::serialization::make_nvp(NULL,boost::serialization::base_object<uLib::HPoint3f::BaseClass,uLib::HPoint3f>(ob));
|
||||
}
|
||||
@@ -48,5 +48,5 @@ ULIB_SERIALIZE(uLib::HError3f) {
|
||||
ar
|
||||
& "HLine -> ( poserr: " & AR(position_error) & "; direrr: " & AR(direction_error) & ") ";
|
||||
}
|
||||
|
||||
#endif // ULIB_SERIALIZATION_ON
|
||||
|
||||
|
||||
@@ -26,25 +26,25 @@
|
||||
|
||||
|
||||
|
||||
/*
|
||||
/*
|
||||
* <one line to give the program's name and a brief idea of what it does.>
|
||||
* Copyright (C) 2012 Andrea Rigoni Garola <andrea@pcimg05>
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2.1 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
|
||||
* 02110-1301 USA
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
@@ -54,9 +54,6 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <Eigen/Dense>
|
||||
#include "Core/Types.h"
|
||||
#include "Core/Serializable.h"
|
||||
|
||||
|
||||
|
||||
//// BOOST SERIALIZATION ///////////////////////////////////////////////////////
|
||||
@@ -109,6 +106,7 @@ std::ostream & operator << (std::ostream &os, const Eigen::Matrix<T,size,1> &vec
|
||||
|
||||
namespace uLib {
|
||||
|
||||
typedef id_t Id_t;
|
||||
|
||||
typedef int Scalari;
|
||||
typedef unsigned int Scalarui;
|
||||
@@ -199,7 +197,7 @@ public:
|
||||
_HPoint3f<p>(Vector3f &in) : BaseClass(in.homogeneous()) { this->operator()(3) = p; }
|
||||
|
||||
void operator delete(void* _p, size_t _s) {}
|
||||
|
||||
|
||||
// This constructor allows to construct MyVectorType from Eigen expressions
|
||||
template<typename OtherDerived>
|
||||
inline _HPoint3f<p>(const Eigen::MatrixBase<OtherDerived>& other)
|
||||
@@ -264,6 +262,9 @@ operator<< (std::ostream& stream, const HError3f &err) {
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
// SERIALIZTION //
|
||||
|
||||
#ifdef ULIB_SERIALIZATION_ON
|
||||
#include "Core/Serializable.h"
|
||||
|
||||
ULIB_SERIALIZABLE(uLib::HPoint3f)
|
||||
|
||||
ULIB_SERIALIZABLE(uLib::HVector3f)
|
||||
@@ -272,7 +273,7 @@ ULIB_SERIALIZABLE(uLib::HVector3f)
|
||||
ULIB_SERIALIZABLE(uLib::HLine3f)
|
||||
|
||||
ULIB_SERIALIZABLE(uLib::HError3f)
|
||||
|
||||
#endif // ULIB_SERIALIZATION_ON
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#ifndef U_GEOMETRY_H
|
||||
#define U_GEOMETRY_H
|
||||
|
||||
#include "Core/Object.h"
|
||||
#include "Math/Dense.h"
|
||||
#include "Math/Transform.h"
|
||||
|
||||
|
||||
@@ -32,11 +32,11 @@
|
||||
|
||||
namespace uLib {
|
||||
|
||||
class Quote : public Vector2f {
|
||||
class Quote : public Vector2f
|
||||
{
|
||||
public:
|
||||
|
||||
|
||||
uLibRefMacro(Offset,Scalarf);
|
||||
inline Scalarf& Offset() { return this->m_Offset; }
|
||||
|
||||
private:
|
||||
Scalarf m_Offset;
|
||||
|
||||
@@ -28,14 +28,12 @@
|
||||
#ifndef STRUCTUREDDATA_H
|
||||
#define STRUCTUREDDATA_H
|
||||
|
||||
#include "Core/Object.h"
|
||||
#include "Math/Dense.h"
|
||||
|
||||
namespace uLib {
|
||||
|
||||
class StructuredData : public Object {
|
||||
class StructuredData {
|
||||
public:
|
||||
typedef Object BaseClass;
|
||||
enum _Order
|
||||
{
|
||||
CustomOrder = 0,
|
||||
@@ -52,7 +50,6 @@ public:
|
||||
StructuredData(const Vector3i &size);
|
||||
|
||||
StructuredData(const StructuredData ©) :
|
||||
BaseClass(copy),
|
||||
m_DataOrder(copy.m_DataOrder),
|
||||
m_Dims(copy.m_Dims),
|
||||
m_Increments(copy.m_Increments)
|
||||
|
||||
@@ -28,7 +28,6 @@
|
||||
#ifndef U_MATH_STRUCTUREDGRID_H
|
||||
#define U_MATH_STRUCTUREDGRID_H
|
||||
|
||||
#include "Core/Object.h"
|
||||
#include "Math/ContainerBox.h"
|
||||
#include "Math/StructuredData.h"
|
||||
|
||||
|
||||
@@ -30,13 +30,12 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include "Core/Object.h"
|
||||
#include "Math/Dense.h"
|
||||
|
||||
namespace uLib {
|
||||
|
||||
class TriangleMesh : public Object {
|
||||
|
||||
class TriangleMesh
|
||||
{
|
||||
public:
|
||||
void PrintSelf(std::ostream &o);
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@
|
||||
#define VOXIMAGEFILTER_H
|
||||
|
||||
#include "Core/StaticInterface.h"
|
||||
#include "Core/Object.h"
|
||||
#include "Math/Dense.h"
|
||||
|
||||
#include "Math/VoxImage.h"
|
||||
@@ -64,7 +63,7 @@ protected:
|
||||
|
||||
|
||||
template < typename VoxelT, typename AlgorithmT >
|
||||
class VoxImageFilter : public Abstract::VoxImageFilter, public Object
|
||||
class VoxImageFilter : public Abstract::VoxImageFilter
|
||||
{
|
||||
|
||||
public:
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
#ifndef VOXIMAGEFILTERCUSTOM_HPP
|
||||
#define VOXIMAGEFILTERCUSTOM_HPP
|
||||
|
||||
#include "Core/Macros.h"
|
||||
#include <Math/Dense.h>
|
||||
#include "Math/VoxImage.h"
|
||||
#include "VoxImageFilter.h"
|
||||
@@ -76,7 +77,7 @@ public:
|
||||
|
||||
}
|
||||
|
||||
uLibSetMacro(CustomEvaluate,FunctionPt)
|
||||
inline void SetCustomEvaluate(FunctionPt funPt) { this->m_CustomEvaluate = funPt; }
|
||||
|
||||
private:
|
||||
FunctionPt m_CustomEvaluate;
|
||||
|
||||
@@ -26,7 +26,6 @@
|
||||
|
||||
|
||||
|
||||
#include "Core/Vector.h"
|
||||
#include "Dense.h"
|
||||
#include "VoxImage.h"
|
||||
#include "VoxImageFilterUser.h"
|
||||
|
||||
@@ -29,6 +29,8 @@
|
||||
#include "VoxRaytracer.h"
|
||||
#include "Utils.h"
|
||||
|
||||
#include "Core/Macros.h"
|
||||
|
||||
inline float fast_sign(float f) { return 1 - 2 * (f < 0); }
|
||||
|
||||
namespace uLib {
|
||||
|
||||
@@ -51,8 +51,9 @@ public:
|
||||
|
||||
void AppendRay ( const RayData &in);
|
||||
|
||||
uLibConstRefMacro(Data,std::vector<Element>)
|
||||
uLibConstRefMacro(TotalLength,Scalarf)
|
||||
inline const std::vector<Element>& Data() const { return this->m_Data; }
|
||||
|
||||
inline const Scalarf& TotalLength() const { return this->m_TotalLength; }
|
||||
|
||||
void PrintSelf(std::ostream &o);
|
||||
|
||||
|
||||
@@ -94,7 +94,7 @@ int main()
|
||||
TEST1( pt == HPoint3f(-3,-3,-3) );
|
||||
|
||||
Raytracer::RayData rdata = ray.TraceBetweenPoints(HPoint3f(-3,-3,-3), HPoint3f(3,3,3));
|
||||
foreach (const Raytracer::RayData::Element &el, rdata.Data())
|
||||
for(const Raytracer::RayData::Element &el : rdata.Data())
|
||||
{
|
||||
std::cout << " " << el.vox_id << " , " << el.L << "\n";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user