Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- #include "ED_Engine.h"
- class EDE_GridSceneNode : public ISceneNode
- {
- private:
- ///////////
- // The Grid
- ///////////
- vector3df gridPos;
- float cellSize;
- int widthInCells, heightInCells;
- u16** uIndicesVertical;
- S3DVertex** verticesVertical;
- u16** uIndicesHorizontal;
- S3DVertex** verticesHorizontal;
- SColor color;
- aabbox3d<f32> Box;
- SMaterial Material;
- private:
- void createGridFlat();
- void createGridOnFullTerrain(ITerrainSceneNode* terrainSceneNode);
- void createGridOnPositionTerrain(ITerrainSceneNode* terrainSceneNode);
- void renderGrid(IVideoDriver* driver, SColor color);
- void setupVertexArrays();
- public:
- EDE_GridSceneNode(ISceneNode* parent, ISceneManager* smgr, s32 id = -1);
- void initGridOverFullTerrain( ITerrainSceneNode* terrainSceneNode, ITexture* heightmapTexture, vector3df gridPos = vector3df(0.0f, 0.0f, 0.0f), float cellSize = 1.0f, SColor color = SColor(255, 255, 255, 255));
- void initGridOverPositionTerrain( ITerrainSceneNode* terrainSceneNode, int widthInCells, int heightInCells, vector3df gridPos = vector3df(0.0f, 0.0f, 0.0f), float cellSize = 1.0f, SColor color = SColor(255, 255, 255, 255));
- void initGridFlat(int widthInCells, int heightInCells, vector3df gridPos = vector3df(0.0f, 0.0f, 0.0f), float cellSize = 1.0f, SColor color = SColor(255, 255, 255, 255));
- virtual void OnRegisterSceneNode();
- virtual void render();
- virtual const core::aabbox3d<f32>& getBoundingBox() const;
- virtual u32 getMaterialCount() const;
- virtual video::SMaterial& getMaterial(u32 i);
- };
Advertisement
Add Comment
Please, Sign In to add comment