Access to IBoneSceneNode from IAnimatedMeshSceneNode

Discussion about Irrlicht's Java wrapper
Post Reply
LegendaryZ
Posts: 2
Joined: Thu Sep 10, 2009 2:24 pm

Access to IBoneSceneNode from IAnimatedMeshSceneNode

Post by LegendaryZ »

I am using Jirr 1.42 and I want to know how can I access IBoneSceneNode using IAnimatedMeshSceneNode.getJoinNode.

The method is returning a SWIGTYPE_p_IBoneSceneNode, how can I use this ?

Thank you for taking the time to answer my questions.
Josh1billion
Posts: 125
Joined: Thu Dec 11, 2008 9:50 pm
Location: Wisconsin
Contact:

Post by Josh1billion »

I'm wondering exactly the same thing. Anyone have any idea?
www.JoshForde.com

Latest release: Super Orbulite World.
In development: Season of Dreams and others
Josh1billion
Posts: 125
Joined: Thu Dec 11, 2008 9:50 pm
Location: Wisconsin
Contact:

Post by Josh1billion »

Seems the only option is to use the deprecated getXJointNode() method instead of getJointNode().

It returns an ISceneNode instead of an IBoneSceneNode, so it's missing some of the functionality that the newer getJointNode() offers, but it seems to be functional enough for most uses that you'd need joints/bones for, anyway.
www.JoshForde.com

Latest release: Super Orbulite World.
In development: Season of Dreams and others
MarcusD
Posts: 16
Joined: Sat Nov 27, 2010 12:57 pm
Location: South Yorkshire, UK

Post by MarcusD »

Have you tried constructing subclasses of these and passing the CPtr from the SWIGTYPE_p_IBoneSceneNode to the protected C wrapper constructer of the IBoneSceneNode?

I have no idea if this will work but..

Code: Select all



    public IBoneSceneNode fromSWIG(SWIGTYPE_p_IBoneSceneNode st) {
        long cp=CPointer.get(st);
        return new MyIBoneSceneNode(cp);
    }

....
....
....

class MyIBoneSceneNode extends IBoneSceneNode {
    public MyIBoneSceneNode(long cp) {
        super(cp,false);
    }
}
class CPointer extends SWIGTYPE_p_IBoneSceneNode {
    public static long get(SWIGTYPE_p_IBoneSceneNode obj) {
        return SWIGTYPE_p_IBoneSceneNode.getCPtr(obj);
    }
} 
Post Reply