Ab3d.PowerToys versions history
See related blog posts to get additional information about development history of the Ab3d.PowerToys toolkit.
- Added Ab3d.Visuals.SphericalZoneVisual3D and Ab3d.Meshes.SphericalZoneMesh3D to create a section of a sphere that is defined by start and end zone angle and a direction. Spherical zone can be also at the end of tube line to make the ending of tube line rounded.
- Added new overloads of BaseCamera.FitIntoView methods that take Rect3D and IList<Point3D> - this way, you can use FitIntoView based on a custom bounding box or a list of 3D positions.
- Fixed showing 3D lines that are created from Line3DFactory and that are initially added to a hidden ContentVisual3D (IsVisible is initially set to false) and then later the IsVisible is set to true.
- Added SubscribeWithEventManager3D method to ModelScalarVisual3D. Using SubscribeWithEventManager3D is needed to use model scaling utility inside the same 3D scene that is rendered by Ab3d.DXEngine (and not in an overlay Viewport3D).
- Fixed rendering backside text with TextBlockVisual3D when the IsBackSidedTextFlipped is initially set to true.
- Improved Ab3d.Utilities.BitmapRendering.RenderToBitmap method to clear Margin of the rendered object when Left or Top are greater than 0. This prevents cropping the rendered object. The Margin is set back to original value after rendering.
- Added AxisWith3DLabelsVisual3D, AxisWithOverlayLabelsVisual3D, BaseAxisWithLabelsVisual3D and AxesBoxVisual3D. Those Visual3D can be used to show 3D axes with labels.
- Added ContourLinesFactory that can create 3D contour (also known as isolines) from a 3D mesh.
- Added CreateContourLinePositions, CreateMultiContourLinePositions and GetPositionValues to HeightMapVisual3D.
- Added UseHeightValuesAsTextureCoordinates property to HeightMapVisual3D. Also added useHeightValuesAsTextureCoordinates optional parameter to HeightMapMesh3D constructor. When true (by default) then it produces more accurate height colors because height values are interpolated between height positions; when false (as in the previous version) then a two dimensional texture is created with different colors for each height position and then colors are interpolated between positions. Because pixels in the two-dimensional texture are actually squares, the final result is not so accurate as when UseHeightValuesAsTextureCoordinates is set to true.
- Added SetCustomMinMaxValues method to HeightMapMesh3D - it allows setting custom min and max values (used when useHeightValuesAsTextureCoordinates is true).
- Added GradientColorsCount, MinValue and MaxValue properties to HeightMapVisual3D.
- Added GetPositionValues and GetHeightTextureColor methods to HeightMapVisual3D.
- Added CreateGradientTexture to HeightMapMesh3D - this simplifies creating a texture from a gradient.
- Added Parent property to BaseVisual3D class (this class is the base class for all other Visual3D objects in Ab3d.PowerToys library). This way it is possible to traverse up the hierarchy of Visual3D objects that are derived from BaseVisual3D. The value of the property is set to parent Visual3D, to Viewport3DVisual (when the object is added to a Viewport3D) or to null (not assigned to any parent).
- Added GetContent and SetContent methods to BaseVisual3D class. The methods can be used to get or set the Content (as Model3D) of a Visual3D object even when the Visual3D object is hidden. In this case the Content property (defined by WPF) is set to null (to hide the object) and the content that was visible before is saved to a protected savedHiddenContent field. So when the Visual3D is visible, then the GetContent and SetContent methods will get and set the Content property; when Visual3D is hidden, then the GetContent and SetContent methods will get and set the savedHiddenContent field.
- Added TorusKnotMesh3D and TorusKnotVisual3D that creates a parametrized torus knot 3D object.
- Added processOnlyIntersectingTriangles optional parameter to methods in MeshBooleanOperations. When it is true (by default) then only triangles from mesh1 that intersect the bounds of mesh2 will be processed by subtraction, intersection or union operation; other triangles will be copied from the mesh1. This can produce significantly simpler mesh in cases when the boolean operation takes place on only a smaller part of the mesh1.
- Added GetIntersectingTriangles and SplitMeshByIndexesOfTriangles methods to Ab3d.Utilities.MeshUtils. The first method returns a list of triangle indexes that intersect the specified Rect3D. The second method can be used to split a MeshGeometry3D to two MeshGeometry3D based on the list of triangle indexes (that can be generated by the first method).
- Added MeshBooleanOperations.UsePolygonIndices static field that specifies if PolygonIndices from MeshGeometry3D are used to get initial polygons that are used in boolean operations. Before, PolygonIndices were always used (if they were defined) and this could prevent using correct polygons because on curved surfaces (cylinder, sphere, etc.) the curved parts are not converted into PolygonIndices. Now the default value for UsePolygonIndices is false so by default the standard mesh triangles will be used for Boolean operations.
- Added Dispose method to TextBlockVisual3D. The Dispose method can be used to release the native memory that is used by RenderTargetBitmap that can be created by the TextBlockVisual3D.
- Added IsValid method to BaseCamera. The method can be called to check if the camera is valid - it is valid when it has TargetViewport3D, the Viewport3D has a valid size and values for all properties are valid. It can be used before calling Point3DTo2D and similar methods to check if those methods can produce the correct result (for example if the Viewport3D's size is not defined, then Point3DTo2D will return a point with double.NaN values).
- Improved performance of GetBounds and FitIntoView methods.
- Improved MeshBooleanOperations.Union method. The method now checks if the meshes do not intersect and in this case simply combines the meshes with using MeshUtils.CombineMeshes method.
- Improved MeshInspectorOverlay with improved grouping of position indexes for positions that are very close together.
- Optimized performance of Ab3d.Utilities.MeshUtils.CalculateNormals.
- Prevented setting camera's Distance in FitIntoView to 0 when the scene is empty (in new version the camera's distance is preserved when the scene is empty).
- Prevented throwing an exception in some mesh boolean operations when Ab3d.Utilities.MeshUtils.CreatePolygonIndicesByDefault was set to true.
- Prevented showing solid Model3D with WireframeVisual3D when IsVisible is set to false.
- Prevented throwing Index out of range exception from call to HeightMapVisual3D.GetHeightTextureColor.
- Improved user experience when rotating ModelRotatorVisual3D by mouse when the ModelRotatorVisual3D object is rotated (a rotation transformation is set to its Transform property).
- Fixed using QuickZoom when using orthographic camera and zoom to custom position.
- Fixed AxisVisual3D so that it shows arrows at the end of the axes lines.
- Fixed reading obj files with ReaderObj when the positions in the obj file are defined by more the 9 decimal characters.
- Fixed rendering MultiLineVisual3D when some lines use the same start and end position.
- Fixed setting size of the TextBlockVisual3D when the text is changed after the TextBlockVisual3D was already shown and the size is calculated automatically.
- Fixed generating PolygonIndices for LatheMesh3D and for TubeMesh3D / TubeVisual3D when InnerRadius is 0 or when EndAngle is not 360.
- Fixed updating color on TextVisual3D and CenteredTextVisual3D objects.
- Fixed updating LineWithTextVisual3D when its UsedTextBlockVisual3D is set to true and position property is changed after the LineWithTextVisual3D was already shown.
- Fixed a few cases when the objects were not correctly shown or hidden when IsVisible property was changed.
- Published assembly compiled for .Net 5.0.
- Added MouseMoveThreshold to MouseCameraController. This property specifies how much the user needs to move the mouse before rotation, movement or quick zoom is started. The default value is 1. Because MouseCameraController does not handle mouse events until the mouse is moved for the specified amount, the events can be used by the user code (for example, to handle mouse click on the same mouse button that is used for camera rotation; this way it is not needed to use Preview mouse events for that anymore).
- Improved TextBlockVisual3D so that its Material and BackMaterial objects are preserved when changing properties. Before new instances of Material and BackMaterial objects were created. So if user has assigned some DXAttributes (used for special setting in Ab3d.DXEngine, for example, UseSolidColorEffect and Texture_AlphaClipThreshold) to the Material, the settings were removed when a new instance was created.
- Improved LineWithTextVisual3D with adding UseTextBlockVisual3D and UsedTextBlockVisual3D properties. With setting UseTextBlockVisual3D to true, the LineWithTextVisual3D will show text by using TextBlockVisual3D instead of TextVisual3D. Using TextBlockVisual3D provides much more text rendering options and allows using any font. When UseTextBlockVisual3D is true, then the text can be customized by changing the properties on the UsedTextBlockVisual3D property. When UseTextBlockVisual3D is false (by default), the text is shown using an old plotter font and 3D lines.
- Fixed TransparencySorter to correctly sort GeometryModel3D objects with texture images when ConsiderNonSolidColoredBrushesAsTransparent is true.
- Prevented showing license dialogs when running in Visual Studio designer (only for a library that is distributed by NuGet).
- Fixed calculating PolygonAnalyzer.IsClockwise property.
- Prevented flipping the 3D mesh by X axis when the mesh is created by the Mesh3DFactory.CreateExtrudedMeshGeometry method.
- Fixed orientation of triangles that are created by the CreateExtrudedMeshGeometry method when the shape is defined in clock-wise direction and both addBottomTriangles and addTopTriangles are false.
- Improved CameraAxisPanel so that if the axis color is set to Colors.Transparent, that axis is not shown.
- Added Update method to MultiPolyLineVisual3D - this method needs to be called after the PositionsList is changed.
- Fixed rendering 3D lines when they are positioned behind the orthographic camera (in this case, the line should be visible; when using PerspectiveCamera it is correct that the lines behind the camera are not visible).
- Fixed exporting to stl file format under some circumstances (see https://forum.ab4d.com/showthread.php?tid=4226&pid=5632#pid5632)
- Improved logging from AssimpWpfExporter so that native assimp log messages are also written to the log callback.
- Improved LoadAssimpNativeLibrary method that can now take also the full path to the library and not only the folder path. This way it is possible to load the native Assimp library with a different name - and not from files with names "Assimp32.dll" and "Assim64.dll".
- Added MeshAnalyzer that can analyze the MeshGeometry3D and produce a list of Edges and Polygons (triangles) that define the mesh. MeshAnalyzer can also create edge lines that are created between triangles that have normal angles bigger than the specified angle.
- Added EdgeLinesFactory class that can be used to simplify creating edge lines for Model3DGroup and GeometryModel3D objects.
- Added Wpf3DFile class can be used to save and load Model3D objects into a custom wpf3d file format. The class is defined in the samples project and provided with full source code so you can adjust it to your needs.
- Improved ViewCubeCameraController with adding IsEdgeSelectionEnabled property. When the property is true (by default) it allows the user to click on ViewCube edge or corner and rotate. This will rotate the camera so that the camera faces the selected edge or corner.
- Added CubeSize, CubeEdgeSize and AmbientLightColor properties to ViewCubeCameraController.
- Improved ContentVisual3D to properly support showing and hiding child BaseVisual3D objects (other ContentVisual3D, BoxVisual3D, SphereVisual3D and other objects) that are added to its Children collection. In previous versions, the ContentVisual3D only supported showing and hiding Model3D objects that were set to its Content property.
- Added ChildrenChanged event to ContentVisual3D.
- Added an extension method CreateContentVisual3D to a Model3D class (GeometryModel3D or Model3DGroup) to easily create an ContentVisual3D from a Model3D object.
- Added IsActuallyVisible read-only property to BaseVisual3D class. This property can be read to get the information if the Visual3D objects is actually shown - for example, when IsVisible is true, but the parent Visual3D is not shown.
- Added ParentChanged event to BaseVisual3D - this adds the event to all Visual3D classes in Ab3d.PowerToys library.
- Added StartAngle and EndAngle properties to TubeVisual3D and to TubeMesh3D.
- Fixed Camera.FitIntoView when the 3D scene contains only lines and if FitIntoView is called before the lines are rendered for the first time.
- Added GetAverageNormalVector3D method to Ab3d.Utilities.MeshUtils class (the average normal is calculated by summing normal vectors of all triangles and dividing it by the number of triangles)
- Automatically recreate the camera's light if the Viewport3D.Children are cleared or if the light's Visual3D is removed from the Viewport3D.Children without changing the ShowCameraLight property (to Never or Auto and adding another light). In previous versions, the Refresh method needed to be called to recreate the camera's light.
- Updated EventManager3D.UpdateHitObjects method with adding an optional MouseEventArgs parameter is passed to the triggered mouse events.
- Improved camera handling in some cases when TargetViewport3D is changed.
- Added StaticLineMeshesSample that shows how to create a static GeometryModel3D from 3D lines.
- AssimpWpfImporter: prevented creating SpecularMaterial when assimpMaterial.Shininess is 0.
- When the user manually sets cursor on MouseCameraController.EventsSourceElement, the correct cursor is restored when the user finishes with quick zooming.
- Changed default cursor that is used by the MouseCameraController from a custom RotateCursorRight to a standard SizeAll cursor. The previous cursor was low resolution and did not look good on high a dpi monitor. If you want to use the previous cursor use the following code: "MouseCameraController1.RotationCursor = MouseCameraController1.RotateCursorRight;".
- Added MovementCursor and QuickZoomCursor properties to MouseCameraController. This way it is possible to define different cursors that are used during camera movement and quick zooming.
- Added OpenedHandCursor and ClosedHandCursor to MouseCameraController.
- Added RotateTo method to FreeCamera. It can be used to easily rotate the camera to a new CameraPosition and UpDirection.
- Improved ViewCubeCameraController with adding support to control a FreeCamera.
- Added IsRotationCircleShown property to ViewCubeCameraController - it can be used to hide the rotation circle (useful when controlling a FreeCamera).
- Improved behaviour of ViewCubeCameraController when its TargetCamera is set to null.
- Added Points3DTo2D method to BaseCamera. The method can be used to quickly calculate 2D screen positions from many 3D positions (the method also support parallel calculation).
- Improve automatic finding of camera in CameraAxisPanelPrevent, CameraPreviewPanel and ViewCubeCameraController when TargetCamera is not set at load time (prevented finding invalid camera).
- If IsEnabled property in EventManager3D is set to false while mouse dragging, then the dragging is stopped and mouse capture is released. Note that EndMouseDrag event is not called in this case because there is no mouse event data that can be passed to the event handler.
- Prevented throwing Null reference exception in TransparencySorter in case a DiffuseMaterial does not have the Brush property defined.
- Improved TransparencySorter for some cases when sorting the Visual3D objects that are direct children of Viewport3D (and not children from some other ModelVisual3D object).
- Improved TransparencySorter when its Sort method is called before camera is loaded (in this case camera.Refresh method is called to updated the camera properties).
- Fixed a check that prevented using only 2 positions in the TubePathMesh3D and in the TubePathVisual3D (at least 3 positions were required though tube path can be created also with only 2 positions).
- Prevented a small memory leak that can occur when the positions for 3D lines are changing rapidly and the 3D scene is rendered with DXEngine.
- Added public Material and BackMaterial getters to TextBlockVisual3D. This way you can get the used materials - for example to use SetDXAttribute method to set alpha-clipping or alpha-to-coverage rendering mode when rendered with Ab3d.DXEngine.
- Fixed setting BorderSize in TextBlockVisual3D.
- Fixed updating TextBlockVisual3D when TextHorizontalAlignment, TextAlignment or TextVerticalAlignment are changed.
- Fixed AlignWithCamera when FreeCamera is used.
- Added Ab3d.Utilities.MeshUtils.PositionAndScaleMeshGeometry3D method that can position and scale the positions in MeshGeometry3D based on the specified parameters.
- Added CameraWidthTrack to CameraAnimationNode so it is possible to animate the CameraWidth used by the Orthographic camera.
- Improved FitIntoView method when Orthographic camera is used - before it was possible that in some cases the camera's position was moved into the 3D scene and this could cut some objects on the NearCameraPlane because they were placed behind the camera.
- Added support for .Net CORE 3.1
- Added PlanarShadowMeshCreator class that can be used to generate a MeshGeometry3D that represents a planar shadow mesh.
- Added AnimationType property to FreeCameraAnimationNode class to provide spherical animation of FreeCamera (using Quaternion.Slerp).
- Added Tag getter and setter to BaseVisual3D (using FrameworkElement.TagProperty). This way all Visual3D objects can get a custom object set to the Tag property.
- Added Position property to ColoredAxisVisual3D to easily move the axis around or just lift it up slightly from the wire grid.
- Added SetMaterialOpacity method to Ab3d.Utilities.ModelUtils class. The method can change opacity in all materials in the specified GeometryModel3D or Model3DGroup.
- Improved Ab3d.Utilities.Dumper to better show the material details.
- Added new Plane object constructor that takes normal and d value.
- Added new constructors to ModelScalarVisual3D and ModelRotatorVisual3D that take custom axes vectors to provide custom orientation.
- Added CenterBoxScaleScreenDirection to ModelScalarVisual3D - it defines the direction into which the model is scaled up when using the center box.
- Added GetDirectionalLightShadowMatrix and GetPointLightShadowMatrix to Plane class.
- Added CombineAllMeshes and CollectAllMeshes methods to Ab3d.Utilities.MeshUtils.
- Added AfterUpdated event to CameraAxisPanel, CameraPreviewPanel and ViewCubeCameraController
- Improved TransparencySorter so that so that it works also with FreeCamera (in previous version TransparencySorter worked only with camera that were derived from SphericalCamera class).
- Improved ViewCubeCameraController with adding support for showing selected planes with different bitmap. There are also new methods to change the bitmap of a specified plane, change color of the rotation circle and new events for mouse enter and mouse leave.
- Fixed Ab3d.Utilities.TransformationsHelper.GetVisual3DTotalTransform method so that it returns a correct transformation.
- Fixed getting the closest 3D position on from a LineSelectorData class in case the PositionsTransform3D is set.
- Added static DefaultXAxis, DefaultYAxis and DefaultZAxis properties to ModelScalarVisual3D and ModelMoverVisual3D to define the default axes orientation when the ModelScalarVisual3D or ModelMoverVisual3D are created from xaml or with default constructor.
- Fixed creating outer rectangle for WireGridVisual3D when FixedMesh3DLines RenderingTechnique is used and IsClosed is set to true.
- Unsubscribe mouse events when MouseCameraController is unloaded (events are automatically subscribed back if the control is loaded again).
- Prevented overwriting Cursor property on EventsSourceElement by MouseCameraController when it is set by the user.
- Fixed processing mouse events on ModelMoverVisual3D after ShowMovablePlanes is set to false and then back to true.
- Improved MouseCameraController so that when mouse wheel event is processed by the MouseCameraController (zoom in or out), then this event is marked as handled so that it is not processed by some other WPF control again.
- Improved skeletal animation to support animations with multiple skeletons and with more complex hierarchies of bones (the new files are part of sample project)
- Added sample that shows how to use standard WPF 3D hit testing.
- Added a quick WPF 3D tutorial.
- Using native Assimp v18.104.22.168
- Added AssimpDumper class and Dump extension method on Assimp's Scene object to dump the detailed information about Assimp Scene into the Visual Studio Output window.
- Added extrude along a path - created an override of the Ab3d.Meshes.Mesh3DFactory.CreateExtrudedMeshGeometry method that also takes a list of Point3D that represents the extrusion path.
- Added a new constructor for TubePathMesh3D that also takes a PointCollection as a parameter - the PointCollection specifies the texture coordinates for each path position. This allows using TubePathMesh3D to show colored streamlines.
- Added MeshInspectorOverlay control that can be added on top of Viewport3D to show position and triangle indexes of the specified MeshGeometry3D.
- Added ModelScalarVisual3D that can be used to scale 3D model (similar to ModelMoverVisual3D and ModelRotatorVisual3D).
- Improved ModelMoverVisual3D and ModelRotatorVisual3D to prevent showing a hidden axis (for example when IsXAxisShown is set to false) or hidden rotation circle after a size property (for example AxisLength) is changed.
- Added Ab3d.Utilities.StandardTransform3D class that generates a MatrixTransform3D based on the translate, rotate and scale transform.
- Significantly optimized the Boolean operations code that is now much faster (though still slow for complex objects).
- Added BooleanMesh3D class that improves performance for Boolean operations when multiple Boolean operations are done on the same mesh.
- Added support to read PolygonIndices in Boolean operations - this can reduce the number of used polygons by half (for example for BoxMesh3D or SphereMesh3D).
- Added IsXMovementEnabled, IsYMovementEnabled, IsHeadingRotationEnabled and IsAttitudeRotationEnabled properties to the MouseCameraController. This can be used to lock rotation only around a specified axis or prevent movement in the specified axis.
- Added FreeCameraAnimationNode that can be used to animate FreeCamera's CameraPosition, TargetPosition and UpDirection.
- Added GetPolygons method to MeshUtils to get a list of polygons from the MeshGeometry3D that has PolygonIndices set.
- Corrected calculating texture coordinates for the top and bottom position of the sphere to correctly align the texture.
- Fixed setting FieldOfView, Width, NearPlaneDistance and FarPlaneDistance properties when the TargetViewport3D is changed (for example when having multiple cameras and when the active camera is specified with setting the TargetViewport3D property).
- Added proper support for zooming with 3D mouse when using OrthographicCamera with FreeCamera or FirstPersonCamera.
- Improved Ab3d.Utilities.CameraUtils.CalculateCameraAngles method for some edge cases (where attitude is close to 90 or -90).
- Improved support for animating FreeCamera with CameraAnimationNode - now it is possible to animate FreeCamera from one heading/attitude angle to another. Note that FreeCamera allows rotation around arbitrary axes and therefore cannot be always converted reliably into heading, attitude and bank. This means that angles (heading, attitude and bank) at the start of the animation may not be always correct.
- Added start and end angle to lathe creator (LatheMesh3D) to rotate the shape only between the specified angles instead of the whole circle. There is also a new ZeroAngleVector3D property on the LatheMesh3D to specify in which direction the start angle points.
- Fixed generating texture coordinates in LatheMesh3D when isStartPositionClosed or isEndPositionClosed are true.
- Improved LineSelectorData to correctly calculate the 3D line that is closest to the mouse position in case when the 3D line crosses the near camera plane (one part of the line is behind the camera).
- Optimized performance of CalculateScreenSpacePositions and GetClosestDistance methods in LineSelectorData and provided a way to call those two methods in multiple threads (see updated LineSelector sample for code sample).
- Added Line3DTo2D method to BaseCamera class. The method converts a 3D line positions to screen 2D positions. This method correctly handles the case when the 3D line crosses the camera near plane (goes behind the camera). In this case the line needs to be cropped at the camera near plane.
- Improved MouseCameraController to add support for using IsRotationDirectionAdjusted when a FreeCamera is used.
Changes in the Ab3d.PowerToys.Input library:
- CheckController method now takes a updateTargetCamera parameter. When set to true, then the TargetCamera is updated based on the controller state. This allows manual updating of the camera - for example in WinForms application (in this case set the AutomaticallyStartCheckingController to false).
- Changed units for RotationSpeed and MovementSpeed - now the values are expressed per second; before they were per each check of the controller state. This means that before rotation and movement speed was determined by the FPS (number of times CheckController method was called). Now this speed remains constant. The default values were also changed: RotationSpeed is changed from 2 to 120; MovementSpeed is changed from 1 to 100.
- XInputControllerThumbChangedEventArgs class got a new ElapsedSeconds property that specifies how many seconds has elapsed after the last OnLeftThumbChanged and OnRightThumbChanged event.
- Added InvertLeftAndRightMoveDirection property to XInputCameraController to invert left and right movement direction.
- Added RotateOnlyHorizontally property to XInputCameraController - can be set to true to prevent rotating up and down (changing camera's Attitude).
- Added IsXMovementEnabled, IsYMovementEnabled, IsZMovementEnabled, IsHeadingRotationEnabled, IsAttitudeRotationEnabled and IsBankRotationEnabled properties to the Mouse3DConnector. This can be used to lock rotation only around some axes or prevent movement in the specified axes.
- Added QuickZoom support to MouseCameraController to quick zoom in or zoom out with the mouse. To control QuickZoom the following new properties are added to MouseCameraController: QuickZoomConditions, QuickZoomMaxZoomInFactor, QuickZoomZoomOutFactor, QuickZoomMaxFactorScreenDistance and ShowQuickZoomMarker. There is also a new QuickZoomCamera method to manually perform the quick zoom.
- Added UseMousePositionForMovementSpeed property to MouseCameraController. When true the panning speed is determined by the distance to the 3D object behind the mouse.
- Added MaxCameraDistance to MouseCameraController. The property can be used to specifies the maximum Distance of the camera or the maximum CameraWidth (when OrthographicCamera is used). This property can be set to a reasonable number to prevent float imprecision when the camera distance is very big.
- Significantly improved panning when a custom RotationCenterPosition or zoom to custom position is used. Now the camera's Distance property is adjusted so that the panning speed will be consistent according to the position of the user's interest.
- Improved panning so that the 3D position under the camera more closely follows the mouse when panning (improved for all cases and not only when custom rotation position is used).
- Fixed creating SkeletonNodes hierarchy from bones read with Assimp imported (the nodes that do not have bones are not part of the hierarhcy any more).
- Fixed calculating camera angular velocity when using custom RotationCenterPosition. This prevents invalid camera rotations that could occur when a user releases the mouse button (and when RotationInertiaRatio is bigger than 0).
- Improved Ab3d.Utilities.ModelUtils.GetBounds method and FitIntoView (that is using GetBounds) to correctly include the bounds of 3D lines that are rendered with DXEngine.
- Fixed calculating zoom position when ZoomMode is set to MousePosition, MouseCameraController is used in DXEngine and when a user zooms to an area without any 3D object behind the mouse.
- Fixed setting MouseCameraController.EventSourceElement to Viewport3D when EventSourceElement is not set and when not used inside DXEngine.
- Fixed showing axes in ModelMoverVisual3D and ModelRotatorVisual3D when they are shown after they were hidden (setting for example IsXAxisShown to true after it was set to false).
- Changed IsMouseButtonsConditionTrue and IsKeyboardConditionTrue methods in MouseCameraController to protected virtual so they can be overriden in a derived class.
- When OrthographicCamera camera type is used the FitIntoView method now also adjusts the Distance property (and not only CameraWidth property). This can prevent floating point imprecisions that can be caused when the Distance is increased too much.
- Fixed rendering 3D lines under some cases when OrthographicCamera is used (usually when NearPlaneDistance is negative).
- Fixed FitIntoView method when there are no WPF 3D objects in the scene (there are only DXEngine SceneNodes) and PerspectiveCamera is used.
New features and improvements:
- Improved WireGridVisual3D with adding support to show the grid lines with both major and minor lines. The appearance of major lines can be set with new MajorLineColor, MajorLineThickness, MajorLinesFrequency and RenderingTechnique properties.
- Added EllipseLineVisual3D class and Line3DFactor.CreateEllipseLine3D method to create 3D ellipse lines.
- Added ContentVisual3D that is the same as standard WPF's ModelVisual3D but also have a new IsVisible property. Using ContentVisual3D provides a way to show or hide a Geometry3DModel or a Model3DGroup object with using a new optimized visibility processing that comes with Ab3d.DXEngine v3.0.
- Added CornerWireBoxVisual3D that is similar to WireBoxVisual3D but it shows lines only in the corners or the specified Rect3D.
- Improved performance of TextVisual3D with reducing the number of required polylines.
- Added TextAlignment property to TextBlockVisual3D to control the alignment of text inside TextBlock - possible values are: Left (default), Right, Center, Justify.
- Added MoveTargetPositionTo to TargetPositionCamera - the method animates the TargetPosition to the specified new position.
- Added GetPlaneGeometryModel3D method to the ViewCubeCameraController class. The method returns a Model3D that is used to display a specified ViewCube's plane. This allows advanced customizations of the plane.
- Added PlaneClickAnimationDuration to ViewCubeCameraController - the property controls the animation duration when a user clicks on ViewCube's plane.
- Added ViewCubePlaneClicked event to ViewCubeCameraController - the event is triggered when a user clicks on the plane.
- Added static Ab3d.Utilities.TransformationsHelper.GetVisual3DTotalTransform method that returns the total transformation from one Visual3D or Viewport3D to another Visual3D object.
- Added PositionsTransform3D property to Utilities.LineSelectorData to support transforming the positions in the lines.
- Added a static StandardPlaneMeshGeometry3D property to Ab3d.Meshes.PlaneMesh3D.
- Improved performance of PlaneVisual3D and TextBlockVisual3D. Now they use a standard MeshGeometry3D (Ab3d.Meshes.PlaneMesh3D.StandardPlaneMeshGeometry3D) and then apply MatrixTransform3D to position, scale and orient the plane. This greatly improves initialization time and time after properties are changed (it also does not create any new objects). It is possible to disable this and update MeshGeometry3D on each change (as with the previous version) with setting the new UseMatrixTransform3D property to false.
- Added BitmapCacheOption property to ReaderObj to control how bitmaps are created when they are used as textures in models created from obj files.
- Added NormalizeAngleTo360, NormalizeAngleTo180, IsClockwiseRotation and GetClosestPathStartAngle methods to CameraUtils. The first two methods can be used to normalize the angle values to a range between 0 and 360 (or between -180 to 180). The second two methods can be used to get the shortest path from one angle to another.
- Added useShortestPath optional parameter to the RotateTo method on SphericalCamera (base class for TargetPositionCamera) to specify if the shortest path from one angle to another is used.
- Added static UpdateTransformationMatrix3D method that can set a Matrix3D so that the matrix will transform a 3D plane MeshGeometry3D (Ab3d.Meshes.PlaneMesh3D.StandardPlaneMeshGeometry3D) according to the specified parameters.
- Added Ab3d.Models.Text3DFactory.CreateText3DLinePositions that can be used to get positions that define 3D lines from the specified text.
- Added HorizontalStretchFactor property to LineArcVisual3D - this allows creating line arc from an ellipse instead of only from a circle.
- Added IsXAxisInverted to MouseCameraController to invert horizontal camera movement.
- Improved rotations of camera when user clicks on ViewCubeCameraController side.
- Updated BezierCurve to allow using only 4 control points (before 6 control points were required).
- Renamed PeviewCameraChangedEvent to PreviewCameraChangedEvent in BaseCamera object.
- Added Project3DPointToPlane and Project3DPointsToPlane methods to the Plane class.
- Added GetCorners extension method to Rect3D class.
- Added additional optional parameter to RenderToBitmap to specify a RenderTargetBitmap that can be used again as a render target. When multiple bitmaps are rendered and saved to disk or some other media, reusing the RenderTargetBitmap can greatly improve memory usage.
- Added overload to ChangeMaterial method (in Ab3d.Utilities.ModelUtils) that also takes ModelVisual3D as a parameter (and not only Model3DGroup).
- Fixed using camera light when camera objects are created on multiple threads.
- Fixed using LineSelectorData (selecting 3D lines that are closest to the mouse position) with MultiPolyLineVisual3D.
- Fixed calculating LastLinePositionIndex in Utilities.LineSelectorData when LineSelectorData is initialized with a MultiPolyLineVisual3D.
- Fixed problems with ModelMoverVisual3D and ModelRotatorVisual3D when they are created in code and have initially some axes disabled.
- Fixed showing TextBlockVisual3D when IsVisual property is set to false before TextBlockVisual3D is shown for the first time.
- Fixed rendering line arrows that are too small. This could happen in the previous version when most of the line is off the screen (usually when user zooms in to the arrow).
- Prevented a small memory leak in LinesUpdater that could appear under some circumstances.
- Fixed using InvertHeadingRotationDirection property in the XInputCameraController (used to control the camera with XBox or similar game controller).
- Fixed camera panning with MouseCameraController when the MoveOnlyHorizontally property is set to true and camera's Attitude is between 90 and 270 degrees.
- Updated Camera.RenderToBitmap method when a 3D scene is rendered with DXEngine - in this case the new Camera.RenderToBitmap method calls DXView.RenderToBitmap method to get the actually visible scene.
- Improved Camera.FitIntoView method when a 3D scene is rendered with DXEngine and contains 3D objects defined by SceneNodes that are not created from WPF 3D objects (for example MeshObjectNode).
- Added support to rotate the camera around mouse position (when MouseCameraController.RotateAroundMousePosition property is set to true) when a 3D scene is rendered with DXEngine and contains 3D objects defined by SceneNodes that are not created from WPF 3D objects (for example MeshObjectNode). This functionality can be disabled with setting UseDXEngineHitTesting to false.
- Improved MouseCameraController to stop camera rotation when a user starts manual camera rotation - the problem in the previous version occurred only when MouseCameraController was used in Ab3d.DXEngine in WinForms application without ElementHost (not in WPF application)
- Added IsVisibleChanged event to BaseVisual3D (event handler can optimize processing of IsVisible changes and prevent clearing and setting Content property - this is used in DXEngine v3.0).
- Improved support for rendering 3D lines with Visual3D objects from Ab3d.PowerToys when they are rendered with Ab3d.DXEngine and without DXViewportView (using DXScene directly).
- Using a new version of the native Assimp importer. Using new version brings improved support for reading fbx files, adds support for many new file formats and adds a few new export file formats (including 3ds, gltf and fbx) - see https://github.com/assimp/assimp.
- To support new export file formats the parameter that specifies the export file format in the AssimpWpfExporter.Export method has changed from an enum to string (FormatId) - see code comments in the AssimpWpfExporterSample.xaml.cs file for a list of possible file formats.
The new version of the native assimp library is compiled with Visual C++ Redistributable for Visual Studio 2015 and not with Visual Studio 2012 as the previous version. This means that the library requirements and distribution model for using the new version of the library is changed.
See the comments in the AssimpLoader.cs file that comes with the Ab3d.PowerToys samples or instructions in "Ab3d.PowerToys.Assimp.chm" help file.
- Added MiterLimit property to PolyLineVisual3D, MultiPolyLineVisual3D, RectangleVisual3D and LineArcVisual3D (all lines derived from BasePolyLineVisual3D). The MiterLimit value specifies when the mitered line joint is changed into beveled line joint.
- Added support to read 3D lines from obj files with ReaderObj. Before lines can be read, the ReaderObj.ParentModelVisual3D property must be set. Lines color is get from material's diffuse color (or ReaderObj.DefaultMaterial). Line thickness is always set to 1.
- Improved XInputCameraController when to continuously move up or down when the DPad buttons are pressed and when MoveVerticallyWithDPadButtons is true (before user needed to release the button and press again).
- Added support for ModelUIElement3D objects when calling ModelUtils.GetBounds and ModelIterator.IterateGeometryModel3DObjects methods.
- Added CurrentFrameNumber property to AnimationController.
- Changed type used for FrameNumber in animation classes from int to double.
- Fixed Ab3d.Utilities.Dumper.GetMatrix3DText to correctly use the specified indentText and newlineText.
- Added static FormatMatricesHorizontally method to Ab3d.Utilities.Dumper class.
- Fixed Camera.GetMousePositionOnPlane method when using OrthographicCamera and when camera's Offset is not zero (Offset is changed when camera is moved).
- Added a new constructor to Ab3d.Utilities.Plane class that takes a position on a plane and plane's normal.
- Added GetClosestPointOnPlane method to Ab3d.Utilities.Plane class.
- Added GetPerspectiveScreenSize, GetOrthographicScreenSize, GetPerspectiveWorldSize and GetOrthographicWorldSize to Ab3d.Utilities.CameraUtils.
- Added GetWorldSize and GetScreenSize to BaseCamera.
- Added static bool ImmediatelyLoadTextureFiles field to MaterialTypeConverter to control how the BitmapImages are created (can prevent locking the read file because file is in use). See comments for the field for more info.
- Line3DFactory.CreatePolyLine3D method was renamed into Line3DFactory.CreateMultiPolyLine3D for those overrides that takes a List of Point3DCollection objects.
- Added protected OnMouseMove, OnMouseButtonUp, OnMouseButtonDown and OnMouseWheel to MouseCameraController. This make it possible to use MouseCameraController in WinForms application (with SharpDX.RenderForm).
- Improved performance of calling AlignWithCamera on TextBlockVisual3D
- Changed Ab3d.Utilities.Plane class to use a more standard plane equation a*x + b*y + c*z + d = 0 instead of a*x + b*y + c*z = d. If you are creating Plane object with a, b, c and d parameters, then you will need to flip the sign of the d parameter.
- Added support to read bones and skeleton information from files read with assimp importer.
- Added support to play keyframe and skeletal animation (use Ab3d.Assimp.AssimpAnimationController that is defined in Assimp folder in main Ab3d.PowerToys samples project).
- Set name of the created WPF materials from names defined in the file. The material's name can be read with material.GetName extension method (defined in Ab3d namespace).
- Added GetAssimpMeshForGeometryModel3D, GetWpfMaterialForAssimpMaterial and GetAssimpMaterialForWpfMaterial to AssimpWpfConverter.
Cameras and camera controllers:
- Added RotationCenterPosition property to TargetPositionCamera and FreeCamera - the property can be used to specify custom rotation position.
- Added RotateAroundMousePosition to MouseCameraController to rotate around the 3D position behind the current mouse / touch position.
- Added ZoomMode property to MouseCameraController - allows zooming to mouse position and zooming to Camera's RotationCenterPosition.
- Added MouseWheelDistanceChangeFactor property to MouseCameraController - allows specifying the speed of zooming with mouse wheel
- Added showing camera rotation center marker to show the position around which the camera is rotated. Added ShowRotationCenterMarker and RotationCenterAdorner to MouseCameraController. Added CameraTargetPositionAdorner class - defines the default ShowRotationCenterMarker.
- Added RotationUpAxis to FreeCamera - this allows specifying a custom rotation up axis (to create similar behavior as with TargetPositionCamera or to be used when Z axis is up axis)
- Added MoveForward, MoveBackward, MoveRight, MoveLeft, MoveUp and MoveDown methods to FreeCamera.
- Added GetCameraPlaneOrientation method to BaseCamera class.
Added new Ab3d.PowerToys.Input project to add support for 3D mouse (from 3DConnexion) or game controller:
- Added XInputCameraController that enables rotating, moving and zooming the camera with XBOX or similar game controller.
- Added Mouse3DConnector class that can be used to connect 3D mouse and control a camera with it.
Animation (added support for keyframe camera and object animations):
- Added many classes to handle animation to the Ab3d.Animation namespace.
- Added RotateTo and RotateFor methods to all cameras that are derived from SphericalCamera (have Heading and Attitude properties)
- Added new overloads to FirstPersonCamera.TurnTo methods that also take animationDurationMs and easingFunction to allow animating the camera when turning around
- Added new RotateCamera method with rotateX, rotateY and rotateZ parameters to FreeCamera
Helper and utility improvements:
- Added PositionAndScaleModel3D, CenterAndScaleModel3D, CenterModel3D, ScaleModel3D and GetModelTranslationVector3D methods to ModelUtils - this greatly simplifies positioning and scaling the 3D models - for example after loading the 3D model from a file
- Added Plane class that defines many methods to calculate distances between positions, rays and plane and other useful values.
- Added Slice.... methods to Plane class to slice existing 3D models with the plane
- Added Ab3d.Utilities.MeshBooleanOperations class that defines Subtract, Intersect and Union methods that allow Boolean operations on MeshGeometry3D objects
- Added Ab3d.Utilities.MeshUtils.GeneratePlanarTextureCoordinates to generate texture coordinates based on a planar projection on the 3D object.
- Added LineSelectorData that can be used to select 3D lines when mouse is close to the line
- Added AlignWithCamera to PlaneVisual3D, TextBlockVisual3D, TextVisual3D and CenteredTextVisual3D
- Added extension methods to convert Point3D to Vector3D and vice versa.
- Added GetCenterPosition extension method on Rect3D
- Added DumpHierarchy extension method to display objects hierarchy for Viewport3D, Visual3D or Model3DGroup
- Added ChangeBackMaterial method to Ab3d.Utilities.ModelUtils
- Added AddTransformation and CombineTransform3D method to Ab3d.Utilities.TransformationsHelper - used to easily add Transform3D to Model3D or Visual3D with preserving the existing Transform.
- Added FlipNormals method to Ab3d.Utilities.MeshUtils and to Ab3d.Utilities.ModelUtils (the first one flips normals on MeshGeometry3D, the second on Model3D)
- Added FlipTriangles to MeshUtils - updates the TriangleIndices collection with swapping second and third index in each triangle. This changes the orientation in which the triangles are defined.
- Added new overload of ModelUtils.GetBounds method that also takes Model3D as root Model3D (instead of Visual3DCollection).
- Added CalculateBoundingBoxFromPositions property to ModelDecoratorVisual3D - when set to true, the bounding box will more exactly fit the rotated Model3D.
- Added Project3DPositionTo2D static method to Ab3d.Utilities.Triangulator - the method can be used to convert a 3D polygon into a 2D polygon that can be used by the Triangulator - this way a 3D polygon can be triangulated.
- Added AddTransparentModels method to TransparencySorter to explicitly specify which Model3D or Visual3D object should be considered as transparent (useful for models with transparent bitmap images).
- Improved TransparencySorter to work better with plane 3D objects
- Improved TransparencySorter to consider objects with materials that use ImageBrush or VisualBrush are re-arranged so they are rendered before objects with non-transparent SolidColorObject materials (set by new ConsiderNonSolidColoredBrushesAsTransparent field)
- Added texture coordinates generation to TubePathMesh3D and TubePathVisual3D
Other improvements and fixes:
- Added TextBlockVisual3D to easily show text with border on a 3D plane.
- Improved reading obj files from relative paths
- Fixed camera movement when FieldOfView is bigger than 90 degrees
- Fixed calculating projection matrix in GetCameraMatrices method for orthographic camera in some cases.
- Fixed calculating mouse ray and mouse position on a plane for orthographic camera - fixed CreateMouseRay3D and GetMousePositionOnPlane. The static CreateMouseRay3D method is now obsolete - use static CreatePerspectiveMouseRay3D or CreateOrthographicMouseRay3D
- Prevented memory leak from MouseCameraControllerInfo control - the dependency property changed notification was not correctly disposed.
- Improved MouseCameraController so that when the EventsSourceElement and the TargetCamera are set, the MouseCameraController does not need to be added to visual tree any more.
- Fixed ModelMoverVisual3D and ModelRotatorVisual3D to work correctly with OrthographicCamera
- Fixed setting LineColor in code behind for WireGrid with IsClosed set to true (in some cases the color was not changed).
- Fixed "Object does not match target type" exception in Visual Studio XAML designer that was sometimes thrown when 3D lines are rendered inside DXEngine.
- Improved RenderToBitmap method to render the scene as it looks in the Viewport3D even if the camera is farther away and a lot of empty space is around shown 3D objects (before the 3D objects were "zoomed in" so that they were shown in the whole image)
- Improved LinesUpdater to prevent stopping updating 3D lines if the parent Viewport3D is removed from visual tree and after some time added back
- Fixed memory leak in LinesUpdater (updates 3D lines) that could sometimes appear when parent Viewport3D is removed from visual tree and the 3D lines were still shown.
- Improved collecting Viewport3D by Garbage Collector when rendering 3D lines
- Fixed problems with rendering TextVisual3D in DXEngine when the RenderConnectedLinesAsDisconnected is set to true
- Fixed using size.Z and centerPosition.Y in HeightMapMesh3D
- Fixed changing camera rotation direction with MouseCameraController in some cases
- Fixed using FitIntoView when camera's Offset is not zero.
- Fixed updating text color when TextColor in CenteredTextVisual3D is set as the last property.
- Changed default value of BaseCamera.IsDesignTimeInfoIconShown property to false so that the camera icon is not visibility any more in design time (by default)
- Improved TubeVisual3D and TubeMesh3D to produce cylinder object in case inner radius is zero.
- Fixed MouseCameraControllerInfo.AddCustomInfoLine method for cases when insertRowIndex is bigger than 0.
- Improved using ModelRotatorVisual3D and ModelMoverVisual3D inside DXEngine when CustomEventsSourceElement on EventManager3D is set after calling the SubscribeWithEventManager3D method.
- Improved rendering WireframeVisual3D inside DXEngine when hardware accelerated 3D lines are disabled in DXEngine.
- Improved Triangulator to triangulate polygon that thrown "Improperly formed polygon" exception in the previous version.
- Added CircleWidth and CircleSegmentsCount properties to ModelRotatorVisual3D to allow additional customizations of the circle 3D model.
- Improved AxisWireBoxVisual3D to allow having size with one size parameter set to 0 - for example (100, 0, 100).
- Added TransformMeshGeometry3D to MeshUtils class.
- Added MoveAmount property to CameraControlPanel to define a custom movement amount when user clicks on left, right, up or down button.
- Added CreateCustomCircleModelCallback to ModelRotatorVisual3D to create custom circle 3D model for ModelRotatorVisual3D
- Changed some utility methods that took Visual3DCollection as parameter to take IList<Visual3D> instead (this allows using Visual3DCollection and also custom lists of Visual3D objects). Updated methods: BaseTargetPositionCamera.FitIntoView, BaseTargetPositionCamera.GetFitIntoViewDistanceOrCameraWidth, ModelIterator.IterateGeometryModel3DObjects, ModelIterator.IterateModelVisualsObjects, ModelUtils.GetBounds
- Improved the objects hierarchy of the 3D lines classes: Most of the line classes are now derived from BaseMultiLineVisual3D that now also have Positions and IsLineStrip properties. The BaseLineCapVisual3D class is removed and an ILineCapVisual3D interface is used for classes that defined StartLineCap and EndLineCap properties.
- Added support for storing edge lines information on MeshGeometry3D objects: added extension methods to MeshGeometry3D: GetPolygonIndices, SetPolygonIndices and GetPolygonPositions (those methods are calling static methods in Ab3d.Utilities.MeshUtils class).
- Added ShowPolygonLines property to ViewframeVisual3D to show polygon lines instead of triangles when wireframe is shown.
- Added CreatePolygonIndices property to all classes in Ab3d.Meshes namespace - those classes can generate MeshGeometry3D objects for various objects - for example BoxMesh3D, SphereMesh3D, etc.
- Added static CreatePolygonIndicesByDefault to Ab3d.Utilities.MeshUtils to define the value of CreatePolygonIndices for all classes in Ab3d.Meshes namespace
- Added support to read polygon indices to ReaderObj in Ab3d.PowerToys library. To enable reading polygon indices set the new ReaderObj.ReadPolygonIndices property to true.
- Using new version of native assimp library
- Improved loading textures when texture path stored in the model file is not correct and the texturesFilePath is set
- Added ReadPolygonIndices property to AssimpWpfImporter and to AssimpWpfConverter - this will set the polygon indices from the read object (in case it is created from polygons)
- Added triangulation to AssimpWpfConverter that can triangulate polygons when they were not triangulated by native assimp importer (when triangulation is turned off or when ReadPolygonIndices is set to true).
- Prevented locking texture files by the application. Added BitmapCacheOption to AssimpWpfConverter with default option set to OnLoad (before Default was used).
- Added ExportFullTexturePaths and ExportedTexturePath properties to AssimpWpfExporter. This can be used to specify how the textures paths are exported. Before full file path was exported. Now only file name is exported by default.
- Prevented adding empty Model3DGroup object to read objects.
- Called SetName on all read 3D objects that have name set in the file (this way the name can be easily read with GetName extension method)
- Added and updated many samples (see UP icon for the updated samples)
- Added AssimpWpfExporter to Ab3d.PowerToys.Assimp - this allows exporting WPF 3D models to Collada (.dae), obj, ply and stl files.
- Added support for texture coordinates generation in extruded mesh - use new ExtrudeTextureCoordinatesGenerationType.
- Added ConeTubeVisual3D - it can be used to create Visual3D that represents a 3D Tube with different top and bottom radius.
- Added a new constructor to TubeMesh3D that takes different inner and outer radius of top and bottom of the tube.
- Added IsXAxisShown, IsYAxisShown and IsZAxisShown properties to ModelMoverVisual3D to allow showing only specifed arrows.
- Added MeshUtils.GenerateCylindricalTextureCoordinates method that generates TextureCoordinates based on the Cylindrical projection.
- Added MeshUtils.Project3DPointsTo2DPlane to project 3D positions to a 2D plane.
- Improved EventManager3D to call MouseLeave, MouseEnter and other events when the camera is changed by MouseWheel.
- Added UpdateHitObjects method to EventManager3D - it can be used to manually update the current 3D object behind the mouse position - this is useful when camera is changed without changing the mouse position.
- Improved FreezeMeshGeometry3D property on BoxVisual3D and SphereVisual3D so that they do not to be set before all other properties.
- Added ModelUtils.HasAnyLight method that checks the Viewport3D, Visual3D or Model and returns true if any light is defined (it is possible to exclude AmbientLight).
- Changed default AssimpWpfImporter.AssimpPostProcessSteps from PostProcessSteps.FlipUVs | PostProcessSteps.GenerateSmoothNormals | PostProcessSteps.Triangulate to PostProcessSteps.Triangulate.
- Improved automatically setting shapeYVector in an overload of CreateExtrudedMeshGeometry that does not have the shapeYVector parameter.
- Fixed problems with ModelMoverVisual3D when it is shown inside DXEngine and AxisLength, AxisRadius or AxisArrowRadius are changed after the ModelMoverVisual3D is already shown.
- Fixed recreating 3D lines in cases when the parent ModelVisual3D is removed from Viewport3D, then the camera is changed and the parent ModelVisual3D is added to the scene again.
- Added ViewCubeCameraController.
- Added TubePathVisual3D and TubePathMesh3D.
- Added support to create extruded MeshGeometry3D that has custom orientation (not only in the direction of Y axis). This can be achieved with using a new override of CreateExtrudedMeshGeometry that also takes shapeYVector parameter.
- Added IsStartPositionClosed and IsEndPositionClosed properties to TubeLineVisual3D. Also added additional isStartPositionClosed and isEndPositionClosed constructor parameters to the TubeLineMesh3D.
- Added FreezeMeshGeometry3D to BoxVisual3D and SphereVisual3D to control if the MeshGeometry3D is frozen.
- Improved TubeVisual3D that now allows setting Height to 0 - this creates an optimized TubeVisual3D without creating both bottom and top ring - in this case only bottom ring is created.
- Fixed using adjustmentFactor in FitIntoView method.
- Fixed using FitIntoView when it is called in Loaded method and the Viewport3D is shown in Ab3d.DXEngine.
- Fixed type used by ShowMovablePlanes property.
- Improved MouseCameraController to capture the mouse only when the mouse rotation / movement is bigger than a few pixels. This prevents "swallowing" MouseUp event for processing mouse click in EventManager3D.
- Added UsePreviewEvents property to EventManager3D – when set to true the EventManager3D subscribes to Preview mouse and touch events instead of standard events - for example PreviewMouseUp event instead of MouseUp event. This can be used to use left mouse button for camera rotation and also for click events.
- Added TurnTo method to FirstPersonCamera - this turns the camera towards the specified position or to the specified direction vector.
- CameraControlPanel now moves the FirstPersonCamera forward or backwards when ZoomIn or ZoomOut buttons are clicked.
- When MouseCameraController is used for FirstPersonCamera the mouse wheel now moves camera forward and backwards.
- Added ModelRotatorVisual3D that allows user to rotate selected Model3D around any axes.
- Added SubscribeWithEventManager3D method to ModelMoverVisual3D and ModelRotatorVisual3D to allow them to use EventManager3D for processing mouse events. This allows using the ModelMoverVisual3D and ModelRotatorVisual3D in Ab3d.DXEngine.
- Greatly reduced the initialization time when creating many instances of SphereVisual3D or BoxVisual3D objects.
- Added ModelIterator class and two extension methods (ForEachVisual3D and ForEachGeometryModel3D) to simplify working with hierarchacly organized 3D models.
- Added FitIntoView and GetFitIntoViewDistanceOrCameraWidth methods to TargetPositionCamera, SceneCamera, TargetRect3DCamera and ThirdPersonCamera. The method has greatly improved algorithm then it was available in the "Scene Editor" sample in the previous versions of Ab3d.PowerToys.
- Fixed showing transparent 3D lines when LineColor's alpha value is less than 255.
- Improved support for TextureCoordinates in ModelOptimizer.
- Added WidthDirection and HeightDirection to WireGridVisual3D that allows to set custom direction of the WireGrid (not only horizontal or horizontal in another coordinate system).
- Added CreateWireGrid to Line3DFactory that allows creating WireGrid object with custom widthDirection and heightDirection vectors.
- Added GetTargetViewport3DSceneBounds method to all Camera classes in Ab3d.PowerToys – the method calculates the scene bounding box.
- Change validation of Size property on BoxVisual3D, WireBoxVisual3D, MultiMaterialBoxVisual3D and PyramidVisual3D to allow having one component of size zero.
- Fixed calculating scene size in SceneCamera when the scene hierarchy is complex.
- Added GetBounds and CombineTransform methods to Ab3d.Utilities.ModelUtils.
- Added CompositionRenderingHelper to help work with CompositionTarget.Rendering (allowing subscribed objects to be recycled by Garbage Collection and therefore preventing infinite rendering subscription in case when the Rendering is not unsubscribed).
- Improved ModelMoverVisual3D so that it can also use EventManager3D for mouse event processing - this allows using ModelMoverVisual3D inside Ab3d.DXEngine.
- Prevented throwing "Object reference" exception in ModelOptimiter that could occur sometimes when ImageBrush is used.
- Added HeightDirection to TubeVisual3D and TubeMesh3D – this allows orienting the object in any direction and not only in up (0, 1, 0) direction.
- Fixed throwing exception when Is3DAxesShown is initially set to false on CameraAxisPanel.
- Added "Custom Up Axis" sample that shows how to show data in another coordinate system - for example where Z is up.
- Added "Perspective Transformation" sample that shows how to convert 3D positions to the 2D positions on the screen.
- BREAKING CHANGE: Moved the ModelMovedEventArgs class from Ab3d.PowerToys.Common to Ab3d.Common namespace.
- Fixed showing 3D lines that were created with IsVisible property set to false. When later the IsVisible is set to true, sometimes the 3D lines were not shown.
- Fixed rendering 3D lines with arrows that were not rendered correctly under some circumstances.
- Fixed reporting MouseLeave event that was sometimes not triggered when CustomEventsSourceElement was used.
- Fixed changing BoxVisual3D and SphereVisual3D objects after Position is changed under some circumstances.
- Added GetCameraMatrixes to BaseCamera that can calculate view and projection camera even if TargetViewport3D is not assigned to the camera.
- Prevented throwing null reference exception in Dumper.Dump method when TextureCoordinates or Normals collection was null.
- Prevented throwing null reference exception that could sometimes occur in MouseCameraControllerInfo when in XAML designer.
- AssimpWpfImporter now implements IDisposable and have new Dispose method to easily dispose all managed and unmanaged resources.
- Improved reading transformations - in case the transformation matrix is identity, the Transform property is set to null; in case the matrix is a simple translation, a TranslateTransform3D is created; in case of simple scale a ScaleTransform3D is created; otherwise a MatrixTransform3D is created.
- Improved reading 3D models that are stored in left coordinate system.
- Added ForceConvertToRightHandedCoordinateSystem property to AssimpWpfImporter and AssimpWpfConverter.
- Fixed problems with EventManager3D when events on wrong ModelEventSource3D object were triggered. This could happen when multiple GeometryModel3D objects were using the same MeshGeometry3D.
- Improved performance of EventManager3D.
- Improved design time behavior for MouseCameraControllerInfo with preventing calling BeginInit method when it was already called by WPF initializer (prevents thorwing exception in design time).
- Added IsEmissiveSolidModelColor to WireframeVisual3D - when set to false it uses standard shaded color instead of single color produced by EmissiveMaterial.
- Added modelSelectorFunc parameter to CreateWireframe method - it can be used to select which models are converted to wireframe.
- Added new constructor to ModelMoverVisual3D that takes xAxisVector3D, yAxisVector3D and zAxisVector3D. This allows using custom axes for ModelMoverVisual3D.
- Improved ModelDecoratorVisual3D when TargetModel3D is not defined in RootModelVisual3D.Content but in a ModelVisual3D that is defined in RootModelVisual3D.Children.
Changes related to Ab3d.DXEngine:
- Added FreeCamera - a new camera type that can be used to freely rotate the camera around without locking the rotation around y axis.
- Fixed reading materials with ReaderObj - before a black EmissiveMaterial was added to each material.
- Moved CameraLight and ShowCameraLight properties and StartRotate, EndRotate and all related methods from SphericalCamera to BaseCamera (this allows its usage on FreeCamera).
- Added AutomaticallyUpdateWhenOriginalModelIsChanged to WireframeVisual3D
- Improved WireframeVisual3D to not generate the wireframe geometry until it is added to the parent Visual3D / Viewport3D. This can prevent multiple wireframe geometry generation in the initialization phase. Also improved xml comment (for help) and sample regarding that.
- Improved changing ShowCameraLight property at design time (before light was not always changed when the ShowCameraLight property was changed).
- Improved using ShowCameraLight's Auto property - before when this property was set to Auto, the camera light was not shown if the scene contained AmbientLight; now camera light is added in this case (it is not added only when DirectionalLight, PointLight or SpotLight are defined).
- Improved automatic finding of Viewport3D in BaseCamera faster and more reliable (when TargetViewport3D is not set).
- Updated BaseCamera to correctly find the Viewport3D if used inside DXEngine and if TargetViewport3D or TargetViewport3DName are not set.
- Fixed updating line color when the line color is changed after the line is already shown (when rendered with hardware accelerated in Ab3d.DXEngine).
- Improved EventsManager3D when EventsManager3D.CustomEventsSourceElement is not set - now the default event source is DXViewportView instead of Viewport3D.
- Improved MouseCameraController - it is not needed any more to set the EventsSourceElement to DXViewportView; now if EventsSourceElement is not set, it will be automatically set to DXViewportView.
- Improved sending lines data to Ab3d.DXEngine (so that the lines can be created in geometry shader).
- Added LightingRigVisual3D that adds 3 DirectionalLights and one AmbientLight to the scene. The lights define the so called standard lighting rig with key, fill and back light.
- Added TubeLinesVisual3D and TubeLinesMesh3D that can be used to create 3D lines from 3D tube objects. Those lines does not require LinesUpdater to update their geometry when camera is changed and can therefore greatly improve performance when the application is running (but require a little bit more time to initialize)
- Added ModelMoverVisual3D that can be used to help users move 3D objects. The ModelMoverVisual3D shows 3 arrows for all three axes and allow users to move object along the axis. It can also show 3 rectangles that allow users to move the object on the plane defined by the rectangle.
- Added support for touch events and touch manipulation events to EventManager3D (TouchEnter, TouchDown, TouchMove, TouchUp, TouchLeave; ManipulationStarted, ManipulationDelta and ManipulationCompleted) (only in .Net 4 version of the library)
- Added MultiPolyLineVisual3D to show multiple polylines with one Visual3D – this improves performance because LinesUpdated needs to check less objects.
- Added Ab3d.Utilities.RenderToBitmap method to render any FrameworkElement to bitmap (with support for custom size, antialasing and custom dpi setting).
- Added RenderToBitmap to BaseCamera to render current Viewport3D to bitmap.
- Added support for creating 3D trapezoid objects with TrapezoidVisual3D, TrapezoidUIElement3D and Ab3d.Meshes.TrapezoidMesh3D classes and with new Ab3d.Models.Model3DFactory.CreateTrapezoid and Ab3d.Meshes.TrapezoidMesh3D method
- Added MouseCameraControllerInfo control that shows which mouse button and keyboard is required to rotate and move the camera. Also added MouseWithButtons, KeyboardKey user controls.
- Added Ab3d.Utilities.Dump methods that can dump 3D model information into Visual Studio Immediate Window – useful for getting information about 3D objects during debugging.
- Added MoveOnlyHorizontally property to MouseCameraController to restrict the camera movements to horizontal plane.
- Added IsRotationDirectionAdjusted property to MouseCameraController. It can be used to enable adjusting camera rotation direction based on current mouse position and current attitude value.
- Added CameraRotateStared, CameraRotateEnded, CameraMoveStared, CameraMoveEnded events to MouseCameraController
- Fixed calculating camera bank angle when using Ab3d.Utilities.CameraUtils.CalculateCameraAngles method.
- Added static GetCameraMatrixes method to BaseCamera that takes Viewport3D and returns camera matrixes. Also the GetCameraMatrixes now returns Boolean instead of void - it returns false if camera matrixes cannot be calculated.
- Fixed showing camera light after the previous Light visual was manually removed from Viewport3D.Children
- Improved CameraLight property in Ab3d.Cameras objects. The property is used to get or set a custom light for camera’s light. In previous version under some circumstances the property's value was not set to the actual Light object that is used to illuminate the scene.
- Added GetMousePositionOnPlane method to all cameras from Ab3d.PowerToys library
- Added GetNormalizedHeading, GetNormalizedAttitude, GetNormalizedBank methods that return Heading, Attitude and Bank angles that between 0 and 360.
- Fixed updating 3D lines for WireGridVisual3D when its IsClosed property was set to true.
- Improved LinesUpdater with adding a RegisteredLinesCount property to get number of registered lines. Also added UnregisterLine method that takes any 3D line visual from Ab3d.PowerToys.
- Improved performance of LinesUpdater.
- Removed memory leak from LinesUpdater - some lines that were disconnected from parent Visual3D were not disposed and were checked on each frame.
- Improved LinesUpdater so that it did not regenerate some geometry models when the camera (or some other property) is not changed.
- Improved rendering lines when Othographics camera is used and the lines have the same direction as the camera.
- Fixed hiding 3D lines when IsVisible is set to false and the line is child of another ModelVisual3D
- Improved rendering Arrow3D - before the arrow tip was rendered with a single position and that made the arrow shading too dark.
- Changed default value for Length property on AxisVisual3D and ColorAxisVisual from 1 to 100.
- Fixed changing DefaultMaterial on ObjModelVisual3D after the obj file has been already read. In previous version all materials were replaced by new DefaultMaterial even if obj file defined their own material and DefaultMaterial was not used.
- Added DefaultBackMaterial to ObjModelVisual3D to specify the back material of the read models.
- Added RayPlaneIntersection method to Ab3d.Utilities.MathUtils to calculate intersection of 3D ray and a plane.
- Added ReplaceMaterial to Ab3d.Utilities.ModelUtils to replace one material with another material in a Model3D
- Prevented freezing objects with ModelOptimizer when FreezeAll is not set to true.
- Prevented throwing exception when MeshGeometry3D have TriangleIndices set to null in CollectModelCounters, GetDumpString and GetMeshInitializationCode methods.
- Improved performance of ModelOptimizer and MeshUtils.CalculateNormals
- Added new overloads to TransparencySorter constructor, SimpleSort and SortByCameraDistance methods that also take ContainerUIElement3D as parameter.
- Improved ModelDecoratorVisual3D when showing normal vectors on an objects that has been scaled by transformation
- Fixed CreateFromCurvePositions method in BezierCurve - the method has thrown an exception when there were less than 6 curve points (instead of less than 2).
- Changed return type of the HeightMapMesh3D.GetGradientColorsArray method - now the method returns array of Color value instead of array of uint values. If you still want to get array of uint values, call the new GetGradientColorsUIntArray method.
- Added free Abd3.PowerToys.Assimp library that can be used with Assimp importer library to read 3D models from almost any 3D file.
- Added Ab3d.Utilities.ModelOptimizer class that can greatly optimize 3D models so they are rendered faster.
- Added ObjModelVisual3D to simplify loading 3D models from obj files in XAML and to control position and size of read model.
- Added ReadModel3D method to ReaderObj - with this method you can get the Model3DGroup or GeomentryModel3D from obj file directly (before you first needed to read obj file into ObjFileData and than converted that to Model3DGroup or GeomentryModel3D).
- Improved ReaderObj - improved reading textures for some obj files and prevented "An item with the same key has already been added to dictionary" error.
- Improved ReaderObj ability to read pack URI schemas - for example "pack://application:,,,/Ab3d.PowerToys.Samples;component/Resources/ObjFiles/robotarm.obj".
- Changed default value for ObjFileToWpfModel3DConverter.InvertYTextureCoordinate from false to true. This correctly loads the textures in most of the cases.
- Renamed ObjFileToWpfModel3DConverter.ObjectNames dictionary to NamedObjects (to make the name the same as in Ab3d.Reader3ds library).
- Improved CameraAxisPanel so it can now also show 3D arrows (this is not default style).
- Changed CameraAxisPanel to use 2D shapes instead of 3D lines (this improves performance and removes depandency on LinesUpdater).
- Fixed occasional problems with 3D lines when transformation on the line's MeshGeometry3D is changed after the line is created.
- Fixed problems with rendering 3D lines when the lines are removed from parent Viewport3D or Visual3D and after a while they are added to the Viewport3D or Visual3D again (before LinesUpdates did not update the lines any more).
- Added RegisterViewport3D and UnregisterViewport3D methods to LinesUpdater to fix problems with not updating 3D lines when the Viewport3D is dynamically added and removed from parent controls.
- Added new method overloads for WireframeFactory.CreateNormals and Line3DFactory.CreateMultiLine3D that allows to pass a Transform3D that transforms all positions.
- Improved FpsMeter control - prevented counting multiple frames for one actual rendered frame.
- Added SetName and GetName extension methods on Model3D, MeshGeometry3D, Visual3D and Material. They can be used to set or get name the WPF 3D objects.
- Added CollectModelCounters method to Ab3d.Utilities.Dumper that returns the number of positions, triangle indices and other counters of the specified model3D.
- Properties to control touch and multi-touch in MouseCameraContoller are now part of the Ab3d.PowerToys .Net 3.5 build (but they still require .Net 4 version of the library to work). Before those properties were not part of the 3.5 Net build of the library.
- Added Ab3d.Utilities.TransformationsHelper.GetModelTotalTransform method that can be used to get the total transformation of one Model3D inside models hierarchy.
- Added ConvertToWpfCamera method to all Ab3d.PowerToys cameras. The method converts Ab3d.PowerToys camera to a standard WPF camera.
- Added Point3DTo2D method to all Ab3d.PowerToys cameras that does not required to create an actual Viewport3D to convert 3D coordinates to 2D space.
- Improved MaterialTypeConverter to support texture images in Visual Studio 2013 designer - now you can preview the texture image in Visual Studio designer with using: Material="/ImagesFolder/MyImage.jpg".
- Added ModelDecoratorVisual3D - a Visual3D that can be used to show bounding box, normals and triangles for the specified TargetModel3D.
- Greatly improved performance of SphereVisual3D and BoxVisual3D with using cached MeshGeometry3D (added UseCachedMeshGeometry3D property to control mesh caching). The biggest performance improvement is when the position or size of many spheres or boxes is changed.
- Fixed updating 3D lines when Viewport3D is inside TabControl or when the Viewport3D is moved from one control to another.
- Optimized LinesUpdater to minimize the number of newly created object each rendering frame.
- Added WinForms sample that shows how easy is to show 3D graphics in WinForms with embedded WPF and Ab3d.PowerToys
- Improved support for touch and multi-touch in MouseCameraController in the .Net 4 version of Ab3d.PowerToys assembly. Before the touch was supported with special MultiTouchMouseCameraController (available in source code in a separate project). Now this support is integrated into the core MouseCameraController.
- To configure the touch support the following new properties are now available on MouseCameraController: IsTouchEnabled, IsTouchRotateEnabled, IsTouchMoveEnabled, IsTouchZoomEnabled and IsConcurrentTouchZoomEnabled. To get full control on what happened when user touches the screen users can also override the following methods: GetManipulationActions, OnManipulationDelta, OnManipulationStarted, OnManipulationCompleted (see help file for more info).
- When camera is rotated by mouse and user suddenly releases the mouse or touch, the camera rotation is preserved. This is controlled by new RotationInertiaRatio and RotationEasingFunction properties on MouseCameraController.
- StartRotation and StopRotation methods on cameras that derived from SphericalCamera now have additional parameters that can be used to specify acceleration and deceleration speed and easing function.
- Changed the UpdateContent method in HeightMapVisual3D from private to public. The method updates the 3D mesh after the HeigthData is changed.
- Added WireframeVisual3D to simplify showing models with wireframe.
- Improved triangulator - before in some cases a wrongly triangulated object was returned or an "Improperly formed polygon" error was thrown.
- Added DirectedPyramidMesh3D to create a pyramid object that is oriented in a specified direction.
- Added Ab3d.Utilities.ModelUtils class that contains ChangeMaterial (change material on all child Model3D objects) and CopyModel (copy child Model3D objects) methods.
- Improved 3D Lathe creator - now it is allowed to specify only one segment when start and end positions are closed.
- Added GetPerpendicularVectors to MathUtil - calculate two vectors that are perpendicular to the input vector.
- Fixed calling PreviewCameraChanged and CameraChanged events when CameraWidth is changed in Orthographic camera.
- Fixed Point3DTo2D and Rect3DTo2D if size of Viewport3D is changed or if CameraWidth in Orthographic camera is changed.
- Added Dump extension methods that can dump (write to Debug console) various WPF 3D objects (Matrix3D, Model3D, Geometry3D, Transform3D, Material, Rect3D). This is very useful to get detaled information in Visual Studio Immediate Window - Window – for example you can write "Ab3d.Utilities.Dumper.Dump(myModel3D)".
- Added GetWorldToViewportMatrix method to BaseCamera.
- Fixed Creating wireframe with WireframeFactory when model groups have transformations.
- Cleaned the code to remove compiler warings when compiling source code.
- Added overrides to CreateWireframe with additional removedDuplicates parameter - when the parameter is true this can significanlty increase time to create wireframe model, but creates less lines because duplicate lines are removed (this was used in the previous version). Not it is possible to set removedDuplicates to false to greatly reduce the initial creation time but end up with having more 3D lines. This can be user when rendering the lines with DXEngine were rendering lines is super-fast compared to WPF 3D where it is very slow.
- Added Microsoft Kinect 3D player sample.
- Added ReaderObj and ObjFileToWpfModel3DConverter that can read 3D objects from obj files.
- Fixed performance of LinesUpdater when the camera or other property is not changed.
- Added additional override of Dumper.Dump with Model3D as paramter to write Model3D info to Visual Studio output.
- Added CalculateUpDirection to Ab3d.Utilities.CameraUtils.
- Added 3D objects:
- Added Ab3d.Utilities.Triangulator to convert a polygon that is defined by a list of 3D points into triangles that can be than used to create 3D object.
- Added Ab3d.Meshes.Mesh3DFactory to create 3D extruded objects.
- Added LatheMesh3D to Ab3d.Meshes - used to create MeshGeometry3D that represents a 3D object that is created with rotating the shape for 360 degress.
- Added ArrowMesh3D, ArrowVisual3D and ArrowUIElement3D that represent a 3D arrow object.
- Added RegisterExcludedVisual3D and RemoveExcludedVisual3D methods to EventManager3D - this exclude some 3D objects from hit testing.
- Added CustomEventsSourceElement property to EventManager3D - it can be used instead of TargetViewport3D to get the mouse events (MouseMove, MouseEnter, MouseLeave).
- Added MouseMove event to EventManager3D.
- Added FinalPointHit to all EventArgs used in EventManager3D event handlers - it gets the transformed 3D point that was hit by the mouse (if Visual3D uses Transformation, than HitPoint will be wrong, but FinalHitPoint will be transformed).
- Improved debugging with improvements in Dumper class:
- Added support to control the values format string (number of displayed decimals) when using Ab3d.Utilities.Dumper.
- Fixed Dumper.GetTransformText that returns the formatted text that describes the Transform3D object (some string.Format parameters were wrong).
- Added DumpMeshInitializationCode and GetMeshInitializationCode methods to Ab3d.Utilities.Dumper - the methods create C# text that can be used to create MeshGeometry3D.
- When no Normals or TextureCoordinates are defined the Ab3d.Utilities.Dumper will not show zero values for them.
- Other improvements and fixes:
- Added CreateMouseRay3D to BaseCamera - it can be use used to calculate the 3D ray that goes from the mouse position into the 3D scene.
- Improved Refresh method in LinesUpdater - calling this method now forces to redraw all visible lines.
- Added MaxLineArrowLength and LineArrowAngle to LinesUpdater to better control the size and shape of the arrows on 3D lines.
- Fixed LineWithTextVisual3D when it was created in code behind and the properties were set without using BeginInit and EndInit methods.
- Fixed recreating the content of 3D objects derived from Visual3D (if initially IsVisible was set to false and was then set to true the object was not shown under some circumstances).
- Added many possibilities to change the CameraAxisPanel with overriding CreateAxisVisual, SetAxisLength, SetAxisColors or EnsureAxisTextBlocks (the later also existed before)
- Improved performance of Box3D geometry mesh creation when X, Y and Z segments count is 1 (simple box with 2 triangles for one plane) - the mesh is now created 10 times faster.
- Moved initialization of RotationCursor in MouseCameaController from constructor to OnLoad event handler - this prevented calling virtual method in constructor.
- Added support for the Ab3d.DXEngine (still under construction) - objects created with Ab3d.PowerToys library will work correctly when used inside Ab3d.DXEngine (DirectX 11 rendering engine).
- Added GetCameraPosition method to BaseCamera.
- Fixed creating geometry for Visual 3D objects when no property is changed on the visual (for example if default size is used).
- Fixed showing long 3d lines that cross the near camera plane (before such lines were not correctly shown).
- Improved measuring size of CameraControlPanel - now it is possible to define only desired Width or Height and the control automatically sets the other (Height or Width).
- In MouseCameraController the StartMouseProcessing and EndMouseProcessing are now protected virtual and can be overriden (before they were private).
- Improved creation of sphere mesh - before some triangles were defined in such a way that they represented a line instead of triangle (two positions in the triangle were defined in the same position in space).
- Added possibility to create a slightly improved sphere mesh when there is no need to create texture coordinates (this can be done with spefiying generateTextureCoordinates as false in the Ab3d.Meshes.SphereMesh3D constructor).
- Added DumpMatrix3D to Dumper.
- Improved FpsMeter when custom DisplayFormatString is set.
- Fixed creating PolyLines when it is created with duplicate positions - Index out of range exception was thrown before.
- Improved support for Visual Studio 2012 designer - now cameras correctly discover Viewport3D control when TargetViewport3D is not manually set.
- Fixed a typo with renaming WireBoxVisual3 into WireBoxVisual3D (BREAKING CHANGE!).
- Improved 3D Text - now ? character is correctly displayed instead of a character that does not have its 3D shape defined.
- Fixed problem with displaying 3D Text in Visual Studio designer.
- Added HeightMapVisual3D and HeightMapMesh3D.
- Added TubeMesh3D, TubeVisual3D and TubeUIElement3D.
- Added support to very easily create 3D curves: added Ab3d.Utilities.BezierCurve and Ab3d.Utilities.BSpline classes; also added CreateBSpline3D and CreateNURBSCurve3D to Line3DFactory.
- Improved LinesUpdater performance and removed possible memory leaks.
- Added Reset method to LinesUpdater that takes Viewport3D as parameter to reset (remove all lines) from specific Viewport3D.
- Added MouseWheel event to EventManager3D.
- Fixed rotating with MouseCameraController and CameaControlPanel when the scene in vertically inverted when Attitude is between 90 and 270 degrees.
- Fixed EventManager3D where under some circumstances a new object drag can be automatically stared just after end drag event.
- Improved MaterialTypeConverter: Added support for simply defining SpecularMaterial and EmissiveMaterials. For example the "s:32;Blue" text can be used to define MaterialGroup with DiffuseMaterial and SpecularMaterial (SpecularPower = 32; SpecularBrush = White; DiffuseMaterial = Blue). The "e:Yellow" can be used to show yellow emissive material. Also improved support for defining textures path (now files from local disk and from http can be used).
- Fixed occasional NullReferenceException in SphericalCamera when layout is updated in Visual Studio designer.
- Added support for transparency sorting with new TransparencySorter
and TransparencyHelper classes.
- Simplified animating camera rotation with new StartRotation, StopRotation
methods on SphericalCamera. There is also a new IsRotating properties. The MouseCameraController
is also adjusted to suspend animated rotation while user rotates the camera with
- Added axes names to CameraAxisPanel. Also added IsAxisNameShown,
XAxisColor, YAxisColor and ZAxisColor properties to CameraAxisPanel.
- Added support for OrthographicCamera for all Ab3d.PowerToys Cameras.
Added CameraType and CameraWidth properties to BaseCamera.
- Greatly improved creating wireframe from existing 3D models - now
it is much faster and uses much less memory.
- Improved LinesUpdater - the lines that are removed from the visual tree are now
free to be cleaned by garbage collection.
- Added Reset and UnregisterLine methods to LinesUpdater to manually remove lines
from LinesUpdater. This enables better manual control of the registered lines.
- Improved measuring scene bounds in SceneCamera when transformations are used on
Visual3D objects. Before the used transformations prevented the camera to correctly
show the scene.
- Fixed selecting cameras with mouse click on camera icon in Visual Studio 2010 designer.
- Added GetCameraMatrixes to BaseCamera to get view and projection Matrix3D of the
- Improved Ab3d.Utilities.Dumper class - Added GetTransformText and GetMatrix3DText
methods and made GetMaterialText public. Also the GetModelInfoString method now
also displays the Transformation details.
- Improved commercial licensing code to prevent delay caused in RSACryptoServiceProvider
under some circumstances.
- Added Ab3d.Licensing.PowerToys.EmbeddedLicenseAssembly property to speed-up looking
for embedded license key in commercial version.
- Fixed licensing code for WPF Browser applications (partially trusted) - before licensing
did not work when both Ab3d.Reader3ds and Ab3d.PowerToys were used (defined in license.licx
- Added Offset to all cameras to move the camera around.
- Added support for moving camera with MouseCameraController and CameraControlPanel.
- Added RotateCameraConditions and MoveCameraConditions properties to MouseCameraController
to fine tune the conditions to rotate and move the camera.
- Added 3D Text support with TextVisual3D, CenteredTextVisual3D and LineWithTextVisual3D.
- Added MultiMaterialBox where each side of the box can have its own material.
- Added CreateFrom method to all Ab3d.Cameras - it can be used to create any Ab3d.Camera
from existing WPF's Camera (or camera read from 3ds file with Ab3d.Reader3ds).
- Added CameraAxisPanel - a predefined panel that shows the axis orientation for the
- Added RectangleVisual3D, WireBoxVisual3, WireCrossVisual3D, VerticalPlaneVisual3D
- Added IsVisible to all 3d models derived from Visual3D. Now all Visual3D are derived
- Added CreateWireframe method that takes Model3D to create wireframe from Model3DGroup
- Added IsClosed property to WireGridVisual3D - if true a rectangle is drawn around
wire grid to close the grid.
- Added possibility to set 3D line thickness to 0 to hide the line - the same as set
IsVisible to false.
- Added Refresh method to all UIElemet3D classes - this way it is possible to force
creation of used Model3D also if the UIElemet3D is not added to Viewport3D.
- Added EventsSourceElementName to MouseCameraController - now it is possible to specify
the custom event source also by specifying the element name.
- Added GetModelInfoString method to Ab3d.Utilities.Dumper class - it gets a string
with details about the GeometryModel3D or Model3DGroup.
- Added IsDesignTimeInfoIconShown property to Ab3d.Cameras to hide camera info icon
in design time - useful for custom controls that use Ab3d.Cameras.
- Added Ab3d.Utilities.CameraUtils with CalculateCameraAngles to get camera angles
(heading, attitude, bank) from lookDirection and upDirection.
- Added Ab3d.Utilities.MathUtils.Rotete method to rotate Vector3D or Point3D for heading
- Added Ab3d.Utilities.MathUtils with IsOne, IsZero and IsSame methods that take double
precision errors into account.
- Added Refresh method to all UIElemet3D classes - this way it is possible to force
creation of used Model3D also if the UIElemet3D is not added to Viewport3D.
- Improved the MaterialTypeConverter to support creating a DiffuseMaterial with ImageBrush
from image resource name - for example Material="/Resources/PowerToysTexture.png".
- Improved line arrows - improved displayed when camera is pointing almost in the
direction of the line.
- Improved 3D PolyLines - lines are now connected to each other.
- Fixed for using in PartiallyTrusted environment - using Hand cursor instead of custom
- Automatically Disable / Enable the MouseCameraController and CameraControlPanel
if Traget Camera's IsEnabled property is changed.
- Fixed using StartLineCap and EndLineCap on PolyLines.
- Improved DoubleClick event in EventManager3D - now the DoubleClick event does not
trigger the Click event on the second click (if the DoubleClick event is subscribed).
- Fixed normalizing normals in MeshUtils.CalculateNormals method.
- Fixed using TargetViewport3DName property on Cameras in Visual Studio Design Time
- in Design Time there is no NameScope so the FindName method does not work. To
fix this the code looks for Viewport3D manually by checking the Camera's Parents
Children. This means that the Camera must be defined under the same parent as the
Viewport3D in order that the TargetViewport3DName works in Design Time.
- Fixed using StartLineCap and EndLineCap on PolyLines.
- BREAKING CHANGE: Fixed Bank - now the positive bank values rotate the camera in
the clockwise direction (before the direction was counter-clockwise). For example
bank angle 30 means that the Camera is rotated as a head would be bended to the