Click or drag to resize
Ab4d.SharpEngine logo

PositionColoredLineMaterial Class

PositionColoredLineMaterial is a LineMaterial that contains additional properties that can be used to render 3D lines with different start and end colors.
Inheritance Hierarchy
SystemObject
  Ab4d.SharpEngine.CoreComponentBase
    Ab4d.SharpEngine.CoreInitializedSceneComponent
      Ab4d.SharpEngine.MaterialsMaterial
        Ab4d.SharpEngine.MaterialsLineMaterial
          Ab4d.SharpEngine.MaterialsPositionColoredLineMaterial

Namespace: Ab4d.SharpEngine.Materials
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public class PositionColoredLineMaterial : LineMaterial, 
	IVertexColorMaterial, ITransparentMaterial

The PositionColoredLineMaterial type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyHasTransparency Gets a boolean that specifies if this material is semi-transparent and needs to be alpha blended with the scene.
(Overrides LineMaterialHasTransparency)
Public propertyPositionColors Gets or sets the Color4 array that specifies the colors for each position of the object.
Public propertyVertexColorsBuffer Gets a GpuBuffer for an array of Color4 values where each value represents a color of one position (vertex).
Top
Methods
 NameDescription
Protected methodCreateClone
(Overrides MaterialCreateClone)
Protected methodDispose Dispose
(Overrides MaterialDispose(Boolean))
Protected methodOnEffectChanged OnEffectChanged is called after the effect is changed - overridden methods can return false to prevent the change of effect.
(Overrides MaterialOnEffectChanged(Effect, Effect))
Protected methodOnInitializeSceneResources Initializes resources with the specified Scene and GpuDevice. This method can be override and is called from InitializeSceneResources(Scene) method.
(Overrides LineMaterialOnInitializeSceneResources(Scene, VulkanDevice))
Public methodUpdatePositionColors UpdatePositionColors must be called when the values in the PositionColors array are changed.
Public methodUpdatePositionColorsTransparency UpdatePositionColorsTransparency method check if any color in the PositionColors has Opacity value less then 1 and sets HasTransparency accordingly.
Top
See Also