The Reader3ds type exposes the following members.

Constructors

  NameDescription
Reader3ds
Constructor

Methods

  NameDescription
DumpNamedObjects
If run in immediate window the method displays the hierarchy of all objects, lights and Model3DGroups in this instance of Reader3ds. To get the NamedObjects description text use GetNamedObjectsText() method.
GetCameraForFrame
Gets the camera with index cameraIndex for the frameNo. Note: frameNo is double - so it is possible to create smoother animation with getting the positions within frames. See GetFrame for more details.
GetExpirationDate
Expiration date of current version. If set to DateTime.MaxDate than this version will never expire.
GetFrameOverloaded.
GetNamedObjectsText
Returns a hierarchy text of all objects, lights and Model3DGroups in this instance of Reader3ds. Used in DumpNamedObjects which displays the hierarcy of named objects (when run in immediate window).
ReadOverloaded.
ReadFileOverloaded.

Fields

  NameDescription
AllLightsGroupName
Key used in NamedObjects dictionary for Model3DGroup that contains all lights
AllModelsGroupName
Key used in NamedObjects dictionary for Model3DGroup that contains all models
GroupNameSuffix
Suffix used to name the object groups - for examle if there is a GeometryModel3D object named "head" its group has name "head__Group"
RootModelGroupName
Model3DGroup that contains all models and lights - can also be accesses by RootModel3DGroup property

Properties

  NameDescription
AddDefaultLight
Add default light (Direction=0, 0, -1) if there are no lights defined in 3ds file. Default value is false.
Animator
Gets and instance of a Animator3ds created with this Reader3ds.
Cameras
Gets list of all the cameras read from 3ds file. Used because Model3DGroup can have only one camera defined, but 3ds file can have more then one.
DefaultMaterial
Gets or Sets the material that will be applied to the read objects. Default value is Silver SolidColorBrush.
DisableTransparencies
Gets or sets if Transparencies are used in Materials or not.
ForceTwoSidedMaterials
If true than all the GeometryModels have both Material and BackMaterial set. This means that all the TriangleIndices can be visible from both sides.
FramesCount
Number of frames in the read 3ds file. If FramesCount is 1 than the 3ds file does not contain animation data but only one static frame. To get the index of the last frame you have to subtract 1 from the FramesCount. For example if the last animation takes place from frame 0 to frame 30, than the FramesCount will return 31.
ImportCameras
Gets or sets if Cameras are imported.
ImportLights
Gets or sets if Lights are imported.
ImportSpecularMaterial
Gets or sets if the SpeculaMaterial is imported - used. If false DiffuseMaterial is always used.
Instance
Gets static instance of Reader3ds so you do not need to create your own instance of it.
Materials
Gets the Dictionary that can be used to access all the materials defined in 3ds by their name.
MissingTextureFileName
Gets or sets the file name with full path of the image that will be used when the texture image is not present. Default value is null.
NamedObjects

Gets the Dictionary that can be used to access all the objects in 3ds file by its name as defined in 3d modeling application.

RootModel3DGroup
The root Model3DGroup from the last read 3ds file.
Shading
Defines the smoothing type that is applied to objects. Default value is SmoothingGroups that uses the Smoothing Groups values stored in 3ds file to define which edges are smooth and which are flat. The SmoothingGroups value produces the results as in the 3d model designer. However if you wish to force the flat or smooth looking objects choose either Flat or Smooth. Also if performance is much more important than rendering quality choose None.
TargetViewport
Gets the target Viewport3D that was used with ReadFile, GetFrame, etc.
TexturesPath
Gets or sets the path where the textures are located. If null or "" the path of the 3ds file is used. It is also possible to set TexturesPath to url of the textures (http://...) or to the application resources ("pack://application:,,,/XAMLBrowserApplication1;component/models") Default value is null.
ThrowMissingTextureException
Gets or sets if Reader3ds.MissingTextureExeprion is thrown if the texture is not found. If false then if the MissingTextureFileName is set it is used, if not set the simple SolidColorBrush material is used instead of texture (color is read from material). Default value is false.
Transformer
Gets and instance of a Transformer3ds created with this Reader3ds. Transformer3ds is a helper class that helps animate and transform (rotate, scale and translate) the objects read with Reader3ds.
UseModelTransforms
Default is false. If true than the TranslateTransform3D, ScaleTransform3D and RotateTransform3D are applied to each GeometryModel3D. If false than the positions are already fully transformed. Setting it to true can be used to get different transformations for each frames.
UseOldCoordinateAxis Obsolete.
The previous version has wrongly convert position from 3ds coordinate system to wpf coordinate system. The difference is that the x axis now points to the right instead of the left and the z axis points to the viewer and not away from it. This version by default uses new coordinate system, but if your application depends on the old one, you can simple set this property to true. But note that this can only be a temporary solution.
Note:Please note that this property is marked as obsolete and is valid only for backward compatibility and will be removed after version 4.2

See Also