Floating point Collsion Detection
I have an player that move around in a 2D map. The value of x and y are in floating points. Now i want it to collide with another player that move around too in the map. Both the player can rotate around too. I have tried many ways including rectangle drawing to detect collsion but its not accurate or very wrong.
Is there any hint on how to do the collsion detection? I really need help..Or is there anyone with similar situatio please give some tips or codes....
Any help will be greatly appreciated. Thank You!!!!
I would suggest using spheres around your "objects", or rectangles depending on the shape of your objects. Then you can use basic math to check if two objects collide.
You may want to look up the math behind this yourself, but I'm sure you can find a math library that you can either use or port to java. Looking around sites such as gamasutra.com and gamedev.net might give you some valuable clues.
If your objects have odd shapes (a gun sticking out for example), you may want to use multiple collision tests per object, having multiple bounding boxes or spheres.
Similar Messages
-
Using iMovie footage in FCP: 32-bit floating point audio?
I'd like to use iMovie 7 to capture my DV footage because I like its cataloging and skimming features, and the way it splits up clips based on DV stops. I want to do my editing in Final Cut Pro 5. Unfortunately, I've found that the audio depth in the clips I've captured with iMovie is 32-bit floating point, rather than 16-bit integer, and FCP has to render the audio before it can play back. Strange, since the FCP browser says that the sequence I dropped the iMovie footage into IS 32-bit. Any ideas on how to get FCP to playback this bit depth without rendering, and without having to convert my footage?
Do a search here and you will find all kinds of post on this very subject.
The main problems with using iMove to capture for FCP are
1. iMovie and FCP capture in very different ways. iMovie captures footage as a DV stream, problematic for editing in FCP
2. iMovie captures will not give you the timecode from your tape... may or may not be important to you unless you ever need to recapture and reconnect the footage.
In short, if you are editing in FCP... capture with FCP. If you want to split the footage based on tape start/stop, use the Start Stop detect function after you have captured.
rh -
SQL Loader and Floating Point Numbers
Hi
I have a problem loading floating point numbers using SQL Loader. If the number has more than 8 significant digits SQL Loader rounds the number i.e. 1100000.69 becomes 1100000.7. The CTL file looks as follows
LOAD DATA
INFILE '../data/test.csv' "str X'0A'"
BADFILE '../bad/test.bad'
APPEND
INTO TABLE test
FIELDS TERMINATED BY "," OPTIONALLY ENCLOSED BY '"'
Amount CHAR
and the data file as follows
"100.15 "
"100100.57 "
"1100000.69 "
"-2000000.33"
"-100000.43 "
the table defined as follows
CREATE TABLE test
Amount number(15,4)
) TABLESPACE NNUT050M1;
after loading a select returns the following
100.15
100100.57
1100000.7
-2000000
-100000.4
Thanks in advance
RussellActually if you format the field to display as (say) 999,999,999.99, you will see the correct numbers loaded via SQL Loader.
null -
R6002 - floating point not loaded / C++ Runtime Error
Good Evening,
I have been having this problem with Adobe Bridge for a while and tonight sat down to try and solve it. Fresh version of Windows XP reinstalled all programs and this is still happening! Any Ideas?
This error only occurs with Adobe Bridge, I can load Photoshop etc.. all fine.
Error:
"Runtime Error!
Program: C:\ProgramFiles\Adobe\Adobe Bridge CS3\Bridge.exe
R6002
- floating point not loaded"
Here is a print screen..
http://images.unbrokenphotography.co.uk/BridgeError.jpgIs there are answer to this problem? This error message is appearing on an entire lab full of computers. We are running Web Premium CS4
I have tried to reset the Bridge Preferences:
Hold down the Ctrl key and click on Bridge icon to start.
Should get a reset window with 3 options.
Choose the first option
I still get "Runtime Error! Program: C:\Prgram Files\Adobe\Adobe Bridge CS4\Bridge.exe R6002 -floating point support not loaded" -
I have one Captivate 3 project published as a Stand Alone
project with Flash 8 selected. There are 36 slides, no audio, no
eLearning, SWF size and quality are high.
One person who runs this gets an "Invalid Floating Point"
error when he tries to run it the first time. He is running Windows
XP SP2, Firefox 3.0.4. and Flash Player 10.0.12.36. Other Captivate
projects I've created run fine for him. This one sometimes runs
after the first Error message.
Any thoughts on the cause and fix?
Thanks,
JanetiMediaTouch probably doesn't support Floating Point formats - it certainly doesn't mention them in the advertising. Try saving your files as 24-bit PCMs, and they should import fine.
-
Pack and Floating Point Data Type in ABAP
Dear All,
I am new to ABAP. Started with data types. Came across pack and floating point.
Please let me know what PACK and Floating Point stands for with few examples and the main difference between them.
Regards
Arun VHi,
You'd better ask this question in ABAP forum http://forums.sdn.sap.com/forum.jspa?forumID=50 .
Best Regards,
Ada -
Conversion of a floating point type field
Hi,
I'm fetching field ATFLV from table AUSP for a particular value of ATINN.ATFLV is a floating point type field.
Can anyone please guide me as to how to convert this field(ATFLV) from floating point no. to a simple no.?
Helpful answers will be rewarded.
Regards,
Siprahi,
Do like this,
float f = 234.33;
int i = (int) f; // i has value 234.
reward points if helpful.. -
Maximum size of a floating-point number
Morning all,
Does anyone know what the maximum size of a floating point number can be under Solaris 8 running on
a V880?
Regards,
Richard BreckonI'm not sure what you're asking.
The maximum size is 128 bits.
The maximum value is as given in /usr/include/float.h: 1.189731495357231765085759326628007016E+4932L -
Hello All,
I am having some trouble checking the value of a field with Key Figure type Number with 8 byte floating point. I want to read that field and populate another field with an X if true. For example if that field is equal to 5,0000000000000000E+07 then i want to mark the other field with an 'X'.
The problem is in my code, how do i read that number in the fltp field, such as the number above. my code reads as follows for the 'X' field.
if SOURCE_FIELDS-abc123 eq 5000000.
RESULT = 'X'.
endif.
Thanks everyone in advanceYou don't need to worry about converting the code into standard format or floating, just implement your code as you want and it will automatically take care of the conversion. Basically 5,0000000000000000E+07 = 50,000,000.
thanks.
Wond -
Hello,
Running FCP 5.1
Having audio sync issues and was double checking my settings.
Although the sequence presets are at 16 bit, they are showing up in the browser as 32bit Floating Point.
Any thoughts?
I generally capture now at 30 minute increments and actually have always had this issue. FCP 4.5 and 5.1
all settings are where they should be.
although I do notice, obviously when the device is off, the audio output defaults to 'default' not to firewire dv.
thanks
iMac intel Mac OS X (10.4.8)Some more details please. What hardware device are you sourcing the audio clips from? The likely culprit is your capture settings. What preset are you using? Check Audio/Video Settings-Capture Presets and see if the preset you've selected records audio as 32 bit. It will say in the right column after you've selected your preset.
If it says 32 bit there, click Edit to get the Capture Preset Editor. Under Quicktime Audio Settings, the Format field should give you a selection of sample rates and possibly alternate bit depths. If your only choice is 32 bit, (as it is for me when I capture audio via my RME, 32 bit Integer in my case) then you'd be well served by bringing those files into Peak or Quicktime and saving them as 16 bit Integer files to match your sequence settings.
If you've imported these files into FCP from an audio editor that can create 32 bit floating point audio files, eg Kyma, Sequoia, Nuendo, etc. then the same advice applies. The 32 bit files are much larger than they need to be and may upset the apple cart (he he, pun) when pulled into a sequence with different settings. More cpu overhead for sure.
Let us know what you find. -
How to make floating point division
I have tried many alternatives but i couldnt make any single floating point number printed to a page...
I am compiling the servlet with eclipse 3.2 without any error but the jsp page says java.lang.NoSuchFieldError: floatnumber even i have that variable...
i have tried double,float but both of them makes the error above...but i can print long as well.
can anyone teach me to divide 2 integer values and print the exact result like;
3 / 5 = 0.6can anyone teach me to divide 2 integer values and
print the exact result like;
3 / 5 = 0.6
int a= 3, b= 5;
double result= ((double)a)/b;... or any valid variation thereof.
kind regards,
Jos -
Reading Floating Point PLC5 Registers Kills my ability to write to any register
When ever I create an object that reads a PLC5 Floating Point Register(F8:5),it kills my ability to write to any other PLC register. The problem only shows up with Floating Point registers. If I use integer registers (N7:121 etc.)I can read/write fine. It also severely slows down my normal driver scan update time. Even though it is set to scan every 30 seconds, I may only get an update every few minutes. Anyone else ever run into this? Thanks in advance!
Hi,
It might be helpful creating a log file to monitor com port activity.
Here's the Knowledgebase article about it.
http://digital.ni.com/public.nsf/3efedde4322fef19862567740067f3cc/cac576863ff648a186256b5900794761?OpenDocument
Another way to check the serial port activity would be using "portmon"
software available at
http://www.sysinternals.com/ntw2k/freeware/portmon.shtml
I hope this helps.
Remzi A.
Applications Engineering
National Instruments -
Cannot get Oracle 10g to start on a G5. Floating point exception
After a very painful 10g (EE) installation process i.e fixing all the following:
1) Created the missing /opt directory
2) Installation of XCode 1.2
3) Fixing the root.sh file
4) Downloaded the crstl file provided by Ron
5) Copied /etc/oratab/oratab to /etc/oratab
I tried bringing up the Oracle 10g instance by logging onto Sql*Plus as sysdba and running
startup nomount pfile ='/Users/oracle/admin/db01/scripts/init.ora''. The instance comes up for a few socunds and crashes. This is what i get in the alert.log
==========================================================
Sat Jul 17 11:40:08 2004
Starting ORACLE instance (normal)
LICENSE_MAX_SESSION = 0
LICENSE_SESSIONS_WARNING = 0
Picked latch-free SCN scheme 2
KCCDEBUG_LEVEL = 0
Using LOG_ARCHIVE_DEST_10 parameter default value as USE_DB_RECOVERY_FILE_DEST
Autotune of undo retention is turned on.
Dynamic strands is set to TRUE
Running with 2 shared and 18 private strand(s). Zero-copy redo is FALSE
IMODE=BR
ILAT =18
LICENSE_MAX_USERS = 0
SYS auditing is disabled
Starting up ORACLE RDBMS Version: 10.1.0.3.0.
System parameters with non-default values:
processes = 150
sga_target = 146800640
control_files = /Users/oracle/oradata/db01/control01.ctl, /Users/oracle/oradata/db01/control02.ctl, /Users/oracle/oradata/db01/control03.ctl
db_block_size = 8192
compatible = 10.1.0.2.0
db_file_multiblock_read_count= 16
db_recovery_file_dest = /Users/oracle/flash_recovery_area
db_recovery_file_dest_size= 2147483648
undo_management = AUTO
undo_tablespace = UNDOTBS1
remote_login_passwordfile= EXCLUSIVE
db_domain =
dispatchers = (PROTOCOL=TCP) (SERVICE=db01XDB)
job_queue_processes = 10
background_dump_dest = /Users/oracle/admin/db01/bdump
user_dump_dest = /Users/oracle/admin/db01/udump
core_dump_dest = /Users/oracle/admin/db01/cdump
db_name = db01
open_cursors = 300
pga_aggregate_target = 16777216
PMON started with pid=2, OS id=4037
MMAN started with pid=3, OS id=4039
DBW0 started with pid=4, OS id=4041
LGWR started with pid=5, OS id=4043
CKPT started with pid=6, OS id=4045
SMON started with pid=7, OS id=4047
RECO started with pid=8, OS id=4049
Sat Jul 17 11:40:16 2004
starting up 1 dispatcher(s) for network address '(ADDRESS=(PARTIAL=YES)(PROTOCOL=TCP))'...
CJQ0 started with pid=9, OS id=4051
Sat Jul 17 11:40:16 2004
starting up 1 shared server(s) ...
Sat Jul 17 11:40:18 2004
Errors in file /Users/oracle/admin/db01/bdump/db01_ckpt_4045.trc:
ORA-07445: exception encountered: core dump [semop+8] [SIGFPE] [Invalid floating point operation] [0xA0004CE4] [] []
Sat Jul 17 11:40:19 2004
Errors in file /Users/oracle/admin/db01/bdump/db01_mman_4039.trc:
ORA-07445: exception encountered: core dump [semop+8] [SIGFPE] [Invalid floating point operation] [0x41EDB3C] [] []
Sat Jul 17 11:40:21 2004
Errors in file /Users/oracle/admin/db01/bdump/db01_pmon_4037.trc:
ORA-00822: MMAN process terminated with error
Sat Jul 17 11:40:21 2004
PMON: terminating instance due to error 822
Instance terminated by PMON, pid = 4037
==========================================================
Any idea on what needs to be done to fix this error. I remember that i had the very same issue with the Oracle 9i R2 Developers release.
Any help will be greatly appreciated.After a very painful 10g (EE) installation process
i.e fixing all the following:<snip>
Sat Jul 17 11:40:19 2004
Errors in file
/Users/oracle/admin/db01/bdump/db01_mman_4039.trc:
ORA-07445: exception encountered: core dump [semop+8]
[SIGFPE] [Invalid floating point operation]
[0x41EDB3C] [] []
Sat Jul 17 11:40:21 2004
Errors in file
/Users/oracle/admin/db01/bdump/db01_pmon_4037.trc:
ORA-00822: MMAN process terminated with error
Sat Jul 17 11:40:21 2004
PMON: terminating instance due to error 822
Instance terminated by PMON, pid = 4037==============================================> Any idea on what needs to be done to fix this error.
I remember that i had the very same issue with the
Oracle 9i R2 Developers release.
Any help will be greatly appreciated.You mentioned the 9ir2 release. Do you still have any reference to the 9ir2 software in your environment ? With a little luck you have, and in that case it not so hard to find a solution ...
Ronald.
http://homepage.mac.com/ik_zelf/oracle -
How to gather a set of floating point numbers from a web page form?
I am pretty new to Java and I am working on a project to apply Benfords law to find the probability of digits submitted by the user. My first step is to gather set of floating point numbers from a web page. How do I go about doing this? Any suggestion or a proper site where I can learn this stuff will be highly appreciated.
I am using NetBeans IDE 5.5.1 and for this project. I have realized that the first question was not well phrased.
I created a web project with 2 jsp files and a class file in it. When my jsp file runs I ask the user to enter a number for finding the probablility based on Benfords law.
This is what I got so far:
This is input.jsp
<h1></h1>
Please enter a number to be checked
<form action="result.jsp" method="post">
<input type="number" name="number" >
<input type="submit" value="Check number">
</form>
</body>
</html>
This is result.jsp
String number=request.getParameter("number"); -
Floating Point Arithmatic Error
Hi,
I know actionscript represents numbers and double precision
floating point values. I'm having a problem where double arithmatic
in actionscript doesn't match the results of the same double
arithmatic in C++ / C#.
EXAMPLE:
In C++ / C#:
double x, y, x1, y1;
x = 209.4;
y = 148.8;
x1 = 203.0;
y1 = 145.0;
double ddx = x - x1;
double ddy = y - y1;
RESULT
ddx: 6.4000000000000057
ddy: 3.8000000000000114
In Flash ActionScipt 2:
var x, y, x1, y1;
x = 209.4;
y = 148.8;
x1 = 203.0;
y1 = 145.0;
var ddx = x - x1;
var ddy = y - y1;
RESULT
ddx: 6.39999999999992
ddy: 3.80000000000024
After researching Flash / Actionscript "var" stores numerical
values as doubles ( 8 bytes ) just like doubles are stored in C++ /
C# ( 8 bytes ). Why would there be a difference between the results
of ddx and ddy? Are there different implementations of double
floating point math? If so, Is there a way I can mimic the Flash /
Actionscript version in C++ / C#?
Any help would be great!
Thanks!Hmmm, so you're saying the actual binary representation is
the same but they're just displayed differently?
Maybe you are looking for
-
I've had a MacPro for just over two weeks now and in the last week I've got the "disc locked" error message three times now with iTunes. Also when I shut iTunes down the "saving library" box is there for 10 minutes+ and then I'm advised to force quit
-
My iTunes has a frozen screen, after purchasing music; how do i fix it?
What are some troubleshooting steps to unfreeze my iTunes Application, so that I can navigate and shop? It has been like this for two days and I have turned off the iPad and Wifi to hope for repair. Please, help!
-
Deploying servlet on Tomcat using "ant install" not working. Please help.
Hello. Normally I can find answers by using search, but I can't today for some reason. So please bare with me if this has been mentioned before. I will try to provide as much info as possible so that helping me isn't too much a chore. Thank you. I ha
-
HP 630 motherboard compatibility
Hello, I have might have ton replace the motherboard on my HP 630 notebook with an Intel Celeron B810 CPu and I was wondering if boards designed for Core i3/i5 CPUs would be compatible? I haven't found any good Celeron boards i online.
-
Spotlight not showing up results
Hi. I seem to have the problem that many people have had, namely that Spotlight doesn't show up all results. However, I tried the advice from all the other threads (adding/removing your main harddrive in SysPref so it reindexes) and it didn't work. A