Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK .NET / VB.NET 2008 Studio + darkGDK.NET - Accessing limbs?

Author
Message
Tony Martin
15
Years of Service
User Offline
Joined: 5th Jun 2009
Location:
Posted: 10th Aug 2009 01:03
I'm new to Dark programming, but not to 3D graphics
I have a simple tank that I modeled in TrueSpace and saved in .X format.
I modeled it with a heiarchy - the body is the topmost, the turrent is a child of that, then the barrel is a child of the turrent.
My question is how to manipulate the various parts in DarkGDK.
Can someone post some code on accessing and manipulating child objects? I have tried several different things based on what I've read in the documentation, but I just can't get anywhere. Help!!

Thanks!
Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 10th Aug 2009 10:12
Try looking in the Limbs part of the 3D docs.

Tony Martin
15
Years of Service
User Offline
Joined: 5th Jun 2009
Location:
Posted: 10th Aug 2009 16:03
I have been. The doc does tell what all the limb commands are, but there is nothing about any kind of setup or when you should/need to use them.


Here's my code:
Dim oTank As DarkGDK.Basic3D.Object3D
Dim tankbarrel As DarkGDK.Basic3D.Limb

DarkGDK.Camera.DefaultCamera.ColorBackdrop(Color.BlueViolet)
DarkGDK.Camera.DefaultCamera.AutoCamOff()
DarkGDK.Camera.DefaultCamera.PositionCurrent(0, 0, -20)
DarkGDK.Camera.DefaultCamera.PointCurrent(0, 0, 0)

oTank = New DarkGDK.Basic3D.Object3D("c:\temp\tank.x")
oTank.EnumerateLimbs()

It dies on the enumerateLimbs call - Is this not the first step for drilling down into your hiearchy object? Does the heirachy stay intact when I load the object?
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 10th Aug 2009 21:48
How strange. I'll investigate why the EnumerateLimbs function is failing.

Paul.

Tony Martin
15
Years of Service
User Offline
Joined: 5th Jun 2009
Location:
Posted: 11th Aug 2009 02:56
I can send you the tank model as well if it would help.
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 11th Aug 2009 22:37
Tony, it would actually, if that's ok. The usual email

Paul.

Tony Martin
15
Years of Service
User Offline
Joined: 5th Jun 2009
Location:
Posted: 12th Aug 2009 00:02
The object has been emailed directly to your inbox.
Please let me know if I can be any help.
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 12th Aug 2009 03:38
Hi Tony, I'll look into why this is happening.

Many thanks.

Paul.

APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 14th Aug 2009 20:54
Tony

I have found and fixed the EnumerateLimbs function. You will need to download the attached ZIP file.

Before you can update your system with the fix, you will need to make a minor change to your Registry so that you can access an area of your Windows folder called the GAC.

First of all, download and unzip the RAR to somewhere on your system.

1. Click Run from the Start menu and type REGEDIT and press enter.

2. When RegEdit starts, use the left side pane to browse to the following location:

HKEY_LOCAL_MACHINESOFTWAREMicrosoftFusion

3. Click on Fusion with the Right Mouse button and select New / DWORD Value.

4. Give the value name as DisableCacheViewer

5. Double click on the DisableCacheViewer entry on the right side pane and change the value from 0 to 1

6. Close RegEdit

7. In the RAR, find the folder DarkGDK.DLL and then copy the DarkGDK.DLL update file to the following two locations on your PC, overwriting the file that should already be there:

a) HostDriveWindows Folder)AssemblyGACGAC_32DarkGDK1.2.0.0__e5d518e3875aacb1

b) HostDriverogram FilesMicrosoft Visual Studio 9.0Common7IDEPublicAssemblies

Your Visual Studio folder may be differently named depending on what version of the tools you have installed.

Once you have copied to both locations, you should be able to load and build the attached project which basically loads your Tank model and enumerates the names of the Limbs found in the model.

Any problems, let me know.

Paul.

Attachments

Login to view attachments
Tony Martin
15
Years of Service
User Offline
Joined: 5th Jun 2009
Location:
Posted: 15th Aug 2009 00:24
It works! Thank you so very much!

Login to post a reply

Server time is: 2024-11-21 14:11:45
Your offset time is: 2024-11-21 14:11:45