first commit

This commit is contained in:
2026-06-22 11:49:35 +02:00
commit d805f2ba86
619 changed files with 126873 additions and 0 deletions

View File

@ -0,0 +1,24 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __NGEOMETRYMERGETOOL__
#define __NGEOMETRYMERGETOOL__
namespace GS {
class Matrix4;
namespace Core {
class Geometry;
/// Merge two geometries together.
Geometry *MergeGeometry(Geometry *, Geometry *, const Matrix4 * = 0, const Matrix4 * = 0);
} // Core
} // GS
#endif // __NGEOMETRYMERGETOOL__

View File

@ -0,0 +1,93 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __RESOURCEEXPLORER__
#define __RESOURCEEXPLORER__
#include "nstring/nstring.h"
#include "container/nlist.h"
#include "memory/nauto_ptr.h"
#include "metafile/nml.h"
namespace GS {
namespace Resource {
//------------------------------------------------------------------------------
struct DependencyRule
{
const char *path;
const char *type;
};
struct ExplorerRule
{
const char *type, *root;
DependencyRule *rules;
};
//------------------------------------------------------------------------------
//
struct Explorer
{
struct Dependency
{
bool missing;
virtual const char *GetName() const = 0;
virtual void SetName(const char *) = 0;
Dependency() : missing(true) {}
virtual ~Dependency() {}
};
struct DependencyTag : public Dependency
{
NML::Tag *tag;
virtual const char *GetName() const;
virtual void SetName(const char *);
DependencyTag(NML::Tag *t) : tag(t) {}
};
struct Resource
{
String name, type;
AutoPtr <NML::File> file;
AutoList <Dependency *> dependencies;
const Dependency *FindDependency(const char *) const;
bool HasMissingDependencies() const;
Resource(const char *n, const char *t) : name(n), type(t) {}
};
private:
String project_path, core_path;
bool recursive;
AutoList <Resource *> resources;
void ExploreResourceRuleTags(const StringList &, uint pos, NML::Tag *, Resource *, int depth);
bool ExploreResourceRule(ExplorerRule &, Resource *, int depth);
public:
void Clear();
const AutoList <Resource *> &GetResources() const { return resources; }
const Resource *FindResource(const char *) const;
// Explore dependencies for a given resource.
Resource *ExploreResource(const char *name, const char *base_path, const char *core_path, int max_depth = 128);
};
} // Resource
} // GS
#endif // __RESOURCEEXPLORER__

View File

@ -0,0 +1,30 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __MERGEOBJECTLIST__
#define __MERGEOBJECTLIST__
#include "scene3d/mitem.h"
#include "core/geometry.h"
namespace GS {
namespace Core { struct ResourceFactory; }
namespace S3D {
class Scene;
struct SceneMergeObjectList
{
virtual bool OnProgress(int current, int total) { return true; }
bool Merge(Scene *, const SharedList <MItem *> &, Core::ResourceFactory &, sMItem &out_i, Core::sGeometry &out_g);
};
} // S3D
} // GS
#endif // __MERGEOBJECTLIST__