Click or drag to resize
AB4D logo

PixelMaterial Class

PixelMaterial defines how 3D pixels are drawn with the PixelEffect.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXResourceBase
    Ab3d.DirectXSharedDXResource
      Ab3d.DirectXSharedDXDeviceResource
        Ab3d.DirectXMaterial
          Ab3d.DirectX.MaterialsPixelMaterial

Namespace: Ab3d.DirectX.Materials
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 6.1.8746.1045
Syntax
C#
public class PixelMaterial : Material, 
	IPixelMaterial, IVertexColorMaterial, IVertexScalesMaterial, IZBufferStateMaterial

The PixelMaterial type exposes the following members.

Constructors
 NameDescription
Public methodPixelMaterial Constructor with white color and pixel size set to 1.
Public methodPixelMaterial(Color4, Single) Constructor
Top
Properties
 NameDescription
Public propertyCreateDynamicBuffer Gets or sets a Boolean that specifies if a dynamic vertex buffer will be created from the PixelColors array. This can be used in case when the colors change very often.
Public propertyPixelColor Gets or sets the Color4 of pixels. Default value is White. When PixelColors array is set, the value of this property is used as a mask that is multiplied with each color defined in the array.
Public propertyPixelColors Gets or sets a Color4 array that specifies the colors for each pixel. When color's alpha is 0, the pixel is not rendered. When PixelColors array is set, the PixelColor is used as a mask that is multiplied with each color defined in the array (set PixelColor to White to use the values specified in this array). When null, the color of all the pixels is set by the color defined by the PixelColor property. When individual values of PixelColors are changed, you need to call UpdatePixelColors method for the changes to take effect.
Public propertyPixelSize Gets or sets the width and height of the pixel in screen space units. This value is scaled with DPI scale factor.
Public propertyPixelSizes Gets or sets a float array that specifies the sizes for each pixel. When size is less of equal to 0, the pixel is not rendered. When PixelSizes array is set, the PixelSize value is multiplied with each size defined in the array (set PixelSize to 1 to use the values specified in this array). When null, the size of all the pixels is set by the value defined by the PixelSize property. When individual values of PixelSizes are changed, you need to call UpdatePixelSizes method for the changes to take effect.
Public propertyReadZBuffer Gets or sets a Boolean that specifies if Z buffer is read when rendering the pixel - if the depth test is done when rendering the pixel. If false then the pixel is rendered regardless of its depth - if is rendered even if it is behind some other 3D objects.
Public propertyVertexColorsVertexBufferBinding Gets a VertexBufferBinding for an array of Color4 values where each value represents a color of one position.
Public propertyVertexScalesVertexBufferBinding Gets a VertexBufferBinding that is created from PixelSizes array.
Public propertyWriteZBuffer Gets or sets a Boolean that specifies if Z buffer is written when rendering the pixel - if the pixel can occlude other 3D objects. If true then the objects behind the pixel will not be rendered. If false the line will not prevent rendering objects behind it.
Top
Methods
 NameDescription
Public methodGetDefaultRenderingQueue Returns the RenderingQueue that should be used to render this material.
(Overrides MaterialGetDefaultRenderingQueue(DXScene))
Public methodToString ToString
(Overrides MaterialToString)
Public methodUpdatePixelColors UpdatePixelColors method updates the DirectX vertex buffer from the current values of PixelColors.
Public methodUpdatePixelSizes UpdatePixelSizes method updates the DirectX vertex buffer from the current values of PixelSize.
Top
See Also