From 71a1a9688360acd48780a3d645e288f75fb03318 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 10 Dec 2004 03:37:33 +0000 Subject: [PATCH] Added extra set methods to match get's to make then symetric proporties --- include/osg/Stencil | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/include/osg/Stencil b/include/osg/Stencil index d7f80ee01..62ff506ca 100644 --- a/include/osg/Stencil +++ b/include/osg/Stencil @@ -85,10 +85,13 @@ class SG_EXPORT Stencil : public StateAttribute _funcMask = mask; } + inline void setFunction(Function func) { _func = func; } inline Function getFunction() const { return _func; } + inline void setFunctionRef(int ref) { _funcRef=ref; } inline int getFunctionRef() const { return _funcRef; } + inline void getFunctionMask(unsigned int mask) { _funcMask=mask; } inline unsigned int getFunctionMask() const { return _funcMask; } @@ -116,12 +119,21 @@ class SG_EXPORT Stencil : public StateAttribute _zpass = zpass; } + /** set the operation when the stencil test fails.*/ + inline void setStencilFailOperation(Operation sfail) { _sfail = sfail; } + /** get the operation when the stencil test fails.*/ inline Operation getStencilFailOperation() const { return _sfail; } + /** set the operation when the stencil test passes but the depth test fails.*/ + inline void setStencilPassAndDepthFailOperation(Operation zfail) { _zfail=zfail; } + /** get the operation when the stencil test passes but the depth test fails.*/ inline Operation getStencilPassAndDepthFailOperation() const { return _zfail; } - + + /** set the operation when both the stencil test and the depth test pass.*/ + inline void setStencilPassAndDepthPassOperation(Operation zpass) { _zpass=zpass; } + /** get the operation when both the stencil test and the depth test pass.*/ inline Operation getStencilPassAndDepthPassOperation() const { return _zpass; }