3ds Max C++ API Reference
StencilOperation Class Reference

This class encapsulates a complete set of stencil buffer operations for stencil test. More...

#include <RenderStates.h>

+ Inheritance diagram for StencilOperation:

Public Member Functions

virtual void SetStencilFailOperation (StencilOperationType op)
 Set stencil operation when stencil test fails. More...
 
virtual StencilOperationType GetStencilFailOperation () const
 Get stencil fail operation /return stencil fail operation. More...
 
virtual void SetStencilDepthFailOperation (StencilOperationType op)
 Set stencil operation when stencil test passes and depth test fails. More...
 
virtual StencilOperationType GetStencilDepthFailOperation () const
 Get stencil operation when stencil test passes and depth test fails. More...
 
virtual void SetStencilPassOperation (StencilOperationType op)
 Set stencil operation when stencil test and depth test all pass. More...
 
virtual StencilOperationType GetStencilPassOperation () const
 Get stencil operation when stencil test and depth test all pass. More...
 
virtual void SetStencilFunction (CompareFunction func)
 Set compare function for stencil test. More...
 
virtual CompareFunction GetStencilFunction () const
 Get compare function for stencil test. More...
 

Protected Member Functions

 StencilOperation ()
 
virtual ~StencilOperation ()
 

Protected Attributes

StencilOperationType mStencilFailOp
 Stencil operation when stencil test fails. More...
 
StencilOperationType mStencilDepthFailOp
 Stencil operation when stencil test passes and depth test fails. More...
 
StencilOperationType mStencilPassOp
 Stencil operation when stencil test and depth test all pass. More...
 
CompareFunction mStencilFunc
 Compare function for stencil test. More...
 

Friends

class DepthStencilState
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

This class encapsulates a complete set of stencil buffer operations for stencil test.

Constructor & Destructor Documentation

◆ StencilOperation()

StencilOperation ( )
protected

◆ ~StencilOperation()

virtual ~StencilOperation ( )
inlineprotectedvirtual
439 {}

Member Function Documentation

◆ SetStencilFailOperation()

virtual void SetStencilFailOperation ( StencilOperationType  op)
virtual

Set stencil operation when stencil test fails.

By default, it is StencilOperationKeep. /param op operation when stencil test fails.

◆ GetStencilFailOperation()

virtual StencilOperationType GetStencilFailOperation ( ) const
virtual

Get stencil fail operation /return stencil fail operation.

◆ SetStencilDepthFailOperation()

virtual void SetStencilDepthFailOperation ( StencilOperationType  op)
virtual

Set stencil operation when stencil test passes and depth test fails.

By default, it is StencilOperationKeep. /param op operation when depth fail

◆ GetStencilDepthFailOperation()

virtual StencilOperationType GetStencilDepthFailOperation ( ) const
virtual

Get stencil operation when stencil test passes and depth test fails.

/return depth fail operation

◆ SetStencilPassOperation()

virtual void SetStencilPassOperation ( StencilOperationType  op)
virtual

Set stencil operation when stencil test and depth test all pass.

By default, it is StencilOperationKeep. /param op operation when stencil pass

◆ GetStencilPassOperation()

virtual StencilOperationType GetStencilPassOperation ( ) const
virtual

Get stencil operation when stencil test and depth test all pass.

/return stencil and depth pass operation

◆ SetStencilFunction()

virtual void SetStencilFunction ( CompareFunction  func)
virtual

Set compare function for stencil test.

By default, it is CompareFunctionAlways. /param func compare function for stencil test.

◆ GetStencilFunction()

virtual CompareFunction GetStencilFunction ( ) const
virtual

Get compare function for stencil test.

/return compare function for stencil test.

Friends And Related Function Documentation

◆ DepthStencilState

friend class DepthStencilState
friend

Member Data Documentation

◆ mStencilFailOp

StencilOperationType mStencilFailOp
protected

Stencil operation when stencil test fails.

By default, it is StencilOperationKeep.

◆ mStencilDepthFailOp

StencilOperationType mStencilDepthFailOp
protected

Stencil operation when stencil test passes and depth test fails.

By default, it is StencilOperationKeep.

◆ mStencilPassOp

StencilOperationType mStencilPassOp
protected

Stencil operation when stencil test and depth test all pass.

By default, it is StencilOperationKeep.

◆ mStencilFunc

CompareFunction mStencilFunc
protected

Compare function for stencil test.

By default, it is CompareFunctionAlways.