Click or drag to resize
AB4D logo

ObjFileToWpfModel3DConverter Class

ObjFileToWpfModel3DConverter class can be used to convert the ObjFileData (3d model read from obj file) into WPF's Model3D.
Inheritance Hierarchy
SystemObject
  Ab3dObjFileToWpfModel3DConverter

Namespace: Ab3d
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax
C#
public class ObjFileToWpfModel3DConverter

The ObjFileToWpfModel3DConverter type exposes the following members.

Constructors
 NameDescription
Public methodObjFileToWpfModel3DConverter Initializes a new instance of the ObjMeshToWpfModel3DConverter class.
Top
Properties
 NameDescription
Public propertyBitmapCacheOption Gets or sets a BitmapCacheOption that is used when creating bitmaps from files. Default value is OnLoad that caches the image in memory at load time (this does not lock the image file name).
Public propertyDefaultBackMaterial Gets or sets a material that is used for BackMaterial when no other back material is specified in obj file. When set to null, no BackMaterial will be used.
Public propertyDefaultMaterial Gets or sets a material that is used when no other material is specified in obj file. By default DefaultMaterial is set to Silver DiffuseMaterial.
Public propertyInvertYTextureCoordinate Gets or sets a boolean that specifies if Y texture coordinate is inverted.
Public propertyNamedObjects Gets a Dictionary with object name as key and Model3D as value that defines names for the objects.
Public propertyParentModelVisual3D ParentModelVisual3D need to be set in case the obj files will support reading 3D lines. The property need to be set the ModelVisual3D that will be the parent for the read 3D models.
Public propertyResolveResourceFunc Gets or sets a Func that returns stream from the specified resource name. This can be used to read resources from stream. The returned stream will be closed by the ReaderObj.
Public propertyReuseMaterials Gets or sets a boolean that specified if one material instance defined in obj file can be reused for all Model3D objects that use that material. If false than a new material instance will be created for each usage. Default value is true.
Public propertyTexturesDirectory Gets or sets a folder name that when set is used to read texture file names from.
Top
Methods
 NameDescription
Public methodConvert(ObjFileData) Converts the ObjFileData into Model3D.
Public methodConvert(ObjMaterial) Converts ObjMaterial into a Material that can be used in WPF.
Public methodConvert(ObjMesh, ObjFileData) Converts one ObjMeshData from ObjFileData into Model3D
Top
See Also