Recommended Posts

Hey,
I've been trying to use this method, but all my attempts have failed. Since I'm new to C# I figure that I must be doing some wrong in handling the classes, so this is more a C# question than a DX9 one
I based the project on the DX 9 wizard, so it has all the basic variables setup for me.
----------------------------------------------------
AllocateObj = new MyAllocateHierarchy();
LoadUserDataObj = new MyLoadUserData();
turretMesh = Mesh.LoadHierarchyFromFile("C:\tiny.x", Managed, device, AllocateObj, LoadUserDataObj);
----------------------------------------------------
The variables have been defined as:
public class MyAllocateHierarchy : AllocateHierarchy
{
public MyAllocateHierarchy()
{
}
override public void SetUserDataInMeshContainer(MeshContainer container)
{
}
override public void SetUserDataInFrame(Frame frame)
{
}
}
public class MyLoadUserData : LoadUserData
{
public MyLoadUserData()
{
}
override public void LoadFrameChildData(Frame frame, XFileData xofChildData)
{
}
override public void LoadMeshChildData(MeshContainer meshContainer, XFileData xofChildData)
{
}
override public void LoadTopLevelData(XFileData xofChildData)
{
}
}
private AnimationRootFrame turretMesh;
private MyAllocateHierarchy AllocateObj;
private MyLoadUserData LoadUserDataObj;
I'm really new to C#, just started so I'm kinda lost here :S
It doesn't give me an error message either since the try/catch in the d3dapp.cs (EDIT) class is catching the error, I don't know how to get the error message
Thanks in advance
Regards,
/Omid
[edited by - Omid on December 25, 2002 10:50:12 AM][edited by - Omid on December 25, 2002 10:54:17 AM]