|
ReaderObj Class |
ReaderObj can read 3D models from obj files.
Inheritance Hierarchy Namespace: Ab3dAssembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.1.8864.1045
Syntax The ReaderObj type exposes the following members.
Constructors Properties | Name | Description |
---|
| BitmapCacheOption |
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).
|
| DetectEncodingFromByteOrderMarks |
Indicates whether to look for byte order marks at the beginning of the file to detect the text encoding (using in StreamReader constructor). Default value is true.
|
| Errors |
Gets a list of errors that occur during obj file loading.
|
| IgnoreErrors |
Gets or sets a Boolean that specifies if errors are ignored and reader tries to read as much data as possible.
The error texts are written to Errors list.
|
| NamedObjects |
Gets a dictionary that can be used to get a 3D object by its name (key = name, value = Model3D)
|
| ParentModelVisual3D |
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.
|
| ReadPolygonIndices |
Gets or sets a Boolean that specifies if PolygonIndicesProperty is set to the created MeshGeometry3D objects.
This property defines the indexes of positions that define mesh polygons.
This property is used only when the assimp scene was not read with Triangulation post process and when the Ab3d.PowerToys library is referenced.
Default value is false.
|
| ResolveResourceFunc |
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.
|
TopMethods | Name | Description |
---|
| ReadFile |
Reads the objFileName file and returns the ObjFileData object.
|
| ReadModel3D(String) |
Reads the 3D models from objFileName file and returns the 3d models as Model3DGroup or GeomentryModel3D.
Textures directory is the same as obj file directory.
|
| ReadModel3D(Stream, FuncString, Stream) |
Reads the 3D models from stream and returns the 3d models as Model3DGroup or GeomentryModel3D.
When the obj file have any additional resources (materials and textures), the resolveResourceFunc must be set a method that converts the resource name into Stream.
|
| ReadModel3D(Stream, FuncString, Stream, Material) |
Reads the 3D models from stream and returns the 3d models as Model3DGroup or GeomentryModel3D.
When the obj file have any additional resources (materials and textures), the resolveResourceFunc must be set a method that converts the resource name into Stream.
|
| ReadModel3D(String, String, Material) |
Reads the 3D models from objFileName file and returns the 3d models as Model3DGroup or GeomentryModel3D.
|
| ReadStream |
Reads the obj file from specified stream and returns the ObjFileData object.
|
TopSee Also