|
|
|
@ -88,7 +88,7 @@ public:
|
|
|
|
|
|
|
|
|
|
void setShadeOutline (bool b) { _ShadeOutline = b; }
|
|
|
|
|
|
|
|
|
|
void setShadeExtent (float shext) { _ShadeExtent = shext; }
|
|
|
|
|
void setShadeExtent (float x, float y) { _ShadeExtentX = x; _ShadeExtentY = y; }
|
|
|
|
|
|
|
|
|
|
/// The alpha of the shade is multiplied at each draw with the alpha of the color. Default: (0,0,0,255)
|
|
|
|
|
void setShadeColor (NLMISC::CRGBA color) { _ShadeColor = color; }
|
|
|
|
@ -157,19 +157,20 @@ public:
|
|
|
|
|
rCS.Color.A = (uint8)((uint(bkup.A) * uint(_ShadeColor.A)+1)>>8);
|
|
|
|
|
if (_ShadeOutline)
|
|
|
|
|
{
|
|
|
|
|
float rext = _ShadeExtent * 0.7071f;
|
|
|
|
|
rCS.render2D(*_Driver, x+rext, z-rext, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x-rext, z-rext, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x-rext, z+rext, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x+rext, z+rext, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x+_ShadeExtent, z, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x-_ShadeExtent, z, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x, z-_ShadeExtent, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x, z-_ShadeExtent, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
float rextX = _ShadeExtentX * 0.7071f;
|
|
|
|
|
float rextY = _ShadeExtentY * 0.7071f;
|
|
|
|
|
rCS.render2D(*_Driver, x+rextX, z-rextY, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x-rextX, z-rextY, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x-rextX, z+rextY, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x+rextX, z+rextY, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x+_ShadeExtentX, z, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x-_ShadeExtentX, z, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x, z-_ShadeExtentY, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x, z-_ShadeExtentY, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
rCS.render2D(*_Driver, x+_ShadeExtent, z-_ShadeExtent, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
rCS.render2D(*_Driver, x+_ShadeExtentX, z-_ShadeExtentY, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
}
|
|
|
|
|
rCS.Color= bkup;
|
|
|
|
|
}
|
|
|
|
@ -190,19 +191,20 @@ public:
|
|
|
|
|
rCS.Color.A = (uint8)((uint(bkup.A) * uint(_ShadeColor.A)+1)>>8);
|
|
|
|
|
if (_ShadeOutline)
|
|
|
|
|
{
|
|
|
|
|
float rext = _ShadeExtent * 0.7071f;
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x+rext, z-rext, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x-rext, z-rext, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x-rext, z+rext, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x+rext, z+rext, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x+_ShadeExtent, z, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x-_ShadeExtent, z, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x, z+_ShadeExtent, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x, z-_ShadeExtent, xmin, ymin, xmax, ymax);
|
|
|
|
|
float rextX = _ShadeExtentX * 0.7071f;
|
|
|
|
|
float rextY = _ShadeExtentY * 0.7071f;
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x+rextX, z-rextY, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x-rextX, z-rextY, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x-rextX, z+rextY, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x+rextX, z+rextY, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x+_ShadeExtentX, z, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x-_ShadeExtentX, z, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x, z+_ShadeExtentY, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x, z-_ShadeExtentY, xmin, ymin, xmax, ymax);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x+_ShadeExtent, z-_ShadeExtent, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DClip(*_Driver, rdrBuffer, x+_ShadeExtentX, z-_ShadeExtentY, xmin, ymin, xmax, ymax);
|
|
|
|
|
}
|
|
|
|
|
rCS.Color= bkup;
|
|
|
|
|
}
|
|
|
|
@ -223,19 +225,20 @@ public:
|
|
|
|
|
rCS.Color.A = (uint8)((uint(bkup.A) * uint(_ShadeColor.A)+1)>>8);
|
|
|
|
|
if (_ShadeOutline)
|
|
|
|
|
{
|
|
|
|
|
float rext = _ShadeExtent * 0.7071f;
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x+rext, y-rext, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x-rext, y-rext, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x-rext, y+rext, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x+rext, y+rext, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x+_ShadeExtent, y, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x-_ShadeExtent, y, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x, y+_ShadeExtent, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x, y-_ShadeExtent, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
float rextX = _ShadeExtentX * 0.7071f;
|
|
|
|
|
float rextY = _ShadeExtentY * 0.7071f;
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x+rextX, y-rextY, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x-rextX, y-rextY, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x-rextX, y+rextY, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x+rextX, y+rextY, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x+_ShadeExtentX, y, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x-_ShadeExtentX, y, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x, y+_ShadeExtentY, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x, y-_ShadeExtentY, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x+_ShadeExtent, y-_ShadeExtent, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
rCS.render2DUnProjected (*_Driver, renderBuffer, frustum, scaleMatrix, x+_ShadeExtentX, y-_ShadeExtentY, depth, xmin, ymin, xmax, ymax);
|
|
|
|
|
}
|
|
|
|
|
rCS.Color= bkup;
|
|
|
|
|
}
|
|
|
|
@ -258,19 +261,20 @@ public:
|
|
|
|
|
_TempString.Color.A = (uint8)((uint(bkup.A) * uint(_ShadeColor.A)+1)>>8);
|
|
|
|
|
if (_ShadeOutline)
|
|
|
|
|
{
|
|
|
|
|
float rext = _ShadeExtent * 0.7071f;
|
|
|
|
|
_TempString.render2D(*_Driver,x+rext,z-rext,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x-rext,z-rext,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x-rext,z+rext,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x+rext,z+rext,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x+_ShadeExtent,z,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x-_ShadeExtent,z,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x,z+_ShadeExtent,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x,z-_ShadeExtent,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
float rextX = _ShadeExtentX * 0.7071f;
|
|
|
|
|
float rextY = _ShadeExtentY * 0.7071f;
|
|
|
|
|
_TempString.render2D(*_Driver,x+rextX,z-rextY,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x-rextX,z-rextY,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x-rextX,z+rextY,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x+rextX,z+rextY,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x+_ShadeExtentX,z,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x-_ShadeExtentX,z,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x,z+_ShadeExtentY,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x,z-_ShadeExtentY,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_TempString.render2D(*_Driver,x+_ShadeExtent,z-_ShadeExtent,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver, x+_ShadeExtentX, z-_ShadeExtentY, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
}
|
|
|
|
|
_TempString.Color = bkup;
|
|
|
|
|
}
|
|
|
|
@ -297,19 +301,20 @@ public:
|
|
|
|
|
_TempString.Color.A = (uint8)((uint(bkup.A) * uint(_ShadeColor.A)+1)>>8);
|
|
|
|
|
if (_ShadeOutline)
|
|
|
|
|
{
|
|
|
|
|
float rext = _ShadeExtent * 0.7071f;
|
|
|
|
|
_TempString.render2D(*_Driver,x+rext,z-rext,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x-rext,z-rext,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x-rext,z+rext,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x+rext,z+rext,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x+_ShadeExtent,z,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x-_ShadeExtent,z,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x,z+_ShadeExtent,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x,z-_ShadeExtent,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
float rextX = _ShadeExtentX * 0.7071f;
|
|
|
|
|
float rextY = _ShadeExtentY * 0.7071f;
|
|
|
|
|
_TempString.render2D(*_Driver,x+rextX,z-rextY,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x-rextX,z-rextY,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x-rextX,z+rextY,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x+rextX,z+rextY,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x+_ShadeExtentX,z,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x-_ShadeExtentX,z,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x,z+_ShadeExtentY,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver,x,z-_ShadeExtentY,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
_TempString.render2D(*_Driver,x+_ShadeExtent,z-_ShadeExtent,_HotSpot,_ScaleX,_ScaleZ);
|
|
|
|
|
_TempString.render2D(*_Driver, x+_ShadeExtentX, z-_ShadeExtentY, _HotSpot, _ScaleX, _ScaleZ);
|
|
|
|
|
}
|
|
|
|
|
_TempString.Color = bkup;
|
|
|
|
|
}
|
|
|
|
@ -412,7 +417,8 @@ private:
|
|
|
|
|
bool _ShadeOutline;
|
|
|
|
|
|
|
|
|
|
/// shade's extent (shadow size)
|
|
|
|
|
float _ShadeExtent;
|
|
|
|
|
float _ShadeExtentX;
|
|
|
|
|
float _ShadeExtentY;
|
|
|
|
|
|
|
|
|
|
/// Shade color (default is black)
|
|
|
|
|
NLMISC::CRGBA _ShadeColor;
|
|
|
|
|