Jump to content

  • Log In with Google      Sign In   
  • Create Account

lucky6969b

Member Since 06 Apr 2007
Offline Last Active Private

Posts I've Made

In Topic: Quadtree/Octree on ramp

17 May 2016 - 09:49 PM

Okay, got some idea... When dividing the quads. I got the bounding boxes, right

And I put the inclined side vertexes with some positive y value....

Is it okay to do so?

Thanks

Jack


In Topic: Quadtree/Octree on ramp

17 May 2016 - 09:38 PM

Hmmm, let's build up a scenario, let's say a tractor of a truck arrives in the scene for my game.

Some NPCs are allowed to enter the tractor to search for stuff or pick up stuff.

And there is a wood blab to bridge the entrance of the warehouse and the tractor,

and this bridging wood is inclined, some vehicles therefore need a climb up this inclined wood,

And the quadtree map is extended. But the quads are usually flat, and don't allow

inclinations, I wonder how to go about solving this problem?

Thanks

Jack


In Topic: Quadtree/Octree on ramp

17 May 2016 - 07:37 PM

It's for pathfinding purpose.

I just want to achieve the same thing as Recast for real-time update of the navmesh (you probably know what Recast is)

but this time with quadtree....

Thanks

Jack


In Topic: How to clone a D3DX9 frame hierarchy?

17 May 2016 - 03:33 AM

What does this message mean?

I keep getting this, then the returned frame root is null...

D3DX: Bad magic number

In Topic: How to clone a D3DX9 frame hierarchy?

16 May 2016 - 06:39 AM

see below....

The pFrameRoot is a valid frame hierarchy...

any ideas?

thanks

Jack

bool CMesh::Load(LPD3DXFRAME pFrameRoot, bool bSkinnedMesh, bool bVertexBlending)
{
  
    CAllocateHierarchy Alloc;    

    
    m_bEnableVertexBlending = bVertexBlending;
    m_bSkinnedMesh = bSkinnedMesh;


    
    if (SUCCEEDED(D3DXLoadMeshHierarchyFromXInMemory((LPCVOID)pFrameRoot, sizeof(pFrameRoot),
        D3DXMESH_MANAGED, d3d::GetInstance().GetDevice(), &Alloc, NULL, &m_pFrameRoot, &m_pAnimController)))
    {
        // load it also as a static mesh
        if (FAILED(D3DXLoadMeshFromXInMemory((LPCVOID)pFrameRoot, sizeof(pFrameRoot), D3DXMESH_MANAGED, d3d::GetInstance().GetDevice(),
            NULL, NULL, NULL, NULL, &m_pStaticMesh)))
        {
            
            return false;

        }
    }
    else
    {
        
       return false;
    }
    


    if (!StructureHierarchy())
        return false;


    return true;



}

PARTNERS