Wireframe |
[ContentPropertyAttribute("OriginalModel")] public class WireframeVisual3D : BaseVisual3D
The WireframeVisual3D type exposes the following members.
Name | Description | |
---|---|---|
WireframeVisual3D | Constructor | |
WireframeVisual3D(String) | Constructor |
Name | Description | |
---|---|---|
AutoUpdate | Gets or sets a Boolean that specifies if the wireframe geometry is automatically regenerated on each change of OriginalModel or other WireframeVisual3D property (for example LineColor). Default value is true. | |
Content | Gets the wireframe model created from OriginalModel. It is not allowed to set this property. | |
IsEmissiveSolidModelColor | Gets or sets Boolean that specifies if EmissiveMaterial is used to show SolidModelColor. When true the whole model with the specifed color without any shading. When false the standard shader color is used. Default value is true. | |
isInsideDXEngine | isInsideDXEngine is set to true when this WireframeVisual3D is rendered by DXEngine. | |
LineColor | Gets or sets the color of the line. When UseModelColor is set to true the line color is get from model's material (when this is not possible than LineColor is used). | |
LineThickness | Gets or sets the thickness of the line in screen coordinates. | |
OriginalModel | Gets or sets a Model3D that is used to create wireframe model from. Note that changes to the OriginalModel does not automatically recreate the wireframe model. | |
RemoveDuplicateLines | Gets or sets a boolean that specifies if duplicate lines are removed when wireframe model is created. This creates simpler wireframe geometry but can take some time to execute when the wireframe model is created. Default value is true. | |
ShowPolygonLines | Gets or sets Boolean that specifies if WireframeVisual3D should show polygon lines that are defined with using PolygonIndicesProperty DependencyProperty on MeshGeometry3D objects. See remarks in PolygonIndicesProperty for more info. Default value is false. | |
SolidModelColor | Gets or sets a Color that represents the color that is used to show solid color when SingleColorSolidModel or WireframeWithSingleColorSolidModel is used for WireframeType. | |
UseModelColor | Gets or sets a Boolean that specified if line color is get from the color of model's material (in case of SolidColor DiffuseMaterial) or the specified LineColor is always used. | |
WireframeType | Gets or sets how wireframe and solid model will be shown with WireframeVisual3D. |
Name | Description | |
---|---|---|
CreateModel |
Creates this Model3D
(Overrides BaseVisual3DCreateModel) | |
OnContentChanged | OnContentChanged | |
OnLineColorPropertyChanged | OnLineColorPropertyChanged | |
OnOriginalModelPropertyChanged | OnOriginalModelPropertyChanged | |
OnSolidModelColorPropertyChanged | OnSolidModelColorPropertyChanged | |
OnVisualParentChanged |
OnVisualParentChanged
(Overrides BaseVisual3DOnVisualParentChanged(DependencyObject)) | |
OnWireframeVisualPropertyChanged | OnWireframeVisualPropertyChanged | |
RecreateWireframeModel | RecreateWireframeModel creates the wireframe model again. | |
ValidateLineThicknessPropertyValue | Returns true if line thickness is valid double and bigger or equal to 0 |
Name | Description | |
---|---|---|
ContentChanged | Notify that the Content was changed |
Name | Description | |
---|---|---|
IsEmissiveSolidModelColorProperty | SelectedModelProperty | |
LineColorProperty | LineColorProperty | |
LineThicknessProperty | LineThicknessProperty | |
OriginalModelProperty | OriginalModelProperty | |
ShowPolygonLinesProperty | ShowPolygonLinesProperty | |
SolidModelColorProperty | LineColorProperty | |
UseModelColorProperty | UseModelColorProperty | |
WireframeTypeProperty | WireframeTypeProperty |
Name | Description | |
---|---|---|
DumpHierarchy |
Display details about the hierarchy of Visual3D children to Debug console (for example to Visual Studio's Immediate window).
(Defined by Extensions) | |
ForEachGeometryModel3D |
Performs the specified action on each GeometryModel3D inside the rootModelVisual3D.
(Defined by Extensions) | |
ForEachVisual3D |
Performs the specified action on each ModelVisual3D inside the rootModelVisual3D.
(Defined by Extensions) | |
GetName |
Gets name of the Visual3D that was previously set by SetName extension method.
(Defined by Extensions) | |
SetName |
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) |
WireframeVisual3D shows the 3D model specified in OriginalModel property as wireframe model. In XAML the OriginalModel can be also specified as content of the WireframeVisual3D element.
The Model3D specified as OriginalModel can be shown in many different ways (as wirframe only, as various combinations of wireframe and solid model or as solid model). The type of shown object is set by the WireframeType property - the possible values are defined in the WireframeVisual3DWireframeTypes enum.
Performance considerations:
Regenerating wireframe geometry can take long time and therefore it is important to do this as few times as possible.
WireframeVisual3D is subscribed to any changed done in the Model3D set to the OriginalModel property. When AutoUpdate is true (by default) any changes to the OriginalModel will regenerate the whole wireframe geometry. If you are changing a lot of data on the Model3D (for example changing individual Positions on MeshGeometry3D) then each individual change will regenerate the whole wireframe geometry.
Also if you change multiple properties on WireframeVisual3D (for example LineColor and LineThickness), each change will regenerate the whole wirframe geometry.
To prevent that it is possible to set the AutoUpdate to false and after the changes have been made manually call the RecreateWireframeModel method.
Another option is to call BeginInit() method on WireframeVisual3D, do all the changes and then call EndInit() method. For example: