Reads 3ds file from stream and returns its data in Model3DGroup object.
Namespace:
Ab3dAssembly: Ab3d.Reader3ds (in Ab3d.Reader3ds)
Version: 4.2.0.0 (4.2.0.0)
Syntax
| C# |
|---|
public Model3DGroup ReadFile( Stream fileStream ) |
| Visual Basic (Declaration) |
|---|
Public Function ReadFile ( _ fileStream As Stream _ ) As Model3DGroup |
| Visual C++ |
|---|
public: Model3DGroup^ ReadFile( Stream^ fileStream ) |
Parameters
- fileStream
- Type: System.IO..::.Stream
3ds file Stream
Return Value
read MeshGeometry3D object
Examples
The following example reads the 3ds file from a file stored in application's resources (in VS2005 marked as Resource - not Embeded resource). This can be very usefull for creating a xbap applications.
CopyC#
Uri fileUri = new Uri("pack://application:,,,/SampleApp;component/models/testModel.3ds", UriKind.Absolute)); using (Stream stream = Application.GetResourceStream(fileUri).Stream) { Ab3d.Instance.ReadFile(stream, Viewport1); }