Click or drag to resize
AB4D logo

VertexColorMaterial Class

VertexColorMaterial can be used to render 3D objects with specifying color for each of its position.
Inheritance Hierarchy
SystemObject
  Ab3d.DirectXDXResourceBase
    Ab3d.DirectXSharedDXResource
      Ab3d.DirectXSharedDXDeviceResource
        Ab3d.DirectXMaterial
          Ab3d.DirectX.MaterialsVertexColorMaterial

Namespace: Ab3d.DirectX.Materials
Assembly: Ab3d.DXEngine (in Ab3d.DXEngine.dll) Version: 7.1.9105.2048 (1.0.0.0)
Syntax
C#
public class VertexColorMaterial : Material, 
	ISpecularMaterial, ITransparentMaterial, IVertexColorMaterial, ITwoSidedMaterial

The VertexColorMaterial type exposes the following members.

Constructors
 NameDescription
Public methodVertexColorMaterial Constructor
Public methodVertexColorMaterial(Color4) Constructor
Top
Properties
 NameDescription
Public propertyCreateDynamicBuffer Gets or sets a Boolean that specifies if a dynamic vertex buffer will be created from the PositionColors array. This can be used in case when the colors change very often.
Public propertyHasSpecularColor Gets a boolean that specifies if this material is using specular effect.
Public propertyHasTransparency Gets a boolean that specifies if this material is semi-transparent and needs to be alpha blended with the scene.
Public propertyIsTwoSided Gets or sets a Boolean that specifies if the material should be rendered on both front and back side. Default value is false.
Public propertyPositionColors Gets or sets the Color4 array that specifies the colors for each position of the object.
Public propertySpecularColor Gets the Color3 that specifies the color used to draw the specular highlight effect.
Public propertySpecularPower Gets a float that specifies the power of the specular effect. Zero values means that the specular effect is turned off.
Public propertyVertexColorsVertexBufferBinding Gets a VertexBufferBinding for an array of Color4 values where each value represents a color of one position.
Top
Methods
 NameDescription
Public methodToString ToString
(Overrides MaterialToString)
Public methodUpdate Update method updates the DirectX vertex buffer from the current values of PositionColors.
Top
Remarks

VertexColorMaterial can be used to render 3D objects with specifying color for each of its position.

The colors of each position is specified in the PositionColors array.

When values in the PositionColors array are changed, you need to call Update method to update the DirectX resources.

See Also