3ds Max C++ API Reference
|
This class encapsulates a complete rasterizer state, like fill mode, cull mode, point size, etc. More...
#include <RenderStates.h>
Classes | |
union | DepthBias |
The z buffer depth bias value Default value is 0. More... | |
Public Member Functions | |
RasterizerState () | |
virtual | ~RasterizerState () |
virtual void | SetFillMode (FillMode value) |
Set the raster fill mode. More... | |
virtual FillMode | GetFillMode () const |
Get the raster fill mode /return the fill mode. More... | |
virtual void | SetCullMode (CullMode value) |
Set culling mode, front face or back face. More... | |
virtual CullMode | GetCullMode () const |
Get culling mode /return the culling mode. More... | |
virtual void | SetColorInterpolationEnable (bool value) |
Sets whether color registers are interpolated between vertices. More... | |
virtual bool | GetColorInterpolationEnable () const |
Gets whether color registers are interpolated between vertices. More... | |
virtual void | SetDepthBias (float value) |
Set z buffer depth bias value by float /param value float depth bias. More... | |
virtual void | SetDepthBias (int value) |
Set z buffer depth bias value by int /param value int depth bias. More... | |
virtual bool | IsFloatDepthBias () |
Get depth bias is float or int /return true if using float depth bias, false if it's int. More... | |
virtual float | GetDepthBiasFloat () const |
Get float depth bias /return depth bias. More... | |
virtual int | GetDepthBiasInt () const |
Get int depth bias /return depth bias. More... | |
virtual void | SetDepthBiasClamp (float value) |
Set the z buffer depth bias clamp value. More... | |
virtual float | GetDepthBiasClamp () const |
get the depth bias clamp value /return depth bias clamp More... | |
virtual void | SetSlopeScaledDepthBias (float value) |
Set the slope scaled depth bias value. More... | |
virtual float | GetSlopeScaledDepthBias () const |
Get the slope scaled depth bias value /return slope scaled depth bias value. More... | |
virtual void | SetDepthClipEnabled (bool value) |
Set if depth clipping is enabled. More... | |
virtual bool | GetDepthClipEnabled () const |
Get if depth clipping is enabled /return true if enabled, false if not. More... | |
virtual void | SetScissorEnabled (bool value) |
Set scissor clipping state. More... | |
virtual bool | GetScissorEnabled () const |
Get scissor clipping state. More... | |
virtual void | SetMultiSampleEnabled (bool value) |
MultiSample state. More... | |
virtual bool | GetMultiSampleEnabled () const |
Get MultiSample State /return true if multi-sample enabled, false if not. More... | |
virtual void | SetPointSize (float value) |
Set vertex point size. More... | |
virtual float | GetPointSize () const |
Get vertex point size. More... | |
Protected Attributes | |
FillMode | mFillMode |
The raster fill mode. More... | |
CullMode | mCullMode |
The culling mode, front face or back face. More... | |
bool | mColorInterpolationEnabled |
Sets whether color registers are interpolated between vertices. More... | |
bool | mIsFloatDepthBias |
The z buffer depth bias type: float or int. More... | |
float | mDepthBiasClamp |
the z buffer depth bias clamp value. More... | |
float | mSlopeScaledDepthBias |
the slope scaled depth bias value. More... | |
bool | mDepthClipEnabled |
Indicate if depth clipping is enabled. More... | |
bool | mScissorEnabled |
scissor clipping state Default value is false More... | |
bool | mMultiSampleEnabled |
Multisample state Default value is false. More... | |
float | mPointSize |
Vertex point size Note this property only works for DirectX9 device Default value is 1.0. More... | |
DepthBias | mDepthBias |
Additional Inherited Members | |
![]() | |
static UtilExport void * | operator new (size_t size) |
Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More... | |
static UtilExport void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | operator new[] (size_t size, int block_type, const char *filename, int line) |
New operator used to allocate arrays of objects. More... | |
static UtilExport void * | operator 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 void * | operator 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 void * | operator 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 void * | operator 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 void * | aligned_malloc (size_t size, size_t alignment) |
Allocates memory on a specified alignment boundary. More... | |
static UtilExport void * | aligned_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... | |
This class encapsulates a complete rasterizer state, like fill mode, cull mode, point size, etc.
RasterizerState | ( | ) |
|
inlinevirtual |
Set the raster fill mode.
Default value is FillSolid /param value new mode
|
virtual |
Get the raster fill mode /return the fill mode.
Set culling mode, front face or back face.
Default value is CullModeCCW /param value new cull mode
|
virtual |
Get culling mode /return the culling mode.
|
virtual |
Sets whether color registers are interpolated between vertices.
If disabled, this will provide flat shading for effects that use the color registers; otherwise Gouraud (smooth) shading is performed. Default value is true. /param value true to enable color interpolation, false to disable
|
virtual |
Gets whether color registers are interpolated between vertices.
/return true if the color interpolation is enabled, false if disabled.
|
virtual |
Set z buffer depth bias value by float /param value float depth bias.
Set z buffer depth bias value by int /param value int depth bias.
|
virtual |
Get depth bias is float or int /return true if using float depth bias, false if it's int.
|
virtual |
Get float depth bias /return depth bias.
|
virtual |
Get int depth bias /return depth bias.
|
virtual |
Set the z buffer depth bias clamp value.
Default value is 0 /param value depth bias clamp
|
virtual |
get the depth bias clamp value /return depth bias clamp
|
virtual |
Set the slope scaled depth bias value.
Default value is 0 /param value scaled depth bias value
|
virtual |
Get the slope scaled depth bias value /return slope scaled depth bias value.
|
virtual |
Set if depth clipping is enabled.
Default value is true. If enabled, depth values out of the 0-1 range are clipped. If false, the GPU will first clamp the depth value to 0-1, then clip any values where the w < 0. This is mostly used by shadow volume techniques to avoid near and far clipping problems. It could also be used by a renderer where one object is behind everything (e.g. an environment hemisphere) that would normally be clipped by the far clip plane; turning off clipping would instead clamp the z-depth of this object to 1.0 and so display it behind everything. In summary, this value should very rarely be set to false. /param value true to enable depth clipe, false to disable.
|
virtual |
Get if depth clipping is enabled /return true if enabled, false if not.
|
virtual |
Set scissor clipping state.
Default value is false /param value true to enable scissor clipping, false to disable
|
virtual |
Get scissor clipping state.
/return true if scissor is enabled, false if not.
|
virtual |
MultiSample state.
Default value is false /param value true to enable multi-sample, false to disable
|
virtual |
Get MultiSample State /return true if multi-sample enabled, false if not.
|
virtual |
Set vertex point size.
Default value is 1.0 Note this property only works for DirectX9 device /param value the point size.
|
virtual |
Get vertex point size.
/return vertex point size
|
protected |
The raster fill mode.
Default value is FillSolid
|
protected |
The culling mode, front face or back face.
Default value is CullModeCCW
|
protected |
Sets whether color registers are interpolated between vertices.
If disabled, this will provide flat shading for effects that use the color registers; otherwise Gouraud (smooth) shading is performed. Default value is true.
|
protected |
The z buffer depth bias type: float or int.
Default value is false
|
protected |
the z buffer depth bias clamp value.
Default value is 0
|
protected |
the slope scaled depth bias value.
Default value is 0
|
protected |
Indicate if depth clipping is enabled.
If enabled, depth values out of the 0-1 range are clipped. If false, the GPU will first clamp the depth value to 0-1, then clip any values where the w < 0. This is mostly used by shadow volume techniques to avoid near and far clipping problems. It could also be used by a renderer where one object is behind everything (e.g. an environment hemisphere) that would normally be clipped by the far clip plane; turning off clipping would instead clamp the z-depth of this object to 1.0 and so display it behind everything. In summary, this value should very rarely be set to false.
|
protected |
scissor clipping state Default value is false
|
protected |
Multisample state Default value is false.
|
protected |
Vertex point size Note this property only works for DirectX9 device Default value is 1.0.
|
protected |