Click or drag to resize
AB4D logo

WireGridVisual3D Class

WireGridVisual3D class is used to create Visual3D that represents a horizontally aligned grid defined by 3D lines.
Inheritance Hierarchy

Namespace: Ab3d.Visuals
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.2.9104.2045
Syntax
C#
public class WireGridVisual3D : BaseLineVisual3D

The WireGridVisual3D type exposes the following members.

Constructors
 NameDescription
Public methodWireGridVisual3D Constructor
Public methodWireGridVisual3D(String) Constructor
Top
Properties
 NameDescription
Public propertyCenterPosition Gets or sets the grid center position
Public propertyHeightCellsCount Gets or sets the number of cells in the height direction
Public propertyHeightDirection Gets or sets the direction of the height. Default value is z axis vector (0,0,1).
Public propertyIsClosed Gets or sets a Boolean that specifies if a rectangle is drawn around wire grid to close the grid. When this WireGridVisual3D also shows major lines (MajorLinesFrequency > 0), then the line thickness and color of the closing rectangle is specified with MajorLineColor and MajorLineThickness properties instead of LineColor and LineThickness properties. Default value is false.
Public propertyIsEmissiveMaterial Gets or sets a Boolean that is used only when FixedMesh3DLines is set to RenderingTechnique and specifies if emissive material (by default) is used to render lines's MeshGeometry3D. In this case the lines have the same color regardless if light illuminates them or not. When IsEmissiveMaterial is false, then a standard DiffuseMaterial with SolidColorBrush is used as a line's material. In this case the lines are shaders as other 3D objects in the scene.
Public propertyMajorLineColor Gets or sets the color of the major lines. To show major lines, the MajorLinesFrequency must be bigger then 0. Default value is Black.
Public propertyMajorLinesFrequency Gets or sets the interval between major lines - on how many minor lines comes one major line. When this value is zero or less, then major lines are not shown. Default value is 0.
Public propertyMajorLineThickness Gets or sets the thickness of the major lines (the value is specified in screen coordinates). To show major lines, the MajorLinesFrequency must be bigger then 0. Default value is 2.0
Public propertyRenderingTechnique Gets or sets a WireGridVisual3DWireGridRenderingTechniques enum that specifies how the lines in this wire grid are rendered. Default value is ScreenSpace3DLines that renders wire grid as other 3D lines where line thickness is specified in screen coordinates and where line's MeshGeometry3D need to be updated on each camera change. With FixedMesh3DLines option, a fixed MeshGeometry3D with flat rectangles that represent horizontal 3D lines is created. In this case line thickness is specified in world coordinates (the same as other 3D objects).
Public propertySize Gets or sets the size of the grid
Public propertyWidthCellsCount Gets or sets the number of cells in the width direction
Public propertyWidthDirection Gets or sets the direction of the width. Default value is x axis vector (1,0,0).
Top
Methods
 NameDescription
Protected methodCreateModel Creates this Model3D
(Overrides BaseVisual3DCreateModel)
Protected methodStatic memberOnIsEmissiveMaterialPropertyChanged OnIsEmissiveMaterialPropertyChanged
Protected methodOnLineColorPropertyChanged OnColorPropertyChanged is called when LineColor property is changed.
(Overrides BaseLineVisual3DOnLineColorPropertyChanged(DependencyPropertyChangedEventArgs))
Protected methodStatic memberOnMajorLineColorPropertyChanged OnMajorLineColorPropertyChanged
Top
Fields
 NameDescription
Public fieldStatic memberCenterPositionProperty CenterPositionProperty
Public fieldStatic memberHeightCellsCountProperty HeightCellsCountProperty
Public fieldStatic memberHeightDirectionProperty HeightDirectionProperty
Public fieldStatic memberIsClosedProperty IsClosedProperty
Public fieldStatic memberIsEmissiveMaterialProperty IsClosedProperty
Public fieldStatic memberMajorLineColorProperty MajorLineColorProperty
Public fieldStatic memberMajorLinesFrequencyProperty MajorLinesFrequencyProperty
Public fieldMajorLinesMeshOffset MajorLinesMeshOffset field defines a double that specifies an offset that is used to position major 3D lines slightly on top of minor 3D lines and can prevent z-fighting problems. When the value of this field is changed, this should be done before any other property value is set. Default value is 0.01.
Public fieldStatic memberMajorLineThicknessProperty MajorLineThicknessProperty
Public fieldStatic memberRenderingTechniqueProperty RenderingTechniqueProperty
Public fieldStatic memberSizeProperty SizeProperty
Public fieldStatic memberWidthCellsCountProperty WidthCellsCountProperty
Public fieldStatic memberWidthDirectionProperty WidthDirectionProperty
Top
Extension Methods
 NameDescription
Public Extension MethodDumpHierarchy Display details about the hierarchy of Visual3D children to Debug console (for example to Visual Studio's Immediate window).
(Defined by Extensions)
Public Extension MethodForEachGeometryModel3D Performs the specified action on each GeometryModel3D inside the rootModelVisual3D.
(Defined by Extensions)
Public Extension MethodForEachVisual3D Performs the specified action on each ModelVisual3D inside the rootModelVisual3D.
(Defined by Extensions)
Public Extension MethodGetName Gets name of the Visual3D that was previously set by SetName extension method.
(Defined by Extensions)
Public Extension MethodSetName Sets Name property to Visual3D. Note that if name is not correct for WPF, it can be corrected (name must start with a letter or the underscore character (_), and must contain only letters, digits, or underscores). In this case the SetName method will set the corrected name to the object and return false (in this case you can call GetName to get the corrected name). True is returned when the original name is set to the object.
(Defined by Extensions)
Top
See Also