Search Results

Search found 47805 results on 1913 pages for 'return address'.

Page 88/1913 | < Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >

  • How to Invoke iPhone Maps for Directions with Current Location as Start Address

    - by eriaac
    Hi all. I know it's possible to start the iPhone maps application by calling openURL on a google maps URL with parameters saddr and daddr with location strings or LatLong (see ex. below), but I'm wondering if it's possible to make the start address be the "Current Location" maps bookmark so that I can use the maps app's location handling code. My Google search has been pretty fruitless. ex: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat: @"http://maps.google.com/maps?saddr=%@&daddr=%@", myLatLong, latlong]]]; Except with something to invoke the current location bookmark in place of myLatLong. Thanks!

    Read the article

  • Inline assembler get address of pointer Visual Studio

    - by Joe
    I have a function in VS where I pass a pointer to the function. I then want to store the pointer in a register to further manipulate. How do you do that? I have tried void f(*p) { __asm mov eax, p // try one FAIL __asm mov eax, [p] // try two FAIL __asm mov eax, &p // try three FAIL } Both 1 and 2 are converted to the same code and load the value pointed to. I just want the address. Oddly, option 1 works just fine with integers. void f() { int i = 5; __asm mov eax, i // SUCCESS? }

    Read the article

  • Having problem reaching client which don't have static ip address

    - by user317311
    i am making a messenger over internet. it has a server which listens to clients but when it try to send the reply to any request to client it shows the error of client not found. however my clients are connecting to that server because it has a static ip address and live server. having problem reaching client because they can be behind any firewall or network and dont have static ip addresses. so how can i reach to my client?? any Suggestions..

    Read the article

  • Get a random name and number (same contact) from an iPhone users address book

    - by Sam Jarman
    Hi there, I have had only very little experience using the address book in the iPhone SDK. Does anyone have a code snippet or knows the code to get a persons name and number Eg 'Fred Smith - 027 292 2112". I haven't had much luck with the stuff I've tried. I want to achieve this programmatically, and not let the user decide (random pick of the person). I also don't want to display the contact picker either any tutorial links, or anything would be appreciated. Thanks in advance Sam

    Read the article

  • Require Integer Value not Memory Address whilst avoiding Invalid receiver type compiler warning

    - by Dave Anderson
    I have the following code; int days = [[SettingsUtils daysToRetainHistory] intValue]; [retainHistory setText:[NSString stringWithFormat:@"Days to retain History: %d", days]]; [daysToRetainHistory setValue:days animated:NO]; where [SettingsUtils daysToRetainHistory] is as follows; + (int) daysToRetainHistory { return (int)[[NSUserDefaults standardUserDefaults] objectForKey:@"CaseBaseDaysToRetainHistory"]; } I get the compiler warning Invalid receiver type 'int' because I call intValue on an int but unless I do this I can't seem to get the integer value out and always end up with the memory address i.e. 98765432 instead of 9 which ruins the UILabel display [retainHistory] and the UISlider [daysToRetainHistory] value. How do I avoid the compiler warning and still get my integer value in the label and the necessary float value for setting the UISlider value?

    Read the article

  • Address Validation API

    - by Paul
    I have a task to validate addresses entered into a system I am currently creating. The system requires that address entered are validated against a valid data source. In the UK the dataset comes from the Royal Mail and is expensive to access. The data needed is post code info for the whold of europe to start with accessed by an API into the web application. There are a number of companies that offer this service, QAS Capscan Postcode anywhere These all offer the service I require. However this is expensive and in some cases not a complete data set. e.g. not Ireland I was also wondering if there would be a way to utalis the google maps API to validate this data via postal code and country. Would the google maps method be possible or do I have to go down the line of one of these expensive companies? Any thoughts on what line I should take.

    Read the article

  • Android 2.1 address bar causes change in viewport dimensions

    - by davehumyo
    Hi, I have a page that has a 100% width and height div in it (all surrounding elements are sized accordingly so that it does actually achieve 100% width and height). Below that div I have a second div with a fixed height. In mobile safari and blackberry everything is fine, when the page loads the dimensions are applied correctly (the top div filling the viewport) and the user can scroll down to reveal the second div. Android 2.1 also applies the dimensions correctly, but with an added quirk; when the user scrolls down and removes the address bar from the page, the dimensions of the div are recalculated to fill the viewport, causing the content to jump. Ideally I would like the dimensions of the div to remain static when the page is scrolled, but remain 100% so that it will fill the viewport regardless of device size or orientation. Does anyone know of any way to disable this recalculation? Thanks for any help you can provide.

    Read the article

  • Read a file address from a txt file using netbeans c

    - by Yadira Suazo
    Hi everybody. I`m having problems reading a file address from a txt file. The information seems to be corrupted when I watch it in the debugger. The code is FILE *parch; const char * vectorparch[50]; //array with 50 file paths parch = fopen("/home/irmay/NetBeansProjects/neurona/patrones/patrones.txt", "r"); for(j=0;j<50;j++){ fread ( vectorparch, sizeof ( char ), 50, parch ); propagar(vectorparch[j]); } fclose(parch); The file with paths has 50 strings is like this: "/home/irmay/NetBeansProjects/neurona/patrones/10_0.txt","/home/..." The function propagar is declared void propagar (const char * arch1) Thank you.

    Read the article

  • apache tomcat 8 websocket origin and client address

    - by user2926082
    i hope someone can help me ... i am using apache tomcat 8.0.0-RC5 and JSR-356 web socket API ... I have 2 questions: 1) Is it possible to get the client ip on @OnOpen method ?? 2) Is it possible to get the origin of the connection ??? I followed the websocket example which comes with the distribution of tomcat and i was not able to find the answers .... My java class is basically as follow @ServerEndpoint(value = "/data.socket") public class MyWebSocket { @OnOpen public void onOpen(Session session) { // Here is where i need the origin and remote client address } @OnClose public void onClose() { // disconnection handling } @OnMessage public void onMessage(String message) { // message handling } @OnError public void onError(Session session, Throwable throwable) { // Error handling } }

    Read the article

  • How to give FTP address in java?

    - by i2ijeya
    I have written the code which downloads the file from FTP server. Since I have my FTP server locally and I want to access like "ftp://localhost/alfresco". It was alfresco's FTP. I have the following Code public class FtpTransfer { public static final void main(String[] args) { FTPClient ftp = new FTPClient(); FileOutputStream br = null; try { ftp.connect("ftp://localhost/alfresco"); ftp.login("admin", "admin"); String file = "KPUB//Admin//TMM//Pickup//TMM_TO_ARTESIA_06152010220246.xml"; br = new FileOutputStream("file"); ftp.retrieveFile("/"+file, br); System.out.println("Downloaded..."); } catch(IOException exception) { System.out.println("Error : "+exception); } } } The following exception occurs. Error : java.net.UnknownHostException: ftp://localhost/alfresco Please let me know how should I give the FTP Host Address?

    Read the article

  • Store address dynamic array in c

    - by user280642
    I'm trying to save the address of a dynamic array index. struct sstor *dlist; struct node *q; q->item = &(dlist->item[(dlist->sz)-1]); // Problem? This is my node struct node { char **item; struct node *next; struct node *prev; }; This is my array struct sstor { int sz; int maxsz; char item[][1024]; }; I'm still new to pointers. The line below gives the error: assignment from incompatible pointer type q->item = &(dlist->item[(dlist->sz)-1]);

    Read the article

  • spoof mac address

    - by Cold-Blooded
    // macaddress.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include <windows.h> #include <iostream> using namespace std; void readregistry(); void spoofmac(); void main(int argc, char* argv[]) { readregistry(); spoofmac(); } void spoofmac() { ////////////////////// ////////Write to Registry char buffer[60]; unsigned long size = sizeof(buffer); HKEY software; LPCTSTR location; char adapternum[10]=""; char numbers[11]="0123456789"; char editlocation[]="System\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002bE10318}\\0000"; char macaddress[60]; cout << "\n//////////////////////////////////////////////////////////////////\nPlease Enter Number of Network Adapter to Spoof or type 'E' to Exit.\nE.g. 18\n\nNumber: "; cin >> adapternum; if (adapternum[0]=='E') { exit(0); } if (strlen(adapternum)==2) { editlocation[strlen(editlocation)-2]=adapternum[0]; editlocation[strlen(editlocation)-1]=adapternum[1]; } if (strlen(adapternum)==1) { editlocation[strlen(editlocation)-1]=adapternum[0]; } if (strlen(adapternum)!=1 && strlen(adapternum)!=2) { cout << "Invaild Network Adapter Chosen\n\n"; exit(0); } cout << "Please Enter the Desired Spoofed Mac Address Without Dashes\nE.g. 00123F0F6D7F\n\nNew Mac: "; cin >> macaddress; location = editlocation; //error line strcpy(buffer,macaddress); size=sizeof(buffer); RegCreateKey(HKEY_LOCAL_MACHINE,location,&software); //RegSetValueEx(software,"NetworkAddress",NULL,REG_SZ,(LPBYTE)buffer,size); RegCloseKey(software); cout << "\nMac Address Successfully Spoofed.\n\nWritten by Lyth0s\n\n"; } void readregistry () { //////////////////////////////////// // Read From Registry char driver[60]=""; char mac[60]=""; char numbers[11]="0123456789"; char editlocation[]="System\\CurrentControlSet\\Control\\Class\\{4D36E972-E325-11CE-BFC1-08002bE10318}\\0000"; unsigned long driversize = sizeof(driver); unsigned long macsize = sizeof(mac); DWORD type; HKEY software; LPCTSTR location; int tenscount=0; int onescount=0; for (int x =0;x<=19; x+=1) { strcpy(driver,""); driversize=sizeof(driver); strcpy(mac,""); macsize=sizeof(mac); if (editlocation[strlen(editlocation)-1]=='9') { tenscount+=1; onescount=0; editlocation[strlen(editlocation)-2]=numbers[tenscount]; } editlocation[strlen(editlocation)-1]=numbers[onescount]; location=editlocation; //error line // cout << location << "\n"; // cout << "Checking 00" << location[strlen(location)-2] << location[strlen(location)-1] << "\n\n"; RegCreateKey(HKEY_LOCAL_MACHINE,location,&software); RegQueryValueEx(software,"DriverDesc",NULL,&type,(LPBYTE)driver,&driversize); //RegCloseKey(software); //RegCreateKey(HKEY_LOCAL_MACHINE,location,&software); RegQueryValueEx(software,"NetworkAddress",NULL,&type,(LPBYTE)mac,&macsize); RegCloseKey(software); cout << x << ": " << driver << "| Mac: " << mac << "\n"; onescount+=1; } } this program gives error as follows error C2440: '=' : cannot convert from 'char [83]' to 'LPCTSTR' why this error coming please explain

    Read the article

  • Address of instruction causing SIGSEGV in external program

    - by karramba
    I want to get address of instruction that causes external program to SIGSEGV. I tried using ptrace for this, but I'm getting EIP from kernel space (probably default signal handler?). How GDB is able to get the correct EIP? Is there a way to make GDB provide this information using some API? edit: I don't have sources of the program, only binary executable. I need automation, so I can't simply use "run", "info registers" in GDB. I want to implement "info registers" in my own mini-debugger :)

    Read the article

  • Why is address zero used for null pointer?

    - by Joel
    In C (or C++ for that matter), pointers are special if they have the value zero: I am adviced to set pointers to zero after freeing their memory, because it means freeing the pointer again isn't dangerous; when I call malloc it returns a pointer with the value zero if it can't get me memory; I use if (p != 0) all the time to make sure passed pointers are valid etc. But since memory addressing starts at 0, isn't 0 just as a valid address as any other? How can 0 be used for handling null pointers if that is the case? Why isn't a negative number null instead?

    Read the article

  • gmaps Address Component Types get country name

    - by gmapsuser
    hi .. iam trying to get the country name using the Address Component Types available from gmaps V3. i dont know how i can get it the right way.. http://code.google.com/apis/maps/documentation/javascript/services.html#GeocodingAddressTypes iam trying to alert the country name liks here : alert(results[1].address_component[country]); and here`s the code.. any help is really appreciated..thanks function codeLatLng() { var input = document.getElementById("latlng").value; var latlngStr = input.split(",",2); var lat = parseFloat(latlngStr[0]); var lng = parseFloat(latlngStr[1]); var latlng = new google.maps.LatLng(lat, lng); if (geocoder) { geocoder.geocode({'latLng': latlng}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { if (results[1]) { alert(results[1].address_component[country]); } else { alert("No results found"); } } else { alert("Geocoder failed due to: " + status); } }); } }

    Read the article

  • IP Address not obtained in java

    - by nilesh
    This code used to return my local ip address as 192.xxx.x.xxx but now it is returning 127.0.0.1 . Please help me why the same code is returning different value. Is there something that I need to watch at linux OS. import java.util.*; import java.lang.*; import java.net.*; public class GetOwnIP { public static void main(String args[]) { try{ InetAddress ownIP=InetAddress.getLocalHost(); System.out.println("IP of my system is := "+ownIP.getHostAddress()); }catch (Exception e){ System.out.println("Exception caught ="+e.getMessage()); } } }

    Read the article

  • Problem with domain getting turned to IP address for https

    - by user229133
    I have a website that is using Windows Server 2003. The site is called https://mysite.com/ and at ip address 111.1.1.1. Now when I log into the site all my relative links that are generated using NavURL (<%# NavURL("Images/Menu/img.gif")%) are saying "http://111.1.1.1/Images/Menu/img.gif" instead of "https://mysite.com/Images/Menu/img.gif". This is causing an error because it needs to be secure. I'm sure there is a setting on the server somewhere to point to the name and not the ip, but I don't know where. Thanks for your help.

    Read the article

  • Does sending mails with mail() hide the recipieints address

    - by user161179
    I am trying to build a email messaging system for a classified site ( a la craigslist), so that users can email each other. emails of registered users are stored in a database. What I want is for the recipients email address to be hidden from the sender's . If I just use the mail() function and dynamically get the recipients email from the database, will this email be visible to the person sending the mail ?? if the recipients email is indeed hidden from the sender's when using mail() this way, then why does craigslist anonymize's email ? isn't it already anonymous ? Edit: so the email won't be visible to the person filling the form. SO the question remains is why does craigslist anonymizes email addresses? and whether I should implement the same ?

    Read the article

  • x86 linux - how to create custom malloc with address hint

    - by nandu
    Hi, I want to create a custom malloc which allocates memory blocks within a given address range. I am writing a pthreads application in which threads are bound to unique cores on a many-core machine. The memory controllers are statically mapped, so that certain range of addresses on main memory are electrically closer to a core. I want to minimize the latency of communication between cores and main memory by allocating thread memory on these "closer" regions. Any ideas would be most appreciated. Thank you! Nandu

    Read the article

  • different ways of getting the IP Address

    - by Sachindra
    I was actually going through the question 1636644 .. and got confused with this " The getenv() function access to any environment variable to get the related value! " Also .. " It would probably be better to use $_SERVER['REMOTE_ADDR']; to prevent incompatibilities between servers. " what kind of compatibility issue can this be ?? Lastly, it says $_SERVER is an array with many elements but I find only the IP Address there .. does this array store anything else too??? apologies for all these questions packed in one .. this is bcoz these are all related ..

    Read the article

  • Read data from specific memory address

    - by rapid
    Hello. How can I read (and put into new variable) data stored at specific memory address? For instance I know that: <nfqueue.queue; proxy of <Swig Object of type 'queue *' at 0xabd2b00> > And I want to have data stored at 0xabd2b00 in new variable so that I can work and use all functionalities of the object. Let's assume that I don't have access to the original variable that created this object.

    Read the article

  • Library of ALL countries and their states for address forms

    - by Chris
    I need a library that includes all countries and respective codes in 1 array and a second multidimensional array for country to its states and a last array for state code to state name. I found tons of matches for similar requests but none actually have a simple CSV or XML with just that. My goal is to build an address form where you select your country and it then pre-populates the state dropdown - if the country has states - with the country's states. Shouldn't be so hard to find, but I guess i'm blind. Thanks so much for all help!

    Read the article

  • get function address from name [.debug_info ??]

    - by user361190
    Hi, I was trying to write a small debug utility and for this I need to get the function/global variable address given its name. This is built-in debug utility, which means that the debug utility will run from within the code to be debugged or in plain words I cannot parse the executable file. Now is there a well-known way to do that ? The plan I have is to make the .debug_* sections to to be loaded into to memory [which I plan to do by a cheap trick like this in ld script] .data { *(.data) __sym_start = .; (debug_); __sym_end = .; } Now I have to parse the section to get the information I need, but I am not sure this is doable or is there issues with this - this is all just theory. But it also seems like too much of work :-) is there a simple way. Or if someone can tell upfront why my scheme will not work, it ill also be helpful. Thanks in Advance, Alex.

    Read the article

  • how to change default mailed by : address in php mail()

    - by testkhan
    i have the following code $subject = "Subject Here"; $headers = 'MIME-Version: 1.0' . "\r\n"; $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n"; // Additional headers $headers .= 'From: Domain Name <[email protected]>' . "\r\n"; $to = $email; $body = ' My Message here '; mail($to, $subject, $body, $headers); and it send mail correctly but when i see details in the email in gmail ... it shows from Domain Name to [email protected] date Tue, May 25, 2010 at 12:41 PM subject my subject here mailed-by mars.myhostingcompany.net while i want to show my own address in mailed by section so that it should be mydomain.com instead of mars.myhostingcompany.net

    Read the article

  • Point of contact of 2 OBBs?

    - by Milo
    I'm working on the physics for my GTA2-like game so I can learn more about game physics. The collision detection and resolution are working great. I'm now just unsure how to compute the point of contact when I hit a wall. Here is my OBB class: public class OBB2D { private Vector2D projVec = new Vector2D(); private static Vector2D projAVec = new Vector2D(); private static Vector2D projBVec = new Vector2D(); private static Vector2D tempNormal = new Vector2D(); private Vector2D deltaVec = new Vector2D(); // Corners of the box, where 0 is the lower left. private Vector2D corner[] = new Vector2D[4]; private Vector2D center = new Vector2D(); private Vector2D extents = new Vector2D(); private RectF boundingRect = new RectF(); private float angle; //Two edges of the box extended away from corner[0]. private Vector2D axis[] = new Vector2D[2]; private double origin[] = new double[2]; public OBB2D(float centerx, float centery, float w, float h, float angle) { for(int i = 0; i < corner.length; ++i) { corner[i] = new Vector2D(); } for(int i = 0; i < axis.length; ++i) { axis[i] = new Vector2D(); } set(centerx,centery,w,h,angle); } public OBB2D(float left, float top, float width, float height) { for(int i = 0; i < corner.length; ++i) { corner[i] = new Vector2D(); } for(int i = 0; i < axis.length; ++i) { axis[i] = new Vector2D(); } set(left + (width / 2), top + (height / 2),width,height,0.0f); } public void set(float centerx,float centery,float w, float h,float angle) { float vxx = (float)Math.cos(angle); float vxy = (float)Math.sin(angle); float vyx = (float)-Math.sin(angle); float vyy = (float)Math.cos(angle); vxx *= w / 2; vxy *= (w / 2); vyx *= (h / 2); vyy *= (h / 2); corner[0].x = centerx - vxx - vyx; corner[0].y = centery - vxy - vyy; corner[1].x = centerx + vxx - vyx; corner[1].y = centery + vxy - vyy; corner[2].x = centerx + vxx + vyx; corner[2].y = centery + vxy + vyy; corner[3].x = centerx - vxx + vyx; corner[3].y = centery - vxy + vyy; this.center.x = centerx; this.center.y = centery; this.angle = angle; computeAxes(); extents.x = w / 2; extents.y = h / 2; computeBoundingRect(); } //Updates the axes after the corners move. Assumes the //corners actually form a rectangle. private void computeAxes() { axis[0].x = corner[1].x - corner[0].x; axis[0].y = corner[1].y - corner[0].y; axis[1].x = corner[3].x - corner[0].x; axis[1].y = corner[3].y - corner[0].y; // Make the length of each axis 1/edge length so we know any // dot product must be less than 1 to fall within the edge. for (int a = 0; a < axis.length; ++a) { float l = axis[a].length(); float ll = l * l; axis[a].x = axis[a].x / ll; axis[a].y = axis[a].y / ll; origin[a] = corner[0].dot(axis[a]); } } public void computeBoundingRect() { boundingRect.left = JMath.min(JMath.min(corner[0].x, corner[3].x), JMath.min(corner[1].x, corner[2].x)); boundingRect.top = JMath.min(JMath.min(corner[0].y, corner[1].y),JMath.min(corner[2].y, corner[3].y)); boundingRect.right = JMath.max(JMath.max(corner[1].x, corner[2].x), JMath.max(corner[0].x, corner[3].x)); boundingRect.bottom = JMath.max(JMath.max(corner[2].y, corner[3].y),JMath.max(corner[0].y, corner[1].y)); } public void set(RectF rect) { set(rect.centerX(),rect.centerY(),rect.width(),rect.height(),0.0f); } // Returns true if other overlaps one dimension of this. private boolean overlaps1Way(OBB2D other) { for (int a = 0; a < axis.length; ++a) { double t = other.corner[0].dot(axis[a]); // Find the extent of box 2 on axis a double tMin = t; double tMax = t; for (int c = 1; c < corner.length; ++c) { t = other.corner[c].dot(axis[a]); if (t < tMin) { tMin = t; } else if (t > tMax) { tMax = t; } } // We have to subtract off the origin // See if [tMin, tMax] intersects [0, 1] if ((tMin > 1 + origin[a]) || (tMax < origin[a])) { // There was no intersection along this dimension; // the boxes cannot possibly overlap. return false; } } // There was no dimension along which there is no intersection. // Therefore the boxes overlap. return true; } public void moveTo(float centerx, float centery) { float cx,cy; cx = center.x; cy = center.y; deltaVec.x = centerx - cx; deltaVec.y = centery - cy; for (int c = 0; c < 4; ++c) { corner[c].x += deltaVec.x; corner[c].y += deltaVec.y; } boundingRect.left += deltaVec.x; boundingRect.top += deltaVec.y; boundingRect.right += deltaVec.x; boundingRect.bottom += deltaVec.y; this.center.x = centerx; this.center.y = centery; computeAxes(); } // Returns true if the intersection of the boxes is non-empty. public boolean overlaps(OBB2D other) { if(right() < other.left()) { return false; } if(bottom() < other.top()) { return false; } if(left() > other.right()) { return false; } if(top() > other.bottom()) { return false; } if(other.getAngle() == 0.0f && getAngle() == 0.0f) { return true; } return overlaps1Way(other) && other.overlaps1Way(this); } public Vector2D getCenter() { return center; } public float getWidth() { return extents.x * 2; } public float getHeight() { return extents.y * 2; } public void setAngle(float angle) { set(center.x,center.y,getWidth(),getHeight(),angle); } public float getAngle() { return angle; } public void setSize(float w,float h) { set(center.x,center.y,w,h,angle); } public float left() { return boundingRect.left; } public float right() { return boundingRect.right; } public float bottom() { return boundingRect.bottom; } public float top() { return boundingRect.top; } public RectF getBoundingRect() { return boundingRect; } public boolean overlaps(float left, float top, float right, float bottom) { if(right() < left) { return false; } if(bottom() < top) { return false; } if(left() > right) { return false; } if(top() > bottom) { return false; } return true; } public static float distance(float ax, float ay,float bx, float by) { if (ax < bx) return bx - ay; else return ax - by; } public Vector2D project(float ax, float ay) { projVec.x = Float.MAX_VALUE; projVec.y = Float.MIN_VALUE; for (int i = 0; i < corner.length; ++i) { float dot = Vector2D.dot(corner[i].x,corner[i].y,ax,ay); projVec.x = JMath.min(dot, projVec.x); projVec.y = JMath.max(dot, projVec.y); } return projVec; } public Vector2D getCorner(int c) { return corner[c]; } public int getNumCorners() { return corner.length; } public static float collisionResponse(OBB2D a, OBB2D b, Vector2D outNormal) { float depth = Float.MAX_VALUE; for (int i = 0; i < a.getNumCorners() + b.getNumCorners(); ++i) { Vector2D edgeA; Vector2D edgeB; if(i >= a.getNumCorners()) { edgeA = b.getCorner((i + b.getNumCorners() - 1) % b.getNumCorners()); edgeB = b.getCorner(i % b.getNumCorners()); } else { edgeA = a.getCorner((i + a.getNumCorners() - 1) % a.getNumCorners()); edgeB = a.getCorner(i % a.getNumCorners()); } tempNormal.x = edgeB.x -edgeA.x; tempNormal.y = edgeB.y - edgeA.y; tempNormal.normalize(); projAVec.equals(a.project(tempNormal.x,tempNormal.y)); projBVec.equals(b.project(tempNormal.x,tempNormal.y)); float distance = OBB2D.distance(projAVec.x, projAVec.y,projBVec.x,projBVec.y); if (distance > 0.0f) { return 0.0f; } else { float d = Math.abs(distance); if (d < depth) { depth = d; outNormal.equals(tempNormal); } } } float dx,dy; dx = b.getCenter().x - a.getCenter().x; dy = b.getCenter().y - a.getCenter().y; float dot = Vector2D.dot(dx,dy,outNormal.x,outNormal.y); if(dot > 0) { outNormal.x = -outNormal.x; outNormal.y = -outNormal.y; } return depth; } public Vector2D getMoveDeltaVec() { return deltaVec; } }; Thanks!

    Read the article

< Previous Page | 84 85 86 87 88 89 90 91 92 93 94 95  | Next Page >