Crystal Space
Welcome, Guest. Please login or register.
August 23, 2014, 02:50:35 am

Login with username, password and session length
Search:     Advanced search
9005 Posts in 2043 Topics by 8334 Members
Latest Member: Jacobrosa
* Home Help Search Login Register
  Show Posts
Pages: 1 2 [3] 4 5 ... 7
31  Crystal Space Development / General Crystal Space Discussion / Re: Physics using ODE on: April 04, 2006, 03:28:52 pm
Well, I trained a little in collision detection when I just make it work Smiley
Now it's high time to practice in physics. And where is friction? What is it all about?

Thanks.
32  Crystal Space Development / General Crystal Space Discussion / Physics using ODE on: April 04, 2006, 03:23:10 pm
Any idea how I can train in it? Can't see any example in the manual.
Can you, for example, tell me how I can create a ball and make it jump forever?

Thanks.
33  Crystal Space Development / General Crystal Space Discussion / Re: csColliderActor on: April 04, 2006, 05:46:21 am
jorrit, why do you ask me to show the entire code and don't say a word then? :)

The problem was in
Code:
csRef<csColliderWrapper> col_walls = csColliderHelper::InitializeCollisionWrapper (cd_sys, walls);
There's no need to do it, since later in code I do
Code:
csColliderHelper::InitializeCollisionWrappers (cd_sys, engine);
34  Crystal Space Development / General Crystal Space Discussion / Re: csColliderActor on: April 03, 2006, 04:05:24 pm
Code:
- - - -
void Simple::CreateRoom () {
        if (!loader->LoadTexture ("wall", "/this/images/wall.png"))
                ReportError ("Failed to load \"wall\" texture");
        if (!loader->LoadTexture ("wooden_floor", "/this/images/wooden_floor.png"))
                ReportError ("Failed to load \"wooden_floor\" texture");
        if (!loader->LoadTexture ("ceiling", "/this/images/ceiling.png"))
                ReportError ("Failed to load \"ceiling\" texture");

        iMaterialWrapper *wall_mw = engine->GetMaterialList ()->FindByName ("wall");
        iMaterialWrapper *wooden_floor_mw =
                engine->GetMaterialList ()->FindByName ("wooden_floor");
        iMaterialWrapper *ceiling_mw = engine->GetMaterialList ()->FindByName ("ceiling");

        room = engine->CreateSector ("room");
        /*csRef<iMeshWrapper>*/ walls = engine->CreateSectorWallsMesh (room, "walls");
        csRef<csColliderWrapper> col_walls = csColliderHelper::InitializeCollisionWrapper
                (cd_sys, walls);
        csRef<iMeshObject> walls_object = walls->GetMeshObject ();
        csRef<iMeshObjectFactory> walls_factory = walls_object->GetFactory ();
        csRef<iThingFactoryState> wfs = scfQueryInterface<iThingFactoryState> (walls_factory);
        //csRef<iThingState> ws = SCF_QUERY_INTERFACE (walls->GetMeshObject (), iThingState);
        //csRef<iThingFactoryState> wfs = ws->GetFactory ();
        wfs->AddInsideBox (
                        csVector3 (-10, 0, -10),
                        csVector3 (10, 10, 10)
                        );

        // Texture mapping the walls

        wfs->SetPolygonMaterial (csPolygonRange (0, 0), wall_mw);
        wfs->SetPolygonTextureMapping (csPolygonRange (0, 0),
                        csVector2 (1, 1),
                        csVector2 (0, 1),
                        csVector2 (0, 0)
                        );
        wfs->SetPolygonMaterial (csPolygonRange (1, 1), wall_mw);
        wfs->SetPolygonTextureMapping (csPolygonRange (1, 1),
                        csVector2 (0, 1),
                        csVector2 (1, 1),
                        csVector2 (1, 0)
                        );
        wfs->SetPolygonMaterial (csPolygonRange (2, 2), wall_mw);
        wfs->SetPolygonTextureMapping (csPolygonRange (2, 2),
                        csVector2 (1, 1),
                        csVector2 (0, 1),
                        csVector2 (0, 0)
                        );
        wfs->SetPolygonMaterial (csPolygonRange (3, 3), wall_mw);
        wfs->SetPolygonTextureMapping (csPolygonRange (3, 3),
                        csVector2 (0, 1),
                        csVector2 (1, 1),
                        csVector2 (1, 0)
                        );

        // Texture mapping the floor and the ceiling

        wfs->SetPolygonMaterial (csPolygonRange (4, 4), wooden_floor_mw);
        wfs->SetPolygonTextureMapping (csPolygonRange (4, 4),
                        csVector2 (1, 1),
                        csVector2 (0, 1),
                        csVector2 (0, 0)
                        );
        wfs->SetPolygonMaterial (csPolygonRange (5, 5), ceiling_mw);
        wfs->SetPolygonTextureMapping (csPolygonRange (5, 5),
                        csVector2 (1, 1),
                        csVector2 (1, 0),
                        csVector2 (0, 0)
                        );

        if (!loader->LoadTexture ("ball_tex", "/this/images/grass_1_pre.jpg"))
                ReportError ("Failed to load \"earth\" texture");
        if (!loader->LoadTexture ("cube_tex", "/this/images/washing_machine.png"))
                ReportError ("Failed to load \"cube\" texture");
        iMaterialWrapper *cube_tex_mw = engine->GetMaterialList ()->FindByName ("cube_tex");
        if (!loader->LoadTexture ("cube_tex_wall", "/this/images/washing_machine_wall.png"))
                ReportError ("Failed to load \"cube wall\" texture");
        iMaterialWrapper *cube_tex_wall_mw = engine->GetMaterialList ()->FindByName (
                        "cube_tex_wall");
        iMaterialWrapper *earth_map_mw = engine->GetMaterialList ()->FindByName (
                        "ball_tex");

        // It's training in using mesh obj and creating genmesh

        fact = engine->CreateMeshFactory ("crystalspace.mesh.object.genmesh", "ball_fact");        csRef<iGeneralFactoryState> fact_state = scfQueryInterface<iGeneralFactoryState> (
                        fact->GetMeshObjectFactory ());
        fact_state->GenerateSphere (csEllipsoid (csVector3 (0, 0, 0), csVector3 (1, 1, 1)), 50);
        //cout << fact_state->GetTriangleCount () << endl;
        fact_state->CalculateNormals ();
        const int NUM_OF_BALLS = 20;
        csRefArray<iMeshWrapper> array_of_balls (NUM_OF_BALLS);
        csRefArray<iGeneralMeshState> array_of_ball_states (NUM_OF_BALLS);
        for (int i = 0; i < NUM_OF_BALLS; i++) {
                csRef<iMeshWrapper> tmp;
                if (i < 10)
                        tmp = engine->CreateMeshWrapper (fact, "one_of_the_balls", room,
                                        csVector3 (-2 * i + 9, 5, 5));
                else
                        tmp = engine->CreateMeshWrapper (fact, "one_of_the_balls", room,
                                        csVector3 (-2 * i + 29, 8, 5));

                array_of_balls[i] = tmp;
                csRef<iGeneralMeshState> ttmp;
                ttmp = scfQueryInterface<iGeneralMeshState> (array_of_balls[i]->GetMeshObject ());
                array_of_ball_states[i] = ttmp;
                array_of_ball_states[i]->SetMaterialWrapper (earth_map_mw);
        }

        // It's training in using thing mesh obj
        csRef<iMeshWrapper> cube = engine->CreateThingMesh (room, "cube");
        csRef<iMeshObject> cube_object = cube->GetMeshObject ();
        csRef<iMeshObjectFactory> cube_factory = cube_object->GetFactory ();
        csRef<iThingFactoryState> cube_state = scfQueryInterface<iThingFactoryState> (
                        cube_factory);

        cube_state->AddOutsideBox (csVector3 (7, 0, 7), csVector3 (9, 3, 9));

        cube_state->SetPolygonMaterial (csPolygonRange (1, 5), cube_tex_wall_mw);
        cube_state->SetPolygonTextureMapping (csPolygonRange (1, 5), 1);

        cube_state->SetPolygonMaterial (csPolygonRange (0, 0), cube_tex_mw);
        cube_state->SetPolygonTextureMapping (csPolygonRange (0, 0),
                        csVector2 (0, 0),
                        csVector2 (1, 0),
                        csVector2 (1, 1)
                        );

        // It's training in moving a mesh

        csRef<iMovable> cube_movable = cube->GetMovable ();
        /*
        csReversibleTransform empty_one;
        empty_one.RotateThis (csVector3 (0, 1, 0), 0.7853);
        cube_movable->SetTransform (cube_movable->GetTransform ().This2Other (
                                &csVector3 (0, 1, 0)));

        */
        /*
        cube_movable->GetTransform ().RotateThis (
                        cube_movable->GetTransform ().Other2This (csVector3 (0, 1, 0)), 0.7853);
        */
        cube_movable->UpdateMove ();

        // Add lights to be able to see something

        csColliderHelper::InitializeCollisionWrappers (cd_sys, engine);

        csRef<iLight> light;
        iLightList *light_list = room->GetLights ();
        light = engine->CreateLight (0, csVector3 (0, 8, 0), 50, csColor (1, 1, 1));
        light_list->Add (light);
}
- - - -
35  Crystal Space Development / General Crystal Space Discussion / Re: csColliderActor on: April 03, 2006, 03:54:35 pm
I added
Code:
csColliderHelper::InitializeCollisionWrappers (cd_sys, engine);
in CreateRoom with no result (
36  Crystal Space Development / General Crystal Space Discussion / Re: csColliderActor on: April 03, 2006, 03:36:27 pm
Can't find how to do it...
37  Crystal Space Development / General Crystal Space Discussion / Re: csColliderActor on: April 03, 2006, 03:22:34 pm
Emm... what?
38  Crystal Space Development / General Crystal Space Discussion / Re: csColliderActor on: April 03, 2006, 03:06:06 pm
Well, I've looked into simpmap tut. Added csColliderActor and... I'm falling down all the way in my app (based on simple1).
Why?
I have this:
Code:
- - - -
    room = engine->CreateSector ("room");
    /*csRef<iMeshWrapper>*/ walls = engine->CreateSectorWallsMesh (room, "walls");
    csRef<csColliderWrapper> col_walls = csColliderHelper::InitializeCollisionWrapper
        (cd_sys, walls);
- - - -
Doesn't it create room with a "solid" floor?
How to do things the right way?

Thanks.
39  Crystal Space Development / Support / Re: Why did my CS app become much slower with a new Jan-2006 CS release? on: April 02, 2006, 04:10:45 pm
Compilation with Cg removed cg warnings :)
It's more than just good, because warnings were in yellow colour, and after it terminal stayed in yellow, until, e.g., running of "ls".
40  Crystal Space Development / Support / Re: Why did my CS app become much slower with a new Jan-2006 CS release? on: April 02, 2006, 01:02:28 pm
Yes, you were right as always ) It was because of old drivers.
I used nVIDIA-x86-7676 drvs. Now with nVIDIA-x86-8178 all works as it should to.
I also will try to recompile with Cg support.
41  Crystal Space Development / Support / Re: Why did my CS app become much slower with a new Jan-2006 CS release? on: April 02, 2006, 11:39:06 am
GeForce4mx-440
42  Crystal Space Development / Support / Re: Why did my CS app become much slower with a new Jan-2006 CS release? on: April 02, 2006, 08:56:54 am
You mean I need to download nVIDIA's Cg-1.4 or higher to make CS function properly even if I have no hardware shaders?
43  Crystal Space Development / Support / Why did my CS app become much slower with a new Jan-2006 CS release? on: April 02, 2006, 02:35:08 am
Previously I used Sep-2005 release.
I have 20 balls in my room. On an old CS I had 43 FPS.
On a new CS I have only 16 FPS!!!
WHY???
Also, now I get errors that no shader cg plugin can be loaded.

