Click or drag to resize
AB4D logo

ReaderObjReadModel3D(Stream, FuncString, Stream, Material) Method

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.

Namespace: Ab3d
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.2.9104.2045
Syntax
C#
public Model3D ReadModel3D(
	Stream objStream,
	Func<string, Stream> resolveResourceFunc,
	Material defaultMaterial
)

Parameters

objStream  Stream
stream with obj file
resolveResourceFunc  FuncString, Stream
method that converts the resource name into Stream - used to read additional resources (materials and textures)
defaultMaterial  Material
material that is used if no material is defined in obj file

Return Value

Model3D
Model3DGroup or GeomentryModel3D
See Also