Added GetMinDepth()/GetMaxDepth() methods (useful for displaying things on the top or on the bottom).
This commit is contained in:
parent
18374e53a0
commit
826d5a8954
|
@ -470,6 +470,22 @@ public:
|
||||||
depthRange = aDepthRange;
|
depthRange = aDepthRange;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the minimum depth in the currently used range (the top).
|
||||||
|
*/
|
||||||
|
inline double GetMinDepth()
|
||||||
|
{
|
||||||
|
return depthRange.x;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Returns the maximum depth in the currently used range (the bottom).
|
||||||
|
*/
|
||||||
|
inline double GetMaxDepth()
|
||||||
|
{
|
||||||
|
return depthRange.y;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Get the world scale.
|
* @brief Get the world scale.
|
||||||
*
|
*
|
||||||
|
@ -624,11 +640,17 @@ public:
|
||||||
layerDepth -= 0.1; // fixme: there should be a minimum step
|
layerDepth -= 0.1; // fixme: there should be a minimum step
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Stores current drawing depth on the depth stack.
|
||||||
|
*/
|
||||||
void PushDepth()
|
void PushDepth()
|
||||||
{
|
{
|
||||||
depthStack.push( layerDepth );
|
depthStack.push( layerDepth );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Restores previously stored drawing depth for the depth stack.
|
||||||
|
*/
|
||||||
void PopDepth()
|
void PopDepth()
|
||||||
{
|
{
|
||||||
layerDepth = depthStack.top();
|
layerDepth = depthStack.top();
|
||||||
|
|
Loading…
Reference in New Issue