Regeneration of regions can now be prioritised, for example by distance to camera.
This commit is contained in:
parent
530a53b4fe
commit
b4d9351f1b
@ -37,6 +37,7 @@ namespace PolyVox
|
|||||||
|
|
||||||
const Vector3DInt16& getLowerCorner(void) const;
|
const Vector3DInt16& getLowerCorner(void) const;
|
||||||
const Vector3DInt16& getUpperCorner(void) const;
|
const Vector3DInt16& getUpperCorner(void) const;
|
||||||
|
const Vector3DInt16& getCentre(void) const;
|
||||||
|
|
||||||
void setLowerCorner(const Vector3DInt16& v3dLowerCorner);
|
void setLowerCorner(const Vector3DInt16& v3dLowerCorner);
|
||||||
void setUpperCorner(const Vector3DInt16& v3dUpperCorner);
|
void setUpperCorner(const Vector3DInt16& v3dUpperCorner);
|
||||||
|
@ -24,6 +24,13 @@ namespace PolyVox
|
|||||||
return m_v3dUpperCorner;
|
return m_v3dUpperCorner;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const Vector3DInt16& Region::getCentre(void) const
|
||||||
|
{
|
||||||
|
Vector3DInt32 v3dMidpoint = static_cast<Vector3DInt32>(m_v3dLowerCorner) + static_cast<Vector3DInt32>(m_v3dUpperCorner);
|
||||||
|
v3dMidpoint = v3dMidpoint / static_cast<int32_t>(2);
|
||||||
|
return m_v3dLowerCorner + static_cast<Vector3DInt16>(v3dMidpoint);
|
||||||
|
}
|
||||||
|
|
||||||
void Region::setLowerCorner(const Vector3DInt16& v3dLowerCorner)
|
void Region::setLowerCorner(const Vector3DInt16& v3dLowerCorner)
|
||||||
{
|
{
|
||||||
m_v3dLowerCorner = v3dLowerCorner;
|
m_v3dLowerCorner = v3dLowerCorner;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user