Thanks.
44  Crystal Space Development / Support / Re: Cannot compile cs-pseudo-stable-2006-01-27 under Linux on: April 01, 2006, 12:52:05 pm
The problem was in --enable-leak-guard --enable-ref-tracker params. Without it CS was compiled ok.
45  Crystal Space Development / Support / Cannot compile cs-pseudo-stable-2006-01-27 under Linux on: April 01, 2006, 11:01:02 am
Code:
$./configure --prefix=/usr/local --enable-debug --enable-leak-guard --enable-ref-tracker
- - - -
$ make
- - - -
    g++ -c -o ./out/linuxx86/debug/plugins/video/render3d/opengl/gl_txtmgr.o -I. -I./include -I./include -O2 -march=pentium4 -mmmx -msse -msse2 -s -pipe -Wall -Wall -Wno-unknown-pragmas -pipe -march=i586 -I/usr/local/include -O2 -march=pentium4 -mmmx -msse -msse2 -s -pipe -Wall -fno-exceptions -g3 -DCS_DEBUG -fPIC -I/usr/X11R6/include  plugins/video/render3d/opengl/gl_txtmgr.cpp

plugins/video/render3d/opengl/gl_txtmgr.cpp:44: error: syntax error before `::'
   token
...skipped gl3d.so for lack of <plugins!video!render3d!opengl!>gl_txtmgr.o...

    g++ -c -o ./out/linuxx86/debug/plugins/video/render3d/shader/shaderplugins/vproc_std/vproc_std.o -I. -I./include -I./include -O2 -march=pentium4 -mmmx -msse -msse2 -s -pipe -Wall -Wall -Wno-unknown-pragmas -pipe -march=i586 -I/usr/local/include -O2 -march=pentium4 -mmmx -msse -msse2 -s -pipe -Wall -fno-exceptions -g3 -DCS_DEBUG -fPIC  plugins/video/render3d/shader/shaderplugins/vproc_std/vproc_std.cpp

plugins/video/render3d/shader/shaderplugins/vproc_std/vproc_std.cpp:32: error: syntax
   error before `::' token
...skipped vproc_std.so for lack of <plugins!video!render3d!shader!shaderplugins!vproc_std!>vproc_std.o...
make: *** [all] Error 1

Thanks.


~~~Edit~~~

PS: Here's a config.log
Pages: 1 2 [3] 4 5 ... 7
Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.243 seconds with 16 queries.