Viewport3ds Class |
Namespace: Ab3d.Controls
[ContentPropertyAttribute("Children")] public class Viewport3ds : Viewport3D
The Viewport3ds type exposes the following members.
Name | Description | |
---|---|---|
![]() | Viewport3ds |
Constructor
|
Name | Description | |
---|---|---|
![]() | AnimationDuration |
Gets or sets the time in second how long will the whole animation be playing (once from the first to the last frame).
|
![]() | AutoRepeat |
Gets or set if the animation should automatically repeat itself or not.
Default value is true.
|
![]() | AutoReverse |
Gets or sets if animation should go backwards when coming to the last frame or should it start from beginning.
Default value is false.
|
![]() | CameraIndex |
Gets or sets the index of the used camera from the list of cameras defined in 3ds file
|
![]() | FrameNumber |
Gets or sets the frame number that is displayed by the Viewport3ds
|
![]() | IsAnimated |
Gets or sets a Boolean value that specifies if the Viewport3ds is automatically playing the animation read from 3ds file.
|
![]() | Source |
Gets or sets the Source of the 3ds file
|
![]() | 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")
|
![]() | UsedReader3ds |
Gets the Ab3d.Reader3ds instance that is used to read the 3ds file
|
Name | Description | |
---|---|---|
![]() | BeginInit |
Starts the initialization process for this element.
(Overrides FrameworkElementBeginInit.) |
![]() | EndInit |
Indicates that the initialization process for the element is complete.
(Overrides FrameworkElementEndInit.) |
Name | Description | |
---|---|---|
![]() | AfterReading3dsFile |
AfterReading3dsFile event occurs after the 3ds file has been read.
|
![]() ![]() | BeforeReading3dsFile |
BeforeReading3dsFile event occurs after the UsedReader3ds has been created and before the actual 3ds file has been read.
|
Name | Description | |
---|---|---|
![]() ![]() | AnimationDurationProperty |
AnimationDurationProperty
|
![]() ![]() | AutoRepeatProperty |
AutoRepeatProperty
|
![]() ![]() | AutoReverseProperty |
AutoReverseProperty
|
![]() ![]() | CameraIndexProperty |
CameraIndexProperty
|
![]() ![]() | FrameNumberProperty |
FrameNumberProperty
|
![]() ![]() | IsAnimatedProperty |
IsAnimatedProperty
|
![]() ![]() | SourceProperty |
SourceProperty
|
![]() ![]() | TexturesPathProperty |
TexturesPathProperty
|
Viewport3ds is the most simple way to show 3D objects from 3ds file. With specifying the Source property to the Uri of the 3ds file the Viewport3ds will show the 3D models with lights from the 3ds file.
If the 3ds file also defines cameras, they are also used for the Viewport3ds. By the fault the first camera is used. With CameraIndex property it is possible to set other cameras.
Viewport3ds can play animations from 3ds file. This can be done manually with setting the FrameNumber property. This property can be animated with DoubleAnimation.
Animations can be also played automatically with simply setting IsAnimated property to true. When animation is automatically played AnimationDuration, AutoRepeat and AutoReverseProperty properties are used to control the animation.
The following xaml shows 3D models from the 'ab3d drop down.3DS' file and plays the animation defined in the 3ds file.
<Page x:Class="Reader3dsSamples.Viewport3ds.Viewport3dsSample" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls3ds="clr-namespace:Ab3d.Controls;assembly=Ab3d.Reader3ds"> <DockPanel> <controls3ds:Viewport3ds Source="/Resources/ab3d drop down.3DS" IsAnimated="True" AutoRepeat="True" AnimationDuration="0:0:10"/> </DockPanel> </Page>