Search found 8 matches

by arrival
Sun Jul 22, 2012 8:39 am
Forum: Beginners Help
Topic: The Right Way to Handle Physics?
Replies: 6
Views: 938

Re: The Right Way to Handle Physics?

Granyte : Discrete integration gives aproximated result, and aproximation error depends on the time step you use. Your simulation may end up differentialy despite the same initial state if you use variable time step. Imagine flying your spaceship thru solar system while fighting many gravity fields ...
by arrival
Thu Jul 19, 2012 11:48 am
Forum: Beginners Help
Topic: The Right Way to Handle Physics?
Replies: 6
Views: 938

Re: The Right Way to Handle Physics?

Thanks randomMesh, setting maximum number of physics step in one frame is one way to avoid 'spiral of death' for sure. But its not easy to find the right threshold value right?
Another way would be moving physics calculations to a second thread, to make rendering loop iteration times independent of ...
by arrival
Wed Jul 18, 2012 8:40 am
Forum: Beginners Help
Topic: Split a texture (roll out map)
Replies: 1
Views: 376

Re: Split a texture (roll out map)

If you draw the rolling map in the screen space the easiest way would be drawing 2DImage, as the drawing function takes source and destination rectangles. You would just need to animate source rectangles deimensions. If map is modeled in 3d as a mesh it will be harder to do that...but with UV ...
by arrival
Tue Jul 17, 2012 9:48 pm
Forum: Beginners Help
Topic: The Right Way to Handle Physics?
Replies: 6
Views: 938

The Right Way to Handle Physics?

Hi. Im having a dilemma about integrating physics with Irrlicht.
The firt thing that comes in mind is:

float fixedStep = 1.0/60.0;
while(irrdev->run())
{
physicsWorld->advance(fixedStep);

scnMgr->drawAll();
guiEnv->drawAll();
}

Fixed step set to about 1/60 is recomended in Box2d manual.
But ...
by arrival
Sat Mar 17, 2012 8:11 pm
Forum: Advanced Help
Topic: Aply the same vertexbuffer to multi-meshbuffers
Replies: 4
Views: 980

Re: Aply the same vertexbuffer to multi-meshbuffers

Not sure about types you used but as far as I know inside the SMeshBuffer and CMeshBuffer vertices are stored as an array of Vertex objects (S3DVertex for example). getVertices() returns an array - pointer to its firs element, so now you are probably trying to cast S3DVertex* to IVertexBuffer*. I ...
by arrival
Wed Mar 14, 2012 4:18 pm
Forum: Beginners Help
Topic: [SOLVED] merging MeshBuffers / sharing them with many Meshes
Replies: 4
Views: 949

Sharing single Mesh Buffer.

Hi. I'm back.

I was doing many appends to CMeshBuffer in runtime, and I find it veary slow, because of memory reallocation triggered every time.
Since irr::core::array allows us to choose ALLOC_STRATEGY there should be if( Vertices.allocated_size() < vertexCount+numVertices ) just before ...
by arrival
Mon Feb 27, 2012 2:34 pm
Forum: Beginners Help
Topic: [SOLVED] merging MeshBuffers / sharing them with many Meshes
Replies: 4
Views: 949

Re: merging Mesh Buffers

What does "Dynamic" means than?

CMeshBuffer::virtual void append(const IMeshBuffer* const other) is also not implemented ( commented out, actually - unstable? ), but
CMeshBuffer::virtual void append(const void* const vertices, u32 numVertices, const u16* const indices, u32 numIndices) is, and it ...
by arrival
Mon Feb 27, 2012 10:24 am
Forum: Beginners Help
Topic: [SOLVED] merging MeshBuffers / sharing them with many Meshes
Replies: 4
Views: 949

[SOLVED] merging MeshBuffers / sharing them with many Meshes

Hi.
I barely started using Irrlicht and I'm having an issue with managing meshes data.
I was trying to copy one mesh to the other one by appending ones mesh buffer to the others. But it looks like its not working.
I used CDynamicMeshBuffer::append( CDynamicMeshBuffer* _mbuff ). I digged thru ...