mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-04-28 21:07:59 +03:00
Base cell size on worldspace
This commit is contained in:
parent
1e06d74f82
commit
e51d1967f4
1 changed files with 2 additions and 1 deletions
|
@ -6,6 +6,7 @@
|
||||||
|
|
||||||
#include "world.hpp"
|
#include "world.hpp"
|
||||||
|
|
||||||
|
#include <components/esm/util.hpp>
|
||||||
#include <components/esm3/loadland.hpp>
|
#include <components/esm3/loadland.hpp>
|
||||||
#include <components/resource/scenemanager.hpp>
|
#include <components/resource/scenemanager.hpp>
|
||||||
#include <components/terrain/storage.hpp>
|
#include <components/terrain/storage.hpp>
|
||||||
|
@ -25,7 +26,7 @@ namespace Terrain
|
||||||
osg::ref_ptr<osg::Group> CellBorder::createBorderGeometry(float x, float y, float size, Terrain::Storage* terrain,
|
osg::ref_ptr<osg::Group> CellBorder::createBorderGeometry(float x, float y, float size, Terrain::Storage* terrain,
|
||||||
Resource::SceneManager* sceneManager, int mask, ESM::RefId worldspace, float offset, osg::Vec4f color)
|
Resource::SceneManager* sceneManager, int mask, ESM::RefId worldspace, float offset, osg::Vec4f color)
|
||||||
{
|
{
|
||||||
const int cellSize = ESM::Land::REAL_SIZE;
|
const int cellSize = ESM::getCellSize(worldspace);
|
||||||
const int borderSegments = 40;
|
const int borderSegments = 40;
|
||||||
|
|
||||||
osg::Vec3 cellCorner = osg::Vec3(x * cellSize, y * cellSize, 0);
|
osg::Vec3 cellCorner = osg::Vec3(x * cellSize, y * cellSize, 0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue