Click or drag to resize
Ab4d.SharpEngine logo

LineMaterial Class

LineMaterial is a material that can be used to render 3D line.
Inheritance Hierarchy

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

The LineMaterial type exposes the following members.

Constructors
Properties
 NameDescription
Public propertyDepthBias Gets a float that specifies a bias that is used when doing a depth test. The value is subtracted from the depth value of the line. Subtracting the value moves the line closer to the camera. The depth values are in range from 0 (at the near camera plane) to 1 (at the far camera plane). Usually a 0.0005 is a good value for most of the cases.
Public propertyHasTransparency Gets a boolean that specifies if this material is semi-transparent and needs to be alpha blended with the scene. This is true when LineColor's Alpha value is less than 1.
Public propertyLineColor Gets or sets the color of the line that is determined from the WpfModel material. Default color is black.
Public propertyLinePattern Gets or sets the 16 bit uint value that defines the line pattern - if bit is 1 then line part is drawn, when 0 line part is not drawn. For example value 0xFFFF means full line without any dots or dashes. Value 0x5555 means line with dots - one full dot follows one empty dot. When 0 (by default) or 0xFFFF than line stipple rendering is not enabled for this line.
Public propertyLinePatternOffset Gets or sets a pattern offset. This value is usually between 0 and 1 - 0 value means no offset, 1 means offset for the whole patter which is the same as no offset. Value 0.1 means that the line will begin with the pattern advanced by 10%. LinePatternOffset is supported only by line rendering techniques that uses geometry shader.
Public propertyLinePatternScale Gets the pattern scale factor. Values bigger then 1 increase the pattern length; values smaller then 1 decrease the pattern length (making it more dense). Default value is 1 that means that one bit in the LinePattern will be as long as LineThickness.
Public propertyLineThickness Gets or sets the thickness of the line in screen space units. This value is scaled with DPI scale factor. Default line thickness is 1.
Top
Methods
 NameDescription
Public methodGetDetailsText GetDetailsText adds string that writes details about this Material into the specified StringBuilder.
(Overrides MaterialGetDetailsText(StringBuilder, Boolean, Boolean, Boolean))
Protected methodOnInitializeSceneResources Initializes resources with the specified Scene and GpuDevice. This method can be override and is called from InitializeSceneResources(Scene) method.
(Overrides MaterialOnInitializeSceneResources(Scene, VulkanDevice))
Top
See Also