123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- #pragma once
- #include "Array.h"
- #include "Critical.h"
- #include "GraphicsApi.h"
- #include "Model3DCollection.h"
- #include "Vec3.h"
- namespace Framework
- {
- class Zeichnung3D;
- class Render3D;
- struct MausEreignis3D;
- class Model3D;
- class DXBuffer;
- class Welt3D;
-
- class Welt3D : public Model3DCollection
- {
- protected:
- DiffuseLight* diffuseLights;
- RCArray<Model3DCollection> modelCollections;
- int diffuseLightCount;
- PointLight* pointLights;
- int pointLightCount;
- private:
- RCArray<Model3D>* members;
- bool rend;
- Critical cs;
- public:
-
- DLLEXPORT Welt3D();
-
- DLLEXPORT virtual ~Welt3D();
-
-
- DLLEXPORT void lock();
-
- DLLEXPORT void unlock();
-
-
- DLLEXPORT void addZeichnung(Model3D* obj);
-
-
-
- DLLEXPORT void removeZeichnung(Model3D* zObj);
-
-
- DLLEXPORT void addCollection(Model3DCollection* collection);
-
-
- DLLEXPORT void removeCollection(Model3DCollection* zCollection);
-
-
- DLLEXPORT void doMausEreignis(MausEreignis3D& me);
-
-
-
-
- DLLEXPORT virtual bool tick(double tickval);
-
-
-
-
- DLLEXPORT virtual int traceRay(Vec3<float>& point, Vec3<float>& dir);
-
- DLLEXPORT virtual void forAll(std::function<void(Model3D*)> f) override;
-
- DLLEXPORT virtual bool tick(
- std::function<void(Model3D*)> f, double time) override;
-
- DLLEXPORT virtual void render(std::function<void(Model3D*)> f) override;
-
- DLLEXPORT int getPointLightCount() const;
-
- DLLEXPORT int getDiffuseLightCount() const;
-
-
-
- DLLEXPORT void copyLight(DXBuffer* zDiffuse, DXBuffer* zPoints) const;
-
-
- DLLEXPORT void addDiffuseLight(DiffuseLight light);
-
-
- DLLEXPORT void addPointLight(PointLight light);
-
-
- DLLEXPORT DiffuseLight& getDiffuseLight(int index) const;
-
-
- DLLEXPORT PointLight& getPointLight(int index) const;
-
-
- DLLEXPORT void removeDiffuseLight(int index);
-
-
- DLLEXPORT void removePointLight(int index);
- };
- }
|