Support for 64 bit development
64-bit applications are supported by x64 editions of DG Kernel products starting from the version 4.3.
Due to the fact that there is no full 64-bit version of Microsoft Visual Studio
available, 64-bit applications have limited functionality in design mode (form
editors). The limitation is that 3D view of the actual model is not
displayed in design mode (in runtime all works as expected).
When adding the control to a form, it is important to insert the control first and then switch target platform
to x64. .Net Any CPU option does not work with DG Kernel as DGK is a native control and its bitness
is determined during installation.
Most of DG Kernel interface works seamlessly in 32 and 64-bit environments. Some
of the interfaces have to be modified to be used for 64-bit development. See the
next entity. Apart from the interfaces below in the future new interfaces are
intended to be bitness-independent
Interfaces specific to 64-bit applications
The interfaces listed below are 64-bit counterparts of the correspondent 32-bit
interfaces:
Upgrading to 64-bit environment
If an existing 32 bit application has to work in both 32 and 64-bit environment
consider using constructs like (VB .NET):
#If KC_X64 Then
Dim m_iDetector As IKCPathCollisionDetector64
Dim m_iMetrics(1) As IMetrics64
Dim m_iKinematicSet As IKinematicSet_KC64
Dim pos As Long
#Else
Dim m_iDetector As
IKCPathCollisionDetector Dim m_iMetrics(1) As IMetrics
Dim m_iKinematicSet As IKinematicSet_KC Dim pos As Integer
#End If
The KC_X64 (or similar) constant can be added as a Conditional
Compilation Symbol to project properties (Build page in Visual Studio C# project
properties). See Samples\NET\VB\Collision\CollisionPath\CollisionPathForm.vb for an example
C# language has a slightly better construct:
#region KCDefines
#if KC_X64
using POSNT = Int64;
using IIteratorT = IIterator64;
using IListT = IList64;
#else
using POSNT = Int32;
using IIteratorT = IIterator;
using IListT = IList;
#endif
#endregion
Which can be compacted into a single line as a collapsed region on the top of
each file using the interfaces. See the paragraph below and
Samples\NET\C#\Collision\CollisionPath\CollisionPathForm.cs
Native C++ applications can just replace IIterator with IIteratorT or similar.
The IIteratorT is already defined in Samples\VC\Include\TDefs.h to compile
without any other changes with or without the 64 suffix depending on the current
compiler configuration. The list position type used in the above interfaces is
also defined in generic way as POSNT type which is mapped to
int in 32 bit and to __int64 in 64-bit environments.
|