Search Results

Search found 4 results on 1 pages for 'adivasile'.

Page 1/1 | 1 

  • Building dynamic bounding box hierachies.

    - by adivasile
    I've been reading about collision detection and I saw that the first part was a coarse detection which generates possible contacts using bounding box hierarchies. I understand the concept of splitting up your objects in groups, to speed up the detection phase, but I'm a little confused on how do you actually build the hierachy, more so on what criteria is used to group them together. Do I iterate through all the objects in the scene, and check the distance between them to see where they should be inserted in the tree? Do you know some resources that may shed some light on this topic for me?

    Read the article

  • Cannot set up dual monitors correctly in Fedora15 with KDE.

    - by adivasile
    I have 2 monitors: 24" LCD connected via DVI(primary) 19" LCD connected via VGA(secondary) Everytime Fedora starts the second display is always set to clone the first one and they both run at 1280x1024 and I always have to disable the 19" monitor, in order for the bigger one to run at 1920x1080. I want to set them up so that my secondary monitor extends the primary one.The problem is that no matter what kind of configuration I choose it has no effect.My secondary monitor remains disabled. I've tried using both the Display manager from KDE and the ATI Control Panel and the behaviour is always the same.The moment I click apply, the screen flickers and nothing changes. I've succesfully used the extended setup in Fedora15 with Gnome3. I have a RadeonHD 4300 series videocard and I'm using the drivers downloaded from the AMD site. This is the output of xrandr -q : Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 1920 x 1920 VGA-0 connected (normal left inverted right x axis y axis) 1280x1024 75.0 60.0 1280x960 60.0 1152x864 75.0 1024x768 75.0 70.1 66.0 60.0 832x624 74.6 800x600 72.2 75.0 60.3 56.2 640x480 75.0 72.8 66.7 59.9 720x400 70.1 DVI-0 connected 1920x1080+0+0 (normal left inverted right x axis y axis) 477mm x 268mm 1920x1080 60.0*+ 60.0 1680x1050 59.9 1600x900 60.0 1280x1024 75.0 60.0 1280x960 60.0 1152x864 75.0 1280x720 60.0 1152x720 60.0 1024x768 75.0 60.0 832x624 74.6 800x600 75.0 60.3 640x480 75.0 59.9 720x400 70.1 Later edit: The problem seems to come from the ATI drivers.I managed to set up the monitors like I wanted after I uninstalled the drivers. Unfortunately I'm working on an OpenCL project so I had to reinstall them.The moment I did that, all my previous settings were forgotten and I was back to square one.

    Read the article

  • C++ virtual functions.Problem with vtable

    - by adivasile
    I'm doing a little project in C++ and I've come into some problems regarding virtual functions. I have a base class with some virtual functions: #ifndef COLLISIONSHAPE_H_ #define COLLISIONSHAPE_H_ namespace domino { class CollisionShape : public DominoItem { public: // CONSTRUCTOR //------------------------------------------------- // SETTERS //------------------------------------------------- // GETTERS //------------------------------------------------- virtual void GetRadius() = 0; virtual void GetPosition() = 0; virtual void GetGrowth(CollisionShape* other) = 0; virtual void GetSceneNode(); // OTHER //------------------------------------------------- virtual bool overlaps(CollisionShape* shape) = 0; }; } #endif /* COLLISIONSHAPE_H_ */ and a SphereShape class which extends CollisionShape and implements the methods above /* SphereShape.h */ #ifndef SPHERESHAPE_H_ #define SPHERESHAPE_H_ #include "CollisionShape.h" namespace domino { class SphereShape : public CollisionShape { public: // CONSTRUCTOR //------------------------------------------------- SphereShape(); SphereShape(CollisionShape* shape1, CollisionShape* shape2); // DESTRUCTOR //------------------------------------------------- ~SphereShape(); // SETTERS //------------------------------------------------- void SetPosition(); void SetRadius(); // GETTERS //------------------------------------------------- cl_float GetRadius(); cl_float3 GetPosition(); SceneNode* GetSceneNode(); cl_float GetGrowth(CollisionShape* other); // OTHER //------------------------------------------------- bool overlaps(CollisionShape* shape); }; } #endif /* SPHERESHAPE_H_ */ and the .cpp file: /*SphereShape.cpp*/ #include "SphereShape.h" #define max(a,b) (a>b?a:b) namespace domino { // CONSTRUCTOR //------------------------------------------------- SphereShape::SphereShape(CollisionShape* shape1, CollisionShape* shape2) { } // DESTRUCTOR //------------------------------------------------- SphereShape::~SphereShape() { } // SETTERS //------------------------------------------------- void SphereShape::SetPosition() { } void SphereShape::SetRadius() { } // GETTERS //------------------------------------------------- void SphereShape::GetRadius() { } void SphereShape::GetPosition() { } void SphereShape::GetSceneNode() { } void SphereShape::GetGrowth(CollisionShape* other) { } // OTHER //------------------------------------------------- bool SphereShape::overlaps(CollisionShape* shape) { return true; } } These classes, along some other get compiled into a shared library. Building libdomino.so g++ -m32 -lpthread -ldl -L/usr/X11R6/lib -lglut -lGLU -lGL -shared -lSDKUtil -lglut -lGLEW -lOpenCL -L/home/adrian/AMD-APP-SDK-v2.4-lnx32/lib/x86 -L/home/adrian/AMD-APP-SDK-v2.4-lnx32/TempSDKUtil/lib/x86 -L"/home/adrian/AMD-APP-SDK-v2.4-lnx32/lib/x86" -lSDKUtil -lglut -lGLEW -lOpenCL -o build/debug/x86/libdomino.so build/debug/x86//Material.o build/debug/x86//Body.o build/debug/x86//SphereShape.o build/debug/x86//World.o build/debug/x86//Engine.o build/debug/x86//BVHNode.o When I compile the code that uses this library I get the following error: ../../../lib/x86//libdomino.so: undefined reference to `vtable for domino::CollisionShape' ../../../lib/x86//libdomino.so: undefined reference to `typeinfo for domino::CollisionShape' Command used to compile the demo that uses the library: g++ -o build/debug/x86/startdemo build/debug/x86//CMesh.o build/debug/x86//CSceneNode.o build/debug/x86//OFF.o build/debug/x86//Light.o build/debug/x86//main.o build/debug/x86//Camera.o -m32 -lpthread -ldl -L/usr/X11R6/lib -lglut -lGLU -lGL -lSDKUtil -lglut -lGLEW -ldomino -lSDKUtil -lOpenCL -L/home/adrian/AMD-APP-SDK-v2.4-lnx32/lib/x86 -L/home/adrian/AMD-APP-SDK-v2.4-lnx32/TempSDKUtil/lib/x86 -L../../../lib/x86/ -L"/home/adrian/AMD-APP-SDK-v2.4-lnx32/lib/x86" (the -ldomino flag) And when I run the demo, I manually tell it about the library: LD_LIBRARY_PATH=../../lib/x86/:$AMDAPPSDKROOT/lib/x86:$LD_LIBRARY_PATH bin/x86/startdemo After reading a bit about virtual functions and virtual tables I understood that virtual tables are handled by the compiler and I shouldn't worry about it, so I'm a little bit confused on how to handle this issue. I'm using gcc version 4.6.0 20110530 (Red Hat 4.6.0-9) (GCC) Later edit: I'm really sorry, but I wrote the code by hand directly here. I have defined the return types in the code. I apologize to the 2 people that answered below. I have to mention that I am a beginner at using more complex project layouts in C++.By this I mean more complex makefiles, shared libraries, stuff like that.

    Read the article

  • Change event on <select>

    - by adivasile
    If i attach a change event listener on a<select> how do i acces the option that was selected (not just the value, the actual element). $('select').addEvent('change',function(event) { //?? }); Note: i'm using Mootools

    Read the article

1