123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435 |
- #pragma once
- #include "IReferenceCounted.h"
- #include "irrArray.h"
- #include "vector3d.h"
- #include "dimension2d.h"
- #include "SColor.h"
- #include "ESceneNodeTypes.h"
- #include "SceneParameters.h"
- namespace irr
- {
- struct SKeyMap;
- struct SEvent;
- namespace io
- {
- class IReadFile;
- class IAttributes;
- class IWriteFile;
- class IFileSystem;
- }
- namespace gui
- {
- class IGUIFont;
- class IGUIEnvironment;
- }
- namespace video
- {
- class IVideoDriver;
- class SMaterial;
- class IImage;
- class ITexture;
- }
- namespace scene
- {
- enum E_SCENE_NODE_RENDER_PASS
- {
-
- ESNRP_NONE = 0,
-
- ESNRP_CAMERA = 1,
-
- ESNRP_SKY_BOX = 4,
-
-
- ESNRP_AUTOMATIC = 24,
-
- ESNRP_SOLID = 8,
-
- ESNRP_TRANSPARENT = 16,
-
- ESNRP_TRANSPARENT_EFFECT = 32,
-
- ESNRP_GUI = 128
- };
- class IAnimatedMesh;
- class IAnimatedMeshSceneNode;
- class IBillboardSceneNode;
- class ICameraSceneNode;
- class IDummyTransformationSceneNode;
- class IMesh;
- class SkinnedMesh;
- class IMeshBuffer;
- class IMeshCache;
- class ISceneCollisionManager;
- class IMeshLoader;
- class IMeshManipulator;
- class IMeshSceneNode;
- class ISceneNode;
- class ISceneNodeFactory;
- class ISceneManager : public virtual IReferenceCounted
- {
- public:
-
-
- virtual IAnimatedMesh *getMesh(io::IReadFile *file) = 0;
-
-
- virtual IMeshCache *getMeshCache() = 0;
-
-
- virtual video::IVideoDriver *getVideoDriver() = 0;
-
-
- virtual IAnimatedMeshSceneNode *addAnimatedMeshSceneNode(IAnimatedMesh *mesh,
- ISceneNode *parent = 0, s32 id = -1,
- const core::vector3df &position = core::vector3df(0, 0, 0),
- const core::vector3df &rotation = core::vector3df(0, 0, 0),
- const core::vector3df &scale = core::vector3df(1.0f, 1.0f, 1.0f),
- bool alsoAddIfMeshPointerZero = false) = 0;
-
-
- virtual IMeshSceneNode *addMeshSceneNode(IMesh *mesh, ISceneNode *parent = 0, s32 id = -1,
- const core::vector3df &position = core::vector3df(0, 0, 0),
- const core::vector3df &rotation = core::vector3df(0, 0, 0),
- const core::vector3df &scale = core::vector3df(1.0f, 1.0f, 1.0f),
- bool alsoAddIfMeshPointerZero = false) = 0;
-
-
- virtual ICameraSceneNode *addCameraSceneNode(ISceneNode *parent = 0,
- const core::vector3df &position = core::vector3df(0, 0, 0),
- const core::vector3df &lookat = core::vector3df(0, 0, 100),
- s32 id = -1, bool makeActive = true) = 0;
-
-
- virtual IBillboardSceneNode *addBillboardSceneNode(ISceneNode *parent = 0,
- const core::dimension2d<f32> &size = core::dimension2d<f32>(10.0f, 10.0f),
- const core::vector3df &position = core::vector3df(0, 0, 0), s32 id = -1,
- video::SColor colorTop = 0xFFFFFFFF, video::SColor colorBottom = 0xFFFFFFFF) = 0;
-
-
- virtual ISceneNode *addEmptySceneNode(ISceneNode *parent = 0, s32 id = -1) = 0;
-
-
- virtual IDummyTransformationSceneNode *addDummyTransformationSceneNode(
- ISceneNode *parent = 0, s32 id = -1) = 0;
-
-
- virtual ISceneNode *getRootSceneNode() = 0;
-
-
- virtual ISceneNode *getSceneNodeFromId(s32 id, ISceneNode *start = 0) = 0;
-
-
- virtual ISceneNode *getSceneNodeFromName(const c8 *name, ISceneNode *start = 0) = 0;
-
-
- virtual ISceneNode *getSceneNodeFromType(scene::ESCENE_NODE_TYPE type, ISceneNode *start = 0) = 0;
-
-
- virtual void getSceneNodesFromType(ESCENE_NODE_TYPE type,
- core::array<scene::ISceneNode *> &outNodes,
- ISceneNode *start = 0) = 0;
-
-
- virtual ICameraSceneNode *getActiveCamera() const = 0;
-
-
- virtual void setActiveCamera(ICameraSceneNode *camera) = 0;
-
-
- virtual u32 registerNodeForRendering(ISceneNode *node,
- E_SCENE_NODE_RENDER_PASS pass = ESNRP_AUTOMATIC) = 0;
-
-
- virtual void clearAllRegisteredNodesForRendering() = 0;
-
-
- virtual void drawAll() = 0;
-
-
- virtual void addExternalMeshLoader(IMeshLoader *externalLoader) = 0;
-
- virtual u32 getMeshLoaderCount() const = 0;
-
-
- virtual IMeshLoader *getMeshLoader(u32 index) const = 0;
-
-
- virtual ISceneCollisionManager *getSceneCollisionManager() = 0;
-
-
- virtual IMeshManipulator *getMeshManipulator() = 0;
-
-
- virtual void addToDeletionQueue(ISceneNode *node) = 0;
-
-
- virtual bool postEventFromUser(const SEvent &event) = 0;
-
-
- virtual void clear() = 0;
-
-
- virtual io::IAttributes *getParameters() = 0;
-
-
- virtual E_SCENE_NODE_RENDER_PASS getSceneNodeRenderPass() const = 0;
-
-
- virtual ISceneManager *createNewSceneManager(bool cloneContent = false) = 0;
-
-
- virtual SkinnedMesh *createSkinnedMesh() = 0;
-
- virtual E_SCENE_NODE_RENDER_PASS getCurrentRenderPass() const = 0;
-
- virtual void setCurrentRenderPass(E_SCENE_NODE_RENDER_PASS nextPass) = 0;
-
-
- virtual bool isCulled(const ISceneNode *node) const = 0;
- };
- }
- }
|