Search Results

Search found 3988 results on 160 pages for 'collision resolution'.

Page 56/160 | < Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >

  • Calculate angle of moving ball after collision with angled or sloped wall that is a 2D line segment

    - by Ben Mc
    If you have a "ball" inside a 2D polygon, made up of say, 4 line segments that act as bounding walls, how do you calculate the angle of the ball after the collision with the irregularly sloped wall? I know how to make the ball bounce if the wall is horizontal, vertical, or at a 45 degree angle. I also have my code setup to detect a collision with the wall. I've read about dot products and normals, but I cannot figure out how to implement these in Java / Android. I'm completely stumped and feel like I've looked up everything 10 pages deep in Google 10 times now. I'm burned out trying to figure this out, I hope someone can help.

    Read the article

  • Collision detection on sub views contained in 2 separate parent UIViews?

    - by Chris
    Hi All, I originally setup some conditions using CGRectIntersectsRect for some collision detection which worked fine. In the greater scale of things I only need part of the view to be detected. So originally within the ViewController it was comparing 2 UIviews. Now what I need to do is collision detection of subViews within 2 different UIViews that are contained in a view in which the view controller does the logic. My script is no longer working as I suspect CGRectIntersectsRect only compares frames within the same view? I'll keep digging to confirm this. Any ways around this? Is it possible for example to get the x and y pos of the sub view in relation to the main view that's performing the logic?

    Read the article

  • How to include different resolution icons with Android App?

    - by Gerry
    The Android docs indicate that I should ship with different icons for different resolution phone screens. http://developer.android.com/guide/practices/screens_support.html#qualifiers res/drawable-ldpi/my_icon.png // icon image for low density res/drawable-mdpi/dpi/my_icon.png // icon for medium density res/drawable-hdpi/my_icon.png // icon image for high density This does not work when compiling with Eclipse for the Android. Does anyone has an example of a manifest file that works for multiple resolution icons? Thanks, Gerry

    Read the article

  • Timestep schemes for physics simulations

    - by ktodisco
    The operations used for stepping a physics simulation are most commonly: Integrate velocity and position Collision detection and resolution Contact resolution (in advanced cases) A while ago I came across this paper from Stanford that proposed an alternative scheme, which is as follows: Collision detection and resolution Integrate velocity Contact resolution Integrate position It's intriguing because it allows for robust solutions to the stacking problem. So it got me wondering... What, if any, alternative schemes are available, either simple or complex? What are their benefits, drawbacks, and performance considerations?

    Read the article

  • Optimizing multiple dispatch notification algorithm in C#?

    - by Robert Fraser
    Sorry about the title, I couldn't think of a better way to describe the problem. Basically, I'm trying to implement a collision system in a game. I want to be able to register a "collision handler" that handles any collision of two objects (given in either order) that can be cast to particular types. So if Player : Ship : Entity and Laser : Particle : Entity, and handlers for (Ship, Particle) and (Laser, Entity) are registered than for a collision of (Laser, Player), both handlers should be notified, with the arguments in the correct order, and a collision of (Laser, Laser) should notify only the second handler. A code snippet says a thousand words, so here's what I'm doing right now (naieve method): public IObservable<Collision<T1, T2>> onCollisionsOf<T1, T2>() where T1 : Entity where T2 : Entity { Type t1 = typeof(T1); Type t2 = typeof(T2); Subject<Collision<T1, T2>> obs = new Subject<Collision<T1, T2>>(); _onCollisionInternal += delegate(Entity obj1, Entity obj2) { if (t1.IsAssignableFrom(obj1.GetType()) && t2.IsAssignableFrom(obj2.GetType())) obs.OnNext(new Collision<T1, T2>((T1) obj1, (T2) obj2)); else if (t1.IsAssignableFrom(obj2.GetType()) && t2.IsAssignableFrom(obj1.GetType())) obs.OnNext(new Collision<T1, T2>((T1) obj2, (T2) obj1)); }; return obs; } However, this method is quite slow (measurable; I lost ~2 FPS after implementing this), so I'm looking for a way to shave a couple cycles/allocation off this. I thought about (as in, spent an hour implementing then slammed my head against a wall for being such an idiot) a method that put the types in an order based on their hash code, then put them into a dictionary, with each entry being a linked list of handlers for pairs of that type with a boolean indication whether the handler wanted the order of arguments reversed. Unfortunately, this doesn't work for derived types, since if a derived type is passed in, it won't notify a subscriber for the base type. Can anyone think of a way better than checking every type pair (twice) to see if it matches? Thanks, Robert

    Read the article

  • What is the best way to solve an Objective-C namespace collision?

    - by Mecki
    Objective-C has no namespaces; it's much like C, everything is within one global namespace. Common practice is to prefix classes with initials, e.g. if you are working at IBM, you could prefix them with "IBM"; if you work for Microsoft, you could use "MS"; and so on. Sometimes the initials refer to the project, e.g. Adium prefixes classes with "AI" (as there is no company behind it of that you could take the initials). Apple prefixes classes with NS and says this prefix is reserved for Apple only. So far so well. But appending 2 to 4 letters to a class name in front is a very, very limited namespace. E.g. MS or AI could have an entirely different meanings (AI could be Artificial Intelligence for example) and some other developer might decide to use them and create an equally named class. Bang, namespace collision. Okay, if this is a collision between one of your own classes and one of an external framework you are using, you can easily change the naming of your class, no big deal. But what if you use two external frameworks, both frameworks that you don't have the source to and that you can't change? Your application links with both of them and you get name conflicts. How would you go about solving these? What is the best way to work around them in such a way that you can still use both classes? In C you can work around these by not linking directly to the library, instead you load the library at runtime, using dlopen(), then find the symbol you are looking for using dlsym() and assign it to a global symbol (that you can name any way you like) and then access it through this global symbol. E.g. if you have a conflict because some C library has a function named open(), you could define a variable named myOpen and have it point to the open() function of the library, thus when you want to use the system open(), you just use open() and when you want to use the other one, you access it via the myOpen identifier. Is something similar possible in Objective-C and if not, is there any other clever, tricky solution you can use resolve namespace conflicts? Any ideas? Update: Just to clarify this: answers that suggest how to avoid namespace collisions in advance or how to create a better namespace are certainly welcome; however, I will not accept them as the answer since they don't solve my problem. I have two libraries and their class names collide. I can't change them; I don't have the source of either one. The collision is already there and tips on how it could have been avoided in advance won't help anymore. I can forward them to the developers of these frameworks and hope they choose a better namespace in the future, but for the time being I'm searching a solution to work with the frameworks right now within a single application. Any solutions to make this possible?

    Read the article

  • How to accommodate for the different screen resolution of iPhone 4?

    - by mystify
    This is a programming question! Read on before you vote to close! According to Apple, iPhone 4 has a new screen resolution: 3.5-inch (diagonal) widescreen Multi-Touch display 960-by-640-pixel resolution at 326 ppi This little detail affects our apps in a heavy way. Most of the demo apps on the net have one thing in common: They position views in the believe that the screen has a fixed size of 320 x 480 pixels. So what most -if not all- developers do is: They designed everything in such a way, that a touchable area is -for example- 50 x 50 pixels big. Just enough to tap it. Things have been positioned relative to the upper left, to reach a specific position on screen - let's say the center, or somewhere at the bottom. Edit: It seems Apple has integrated an switch that allows to tell if an app is highRes or not. Nice. When we develop high-resolution apps, probably they won't work on older devices. And if they did, they would suffer a lot from 4-times the size of any image, having to scale them down in memory. This is community wiki. Just add anything that you think is relevant to this huge problem (constant screen res was one of the main reasons why I didn't go for Android!!).

    Read the article

  • How to accommodate for the next iPhones totally different screen resolution?

    - by mystify
    This is a programming question! Read on before you vote to close! According to Gizmodo, the next iPhone will have a new screen resolution: The 3.5-inch screen has a resolution of 960?×?640 pixels This little detail affects our apps in a heavy way. Most of the demo apps on the net have one thing in common: They position views in the believe that the screen has a fixed size of 320 x 480 pixels. So what most -if not all- developers do is: They designed everything in such a way, that a touchable area is -for example- 50 x 50 pixels big. Just enough to tap it. Things have been positioned relative to the upper left, to reach a specific position on screen - let's say the center, or somewhere at the bottom. So the big question is: How will the developers compensate their layout and graphics? Are there already solutions which can be used to calculate coordinates and sizes in a normalized manner, which then appear to be exactly the same when viewing them on a screen of any resolution, assuming at least that the aspect ration won't change? This is community wiki. Just add anything that you think is relevant to this huge problem (constant screen res was one of the main reasons why I didn't go for Android!!).

    Read the article

  • How can I use dig(1) to test GeoDNS resolution for a specific IP?

    - by cnst
    There's a rumour that public domain name resolvers, like Google Public DNS, are still supposed to work with GeoDNS, because there's some field in the requests that lets them specify for which IP address they are doing a resolution, thus the authoritative servers can give a given resolver different resolutions for different final clients. What's this whole thing called as far as RFCs go, and how does one mimic such resolutions, for testing purposes, e.g. with dig(1)? Else, what other tool is available to accomplish said task?

    Read the article

  • Analysis Services (SSAS) - Unexpected Internal Error when processing (ProcessUpdate). Workaround/Resolution

    - by James Rogers
    Many implementations require the use of ProcessUpdate to support Type 1 slowly changing dimensions. ProcessUpdate drops all of the affected indexes and aggregations in partitions affected by data that changes in the Dimension on which the ProcessUpdate is being performed. Twice now I have had situations where the processing fails with "Internal error: An unexpected exception occurred." Any subsequent ProcessUpdate processing will also fail with the same error. In talking with Microsoft the issue is corrupt indexes for the Dimension(s) being processed in the partitions of the affected measure group. I cannot guarantee that the following will correct your problem but it did in my case and saved us quite a bit of down time.   Workaround: ProcessIndexes on the entire cube that is being processed and throwing the error. This corrected the problem on both 2008 and 2008 R2.   Pros:  Does not require a complete rebuild of the data (ProcessFull) for either the Dimension or Cube. User access can continue while this ProcessIndexes in underway.   Cons: Can take a long time, especially on large cubes with many partitions, dimensions and/or aggregations. Query Performance is usually severely impacted due to the memory and CPU requirements for Aggregation and Index building   <Batch http://schemas.microsoft.com/analysisservices/2003/engine"http://schemas.microsoft.com/analysisservices/2003/engine">  <Parallel>     <Process xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ddl2="http://schemas.microsoft.com/analysisservices/2003/engine/2" xmlns:ddl2_2="http://schemas.microsoft.com/analysisservices/2003/engine/2/2" xmlns:ddl100_100="http://schemas.microsoft.com/analysisservices/2008/engine/100/100" xmlns:ddl200="http://schemas.microsoft.com/analysisservices/2010/engine/200" xmlns:ddl200_200="http://schemas.microsoft.com/analysisservices/2010/engine/200/200">       <Object>         <DatabaseID>MyDatabase</DatabaseID>         <CubeID>MyCube</CubeID>       </Object>       <Type>ProcessIndexes</Type>       <WriteBackTableCreation>UseExisting</WriteBackTableCreation>     </Process>  </Parallel> </Batch>   The cube where the corruption exists can be found by having Profiler running while the ProcessUpdate is executing. The first partition that displays the "The Job has ended in failure." message in the TextData column will be part of the cube/measuregroup that has the corruption. You can try to run ProcessIndexes on just that measure group. This may correct the problem and save additional time if you have other large measure groups in the cube that are not affected by the corruption.   Remember to execute your normal ProcessUpdate batch after the successful completion of the ProcessIndexes. The ProcessIndexes does not pick up data changes.   Things that did not work: ProcessClearIndexes - why this doesn't work and ProcessIndexes does is unclear at this point. ProcessFull on the partition in question. In my latest case, this would clear up the problem for that partition. However, the next partition the ProcessUpdate touched that had data in it would generate and error. This leads me to believe the corruption problem will exist in all partitions in the affected measure group that have data in them.   NOTE: I experience this problem in both a SQL 2008 and SQL 2008 R2 Analysis Services environment, on separate built from the same relational database. This leads me to believe that some data condition in the tables used for the Dimension processing caused the corruption since the two environments were on physically separate hardware. I am waiting on Microsoft to analyze the dumps to give us more insight into what actually caused the corruption and will update this post accordingly.

    Read the article

  • Is there a global "low resolution" filter for OpenGL?

    - by Ian Henry
    I'm trying to learn a little about OpenGL, so I'm making a simple 2D game (with OpenTK), and so far it's coming along well. I thought it would be fun to give it that, for lack of a better word, retropixelated look of games from the early nineties. I figured it would be an easy thing to do -- simply draw everything at half its normal size and scale up with no anti-aliasing. But I can't find any resources on how to do this. I can set the min/mag filters of my textures to nearest and that works fine for my sprites, but I'm using lots of primitives and I'd like the effect to apply to them as well. The one idea I had was to draw everything at half size, then somehow copy the render buffer to a texture, then render that texture full-size, but I don't know how to do that, and it seems like there must be a better way. Can anyone help me out?

    Read the article

  • Toutes les semaines un peu de code pour aller plus loin avec Windows 7, L'assistant de résolution de problème

    En cette fin d'année, la communauté de Developpez.com s'est alliée avec Microsoft France pour relayer une série de questions / réponses sur le développement Windows 7. A partir d'aujourd'hui, nous poserons une question chaque lundi sur une fonctionnalité propre au développement d'applications Windows 7. La bonne réponse de la question de la semaine sera ensuite dévoilée la semaine suivante avec un exemple de mise en pratique. Êtes-vous prêt à relever le défi ? Pensez-vous bien connaître les possibilités que proposent les API Windows 7 ? C'est ce que nous allons voir dès aujourd'hui, nous attendons vos propositions ! La réponse de la semaine : Quel est l'outil qui permet de cr...

    Read the article

  • how to get the exact mouse click position with support for variable screen resolution ?

    - by javadahut
    I'm writing a simple macro program: you record your mouse or keyboard movements, you save the file, and the program will run it for you on your pc computer. however, the situation is, what if the file is run on a laptop where the resolution is smaller? what if the file is to be run on a web server where there is no monitor ? ie) the button is clicked at position (x,y): 300,520 but the button will be at another location in a different monitor resolution. How would you approach this problem ?

    Read the article

  • Will the next iPhone Simulator be able to simulate the high resolution of iPhone 4?

    - by dontWatchMyProfile
    As a follow-up to this question, the next one is: Will we be able to simulate our interfaces how they look on the new high resolution display, even without owning an iPhone 4? I guess that there is a formula that we can use to calculate the exact needed distance between our monitors and our eyes, to achieve the exact same visual effect of the Retina Display. This would help a lot to get things right. The first thing we need is an high resolution iPhone Simulator. I can't get any sleep until I know.

    Read the article

  • Mac does not recognize wide screen

    - by DUKE
    I am using Mac OS X Lion 10.7.4 on my Mac mini, with Samsung monitor with default resolution 1360 x 768. My Mac mini is connected to Samsung VGA port by Apple mini port to VGA adapter. When starting, my Mac does not recognize the wide screen resolution and always starts in a 4:3 mode, (but it shows 1360x768 as the resolution in the settings). I have to do one of the following actions to bring my Mac to the wide screen resolution: (1) Changing to some other resolution and bring back to the default resolution. (2) Unplug the Apple mini port to VGA adapter and re-connect again. (3) Put the machine to sleep and wake it up again. I am using Ubuntu 12.04, (in a different partition) in the same hardware, but Ubuntu is perfectly recognizing the display.

    Read the article

  • 1000 HZ linux kernel necessary if I have tickless and high resolution timer?

    - by Bob
    I am trying to improve performance on my server. I have a few processes that need low jitter (less than 10ms variance). I have a load average of 4 maximum on an i7-920 (4 physical cores, 8 with HT). There are about 10 processes ranging from 40% to 90% of a core user mode. System usage is 3% total. Total CPU usage is 80% max. Will setting the kernel from 100hz to 1000hz improve the jitter if tickless and high resolution timers are already set? This page seems to indicate it still does something. https://lkml.org/lkml/2009/4/28/401 How about changing from voluntary (PREEMPT_VOLUNTARY) to preemptible (PREEMPT)?

    Read the article

  • How can I make my monitor run at it's native resolution under Kubuntu 9.10?

    - by Adam Matan
    Hi, I have installed Kubuntu 9.10 afresh on an HP desktop computer with a Samsung SyncMaster 2243 and Intel integrated graphics card. The screen resolution is fixed on 1280x1024 instead of the native 1680x1050, which makes my eyes bleed. $ lspci -k |grep "VGA" -A2 00:02.0 VGA compatible controller: Intel Corporation 82G33/G31 Express Integrated Graphics Controller (rev 10) Kernel driver in use: i915 Kernel modules: i915 and my xorg.conf: /etc/X11$ cat xorg.conf Section "Device" Identifier "Configured Video Device" Driver "vesa" EndSection Section "Monitor" Identifier "Configured Monitor" EndSection Section "Screen" Identifier "Default Screen" Monitor "Configured Monitor" Device "Configured Video Device" EndSection Any ideas how to make this driver work? I found no working solutions on Google searches. Thanks, Adam

    Read the article

  • How do I change the console resolution of Ubuntu 9.10 Server running on VMWare?

    - by Raam Dev
    I'm running Ubuntu 9.10 Server in VMWare Fusion (on a Mac) and I'm having trouble changing the console resolution. It seems to be stuck on 640x480. Ubuntu 9.10 uses Grub2, so there is no /etc/grub/menu.lst. I tried adding vga=791 to the kernel parameters (both during boot and by adding it to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub and then running update-grub2) and neither had any effect. When using vga=791, grub says that vga=791 is depreciated and that I should use gfxpayload=1024x768x16,1024x768 instead. However, that also does absolutely nothing. I have a feeling this problem is specific to running Ubuntu 9.10 in VMWare, but Google hasn't turned up anything.

    Read the article

  • How is a nameserver chosen when DNS resolution occurs?

    - by Richard
    I have a few domains hosted on nameservers at Zerigo. Zerigo have 5 nameservers and I have all 5 in the nameserver records for my domains. The nameservers are in different geographical locations (3 in the US, one in London, and one in Amsterdam). When someone goes to a domain of mine and the DNS resolution occurs, how will it choose a nameserver? Will it always go to the nearest geographical one? Will it go to the one with fewest hops? Will it just choose one at random? (This is assuming all 5 are functioning perfectly). Thanks EDIT: And does it make any difference which order I list the nameservers in on the domain name records?

    Read the article

  • Connecting Dell XPS 17/HP Pavilion dv7 (nvidia GT 650M) to Apple LED Cinema Display for 2560x1440 resolution from notebook

    - by alphaTrader
    Is there any way to run higher than 1080p resolution from a Dell XPS 15/17 or HP Pavilion laptop? Specifically, I am planning to buy Dell XPS L721X or HP Pavilion dv7-7005tx with nvidia GeForce GT 650M and connect it to the Apple LED Cinema display via mini Displayport (I don't think Thunderbolt is supported on these notebooks). The idea is to get 1080p on the notebook and 2560x1440 on the main display. Only one of the montitors is active at any time. I asked Dell and they weren't of much help.

    Read the article

  • What laptops can run an external 27" or 30" screen at 2560x1600 native resolution? [closed]

    - by Moin Zaman
    SU Folks, What laptops do you know off that can run a 27" or 30" external monitor as a secondary display (Extending desktop onto second screen, without switching off the laptop's own built in screen) at the screens native resolution of 2560x1600. I'm not interested docks or USB video adapters etc. Just via the laptop's built in display ports. List the port used and cable as well if possible. Reference links / posts that confirm it are an added bonus. I'm hoping people who've tried it themselves and / or confirmed it can list specific models of laptops so we can build up a good list.

    Read the article

  • nvidia ignores the resolution listed in xorg.conf, even though I have 'nvidia-settings --load-config-only' on startup

    - by ihadanny
    when my machine boots, I see a nice 1920X1080 resolution screen, but the minute I login to my user, it's reverted to an ugly 720Xwhatever. When I run nvidia-settings and select 1920X1080, it's ok again. What am I missing??? my /etc/X11/xorg.conf contains: Section "Screen" ... Option "metamodes" "nvidia-auto-select +0+0; 1920x1080 +0+0" ... EndSection I'm using unity 3.8.16 on ubuntu 11.04, and when I check on gnome-session-properties I see that I have sh -c '/usr/bin/nvidia-settings --load-config-only on my startup.

    Read the article

< Previous Page | 52 53 54 55 56 57 58 59 60 61 62 63  | Next Page >