Search Results

Search found 3855 results on 155 pages for 'ipad orientation'.

Page 76/155 | < Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >

  • How to do orientation rotation like built-in Calc app?

    - by Ray Wenderlich
    I'm trying to make an app that handles orientation/rotation similarly to the way the built-in Calc app does. If you check out that app, in portrait mode there's a normal calculator, and if you rotate to landscape mode there are additional buttons that appear to the left. I can't figure out how to do this by setting the autosize masks. The problem is the "normal" calculator view is 320px wide in portrait mode, but actually shrinks to around 240px in landscape mode to fit the additional controls. I've seen examples like the AlternateViews sample app that have two different view controllers (one for portrait and one for landscape), but they don't seem to animate the transitions between the views nicely like the Calc app does. I've also tried setting the frames for the views manually in willAnimateSecondHalfOfRotationFromInterfaceOrientation, but it doesn't seem to look "quite right" and also I'm not certain how that works with the autoresize mask. Any ideas how this is done? Thanks!

    Read the article

  • How can I dual boot my iphone or ipad to run a very simple custom os?

    - by Jim98
    I am an experienced C/C++ programmer and have worked with assembly and many other programing language and I want to start a project as a learning process. I want to try and run a simple custom os on the iphone or ipad. What knowledge would I need to do this, and how does the iphone or ipad bootloader load the os and how could I modify it to load a custom os? Im not really sure what to ask here so I really just need to get as much information as possible so I could ask some more informed questions to get my project started Thanks

    Read the article

  • Why does my UI controls work on iPhone but not iPad?

    - by Andrew
    I have an iPhone app, which consists of a table view containing various custom UITableViewCells, with UISlider and UISwitch controls. When running the app on the iphone, I can move the slider and switches contained in each of the table cells. When I run the same app on the iPad. I can not. None of the controls within the table view will respond to touches. I have checked 'User Interaction Enabled' within the Interface Builder. Anybody got any suggestions of where I should be looking for the cause of different behavior between the iPhone and iPad, in respect to UIControls.

    Read the article

  • Quaternion Camera

    - by Alex_Hyzer_Kenoyer
    Can someone help me figure out how to use a Quaternion with the PerspectiveCamera in libGDX or in general? I am trying to rotate my camera around a sphere that is being drawn at (0,0,0). I am not sure how to go about setting up the quaternion correctly, manipulating it, and then applying it to the camera. Edit: Here is what I have tried to do so far. // This is how I set it up Quaternion orientation = new Quaternion(); orientation.setFromAxis(Vector3.Y, 45); // This is how I am trying to update the rotations public void rotateX(float amount) { Quaternion temp = new Quaternion(); temp.set(Vector3.X, amount); orientation.mul(temp); } public void rotateY(float amount) { Quaternion temp = new Quaternion(); temp.set(Vector3.Y, amount); orientation.mul(temp); } public void updateCamera() { // This is where I am unsure how to apply the rotations to the camera // I think I should update the view and projection matrices? camera.view.mul(orientation); ... }

    Read the article

  • How to prevent creation of monitors.xml?

    - by user222723
    I'm using Ubuntu on a tablet and have a problem with the screen rotation, which I can fix by removing ~/.config/monitors.xml, but sadly every time I rotate the screen a new monitors.xml is created. Is there any way to prevent this? I already tried to create an empty file with the same name as root but it was still overwritten after rotating the screen. Edit: I think I finally found the reason for the problem. Everytime the orientation is changed the new orientation is saved in monitors.xml while the original monitors.xml is saved as monitors.xml.backup. By playing around with chattr I found out that this causes Ubuntu to try to restore monitors.xml out of monitors.xml.backup after every login. So if I turn the screen to the left and then back to normal monitors.xml says "orientation=normal" and monitors.xml.backup says "orientation=left". After the login Ubuntu overwrites monitors.xml with the backup and uses its configuration and turns the screen to the left.

    Read the article

  • How to create an Universal Binary for iTunes Connect Distribution?

    - by balexandre
    I created an app that was rejected because Apple say that my App was not showing the correct iPad window and it was showing the same iPhone screen but top left aligned. Running on simulator, I get my App to show exactly what it should, a big iPad View. my app as Apple referees that is showing on device: my app running the simulator (50% zoom only): my code in the Application Delegate is the one I published before - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // The default have the line below, let us comment it //MainViewController *aController = [[MainViewController alloc] initWithNibName:@"MainView" bundle:nil]; // Our main controller MainViewController *aController = nil; // Is this OS 3.2.0+ ? #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 30200 if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) // It's an iPad, let's set the MainView to our MainView-iPad aController = [[MainViewController alloc] initWithNibName:@"MainView-iPad" bundle:nil]; else // This is a 3.2.0+ but not an iPad (for future, when iPhone/iPod Touch runs with same OS than iPad) aController = [[MainViewController alloc] initWithNibName:@"MainView" bundle:nil]; #else // It's an iPhone/iPod Touch (OS < 3.2.0) aController = [[MainViewController alloc] initWithNibName:@"MainView" bundle:nil]; #endif // Let's continue our default code self.mainViewController = aController; [aController release]; mainViewController.view.frame = [UIScreen mainScreen].applicationFrame; [window addSubview:[mainViewController view]]; [window makeKeyAndVisible]; return YES; } on my target info I have iPhone/iPad My question is, how should I build the app? Use Base SDK iPhone Simulator 3.1.3 iPhone Simulator 3.2 my Active Configuration is Distribution and Active Architecture is arm6 Can anyone that already published app into iTunes Connect explain me the settings? P.S. I followed the Developer Guideline on Building and Installing your Development Application that is found on Creating and Downloading Development Provisioning Profiles but does not say anything regarding this, as I did exactly and the app was rejected.

    Read the article

  • How to set up a local webDAV server for use with Goodreader on the ipad?

    - by confused-about-webdav
    I need to know how to set up a local webDav server on my PC so that goodreader on ipad can automatically sync with it over the local wifi network? I am really a rookie when it comes to setting up a web server and have tried various guides on the internet. I tried setting up a webdav server using IIS and forwarded the required ports and enabled webdav publishing but goodreader can find it in the local wifi network automatically nor is it able to connect even after manually entering the credendtials. So i'll be really greateful if someone who has successfully setup a webdav server for use with goodreader can point me on how to do it?

    Read the article

  • Forcing UIInterfaceOrientation changes on iPhone

    - by Andiih
    I'm strugging with getting an iPhone application which requires just about every push or pop in the Nav Controller Stack to change orientation. Basically the first view is portrait, the second landscape the third portrait again (Yes I know this is less than ideal, but that's the design and I've got to implement it). I've been through various advice on here.... http://stackoverflow.com/questions/995723/how-do-i-detect-a-rotation-on-the-iphone-without-the-device-autorotating http://stackoverflow.com/questions/1824682/force-portrait-orientation-on-pushing-new-view-to-uinavigationviewcontroller http://stackoverflow.com/questions/181780/is-there-a-documented-way-to-set-the-iphone-orientation But without total success. Setting to link against 3.1.2 my reading of the linked articles above seems to indicate that if my portrait view pushes a view with - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { // Return YES for supported orientations return ((interfaceOrientation == UIInterfaceOrientationLandscapeRight) ); } Then then that view should appear rotated to landscape. What happens is it appears in its "broken" portrait form, then rotates correctly as the device is turned. If I pop the controller back to my portrait view (which has an appropriate shouldAutoRotate...) then that remains in broken landscape view until the device is returned to portrait orientation. I've also tried removing all the shouldautorotate messages, and instead forcing rotation by transforming the view. This kind of works, and I've figured out that by moving the status bar (which is actually hidden in my application) [UIApplication sharedApplication].statusBarOrientation = UIInterfaceOrientationLandscapeRight; the keyboard will appear with the correct orientation when desired. The problem with this approach is that the status bar transform is weird and ugly when you don't have a status bar - a shadow looms over the page with each change. So. What am I missing. 1) Am I wrong in thinking that in 3.1.2 (or possibly earlier) shouldAutorotateToInterfaceOrientation should provide the desired orientation simply by pushing controllers ? 2) Is there another way of getting keyboards to appear in the correct orientation. 3) Are the undocumented API calls the way to go (please no!)

    Read the article

  • OpenGL ES, UIView and Status Bar mess

    - by sfider
    I have iPhone (iPhoneOS 3.x) OpenGL ES app that: can be in landscape/portrait orientation can be with/without status bar shown I do this by changing status bar orientation and hidden state, then updating OpenGL view frame so it won't overlap status bar and setting projection matrix appropriately. OpenGL view is in portrait orientation at all time. View controller's shouldAutorotateToInterfaceOrientation: method returns false always, so the status bar won't start autorotating when app is in landscape mode. The problem I have is that I want to use some other UIViews, like: UIWebView, MFMailComposeView, MPMediaPicker. I could show them as modals, but this this have some drawbacks: views will always show in portrait orientation, even if they support landscape orientation views will not autorotate, even if they support it What I do is I take OpenGL view of the window with removeFromSuperview, set transform to the other view so it will be in portrait/landscape orientation when it shows up and place the other view on the window with addSubview:. This works fine without the status bar, but with it there are some problems I cannot work out: MPMediaPicker is sized to fit under status bar, but it slides under it anyway MFMailComposeView does not show navigation bar until it autorotates on device orientation change Does anyone has an idea how can I get it to work?

    Read the article

  • How to access XAMPP virtual hosts from iPad on local network?

    - by martin's
    Using XAMPP on one machine. Multiple virtual hosts defined. One per project. Format is .local For example: apple.local microsoft.local client-site.local our-own-internal-site.local All works perfectly from that one machine. I now want to have other systems within the network access the various sites. The main reason for wanting to do this is to be able to test site functionality and layout from mobile devices without having to upload partial work to public servers. I can access the main XAMPP default site by simply entering the IP address of the XAMPP machine in, say, Safari on an iPad. However, there is no way to reach .local that I can see. Would this entail setting up a DNS server within the network? We have a mixture of Windows and Mac machines. No Linux. The XAMPP machine is Vista 64. I don't want real external internet access to be affected in any way, just ".local" pointed to the XAMPP machine if that makes sense.

    Read the article

  • jQuery - draggable images on iPad / iPhone - how to integrate event.preventDefault();?

    - by Tim
    Hello! I use jQuery, jQuery UI and jQuery mobile to build a web application for iPhone / iPad. Now I create images and they should be draggable, so I did this: <!DOCTYPE html> <html> <head> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <title>Drag - Test</title> <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.css" /> <script src="http://code.jquery.com/jquery-1.4.4.min.js"></script> <script src="http://code.jquery.com/mobile/1.0a2/jquery.mobile-1.0a2.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.7/jquery-ui.min.js"></script> </head> <body> <div> <div style="width:500px;height:500px;border:1px solid red;"> <img src="http://upload.wikimedia.org/wikipedia/en/thumb/9/9e/JQuery_logo.svg/200px-JQuery_logo.svg.png" class="draggable" alt="jQuery logo" /> <img src="http://upload.wikimedia.org/wikipedia/en/a/ab/Apple-logo.png" class="draggable" alt="Apple Inc. logo" /> </div> </div> </body> <script type="text/javascript"> $(document).ready(function() { $(".draggable").draggable(); }); </script> </html> Here you can see the live example: http://jsbin.com/igena4/ The problem is, that the whole page want to scroll. I searched in Apple's HTML5 examples and found this to prevent the scrolling of the page, so that the image is draggable: ... onDragStart: function(event) { // stop page from panning on iPhone/iPad - we're moving a note, not the page event.preventDefault(); ... } But the problem is for me, how can I include this into my jQuery? Where do I get event? Best Regards.

    Read the article

  • Is the iPhone/iPad delete "badge" available via the SDK?

    - by skantner
    I am creating an app with thumbnail views of my content. I would like to put a "delete" badge in the upper left corner of each thumbnail like the one you see either when deleting apps from the iphone/ipad home screen. It is typically a black circle with an 'X' inside. Is this a badge or image file made available somehow through the SDK? //Scott

    Read the article

  • How to upload a file with JQueryMobile for an iphone/ipad?

    - by JD
    Hi, I have just started looking at JqueryMobile and want to know if the following is possible? I want to be able to select a file (similar to in html) and then show some sort of dialogue that allows me to browse to a "folder" and select the file. It would then be up to me to send some sort of AJAX command to upload it to the server (where I am using Asp.net MVC 2) Since I do not have access to an iPhone or iPad, I was told that I would only have access to the documents folder. JD

    Read the article

  • Metro: Understanding CSS Media Queries

    - by Stephen.Walther
    If you are building a Metro style application then your application needs to look great when used on a wide variety of devices. Your application needs to work on tiny little phones, slates, desktop monitors, and the super high resolution displays of the future. Your application also must support portable devices used with different orientations. If someone tilts their phone from portrait to landscape mode then your application must still be usable. Finally, your Metro style application must look great in different states. For example, your Metro application can be in a “snapped state” when it is shrunk so it can share screen real estate with another application. In this blog post, you learn how to use Cascading Style Sheet media queries to support different devices, different device orientations, and different application states. First, you are provided with an overview of the W3C Media Query recommendation and you learn how to detect standard media features. Next, you learn about the Microsoft extensions to media queries which are supported in Metro style applications. For example, you learn how to use the –ms-view-state feature to detect whether an application is in a “snapped state” or “fill state”. Finally, you learn how to programmatically detect the features of a device and the state of an application. You learn how to use the msMatchMedia() method to execute a media query with JavaScript. Using CSS Media Queries Media queries enable you to apply different styles depending on the features of a device. Media queries are not only supported by Metro style applications, most modern web browsers now support media queries including Google Chrome 4+, Mozilla Firefox 3.5+, Apple Safari 4+, and Microsoft Internet Explorer 9+. Loading Different Style Sheets with Media Queries Imagine, for example, that you want to display different content depending on the horizontal resolution of a device. In that case, you can load different style sheets optimized for different sized devices. Consider the following HTML page: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>U.S. Robotics and Mechanical Men</title> <link href="main.css" rel="stylesheet" type="text/css" /> <!-- Less than 1100px --> <link href="medium.css" rel="stylesheet" type="text/css" media="(max-width:1100px)" /> <!-- Less than 800px --> <link href="small.css" rel="stylesheet" type="text/css" media="(max-width:800px)" /> </head> <body> <div id="header"> <h1>U.S. Robotics and Mechanical Men</h1> </div> <!-- Advertisement Column --> <div id="leftColumn"> <img src="advertisement1.gif" alt="advertisement" /> <img src="advertisement2.jpg" alt="advertisement" /> </div> <!-- Product Search Form --> <div id="mainContentColumn"> <label>Search Products</label> <input id="search" /><button>Search</button> </div> <!-- Deal of the Day Column --> <div id="rightColumn"> <h1>Deal of the Day!</h1> <p> Buy two cameras and get a third camera for free! Offer is good for today only. </p> </div> </body> </html> The HTML page above contains three columns: a leftColumn, mainContentColumn, and rightColumn. When the page is displayed on a low resolution device, such as a phone, only the mainContentColumn appears: When the page is displayed in a medium resolution device, such as a slate, both the leftColumn and the mainContentColumns are displayed: Finally, when the page is displayed in a high-resolution device, such as a computer monitor, all three columns are displayed: Different content is displayed with the help of media queries. The page above contains three style sheet links. Two of the style links include a media attribute: <link href="main.css" rel="stylesheet" type="text/css" /> <!-- Less than 1100px --> <link href="medium.css" rel="stylesheet" type="text/css" media="(max-width:1100px)" /> <!-- Less than 800px --> <link href="small.css" rel="stylesheet" type="text/css" media="(max-width:800px)" /> The main.css style sheet contains default styles for the elements in the page. The medium.css style sheet is applied when the page width is less than 1100px. This style sheet hides the rightColumn and changes the page background color to lime: html { background-color: lime; } #rightColumn { display:none; } Finally, the small.css style sheet is loaded when the page width is less than 800px. This style sheet hides the leftColumn and changes the page background color to red: html { background-color: red; } #leftColumn { display:none; } The different style sheets are applied as you stretch and contract your browser window. You don’t need to refresh the page after changing the size of the page for a media query to be applied: Using the @media Rule You don’t need to divide your styles into separate files to take advantage of media queries. You can group styles by using the @media rule. For example, the following HTML page contains one set of styles which are applied when a device’s orientation is portrait and another set of styles when a device’s orientation is landscape: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>Application1</title> <style type="text/css"> html { font-family:'Segoe UI Semilight'; font-size: xx-large; } @media screen and (orientation:landscape) { html { background-color: lime; } p.content { width: 50%; margin: auto; } } @media screen and (orientation:portrait) { html { background-color: red; } p.content { width: 90%; margin: auto; } } </style> </head> <body> <p class="content"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. </p> </body> </html> When a device has a landscape orientation then the background color is set to the color lime and the text only takes up 50% of the available horizontal space: When the device has a portrait orientation then the background color is red and the text takes up 90% of the available horizontal space: Using Standard CSS Media Features The official list of standard media features is contained in the W3C CSS Media Query recommendation located here: http://www.w3.org/TR/css3-mediaqueries/ Here is the official list of the 13 media features described in the standard: · width – The current width of the viewport · height – The current height of the viewport · device-width – The width of the device · device-height – The height of the device · orientation – The value portrait or landscape · aspect-ratio – The ratio of width to height · device-aspect-ratio – The ratio of device width to device height · color – The number of bits per color supported by the device · color-index – The number of colors in the color lookup table of the device · monochrome – The number of bits in the monochrome frame buffer · resolution – The density of the pixels supported by the device · scan – The values progressive or interlace (used for TVs) · grid – The values 0 or 1 which indicate whether the device supports a grid or a bitmap Many of the media features in the list above support the min- and max- prefix. For example, you can test for the min-width using a query like this: (min-width:800px) You can use the logical and operator with media queries when you need to check whether a device supports more than one feature. For example, the following query returns true only when the width of the device is between 800 and 1,200 pixels: (min-width:800px) and (max-width:1200px) Finally, you can use the different media types – all, braille, embossed, handheld, print, projection, screen, speech, tty, tv — with a media query. For example, the following media query only applies to a page when a page is being printed in color: print and (color) If you don’t specify a media type then media type all is assumed. Using Metro Style Media Features Microsoft has extended the standard list of media features which you can include in a media query with two custom media features: · -ms-high-contrast – The values any, black-white, white-black · -ms-view-state – The values full-screen, fill, snapped, device-portrait You can take advantage of the –ms-high-contrast media feature to make your web application more accessible to individuals with disabilities. In high contrast mode, you should make your application easier to use for individuals with vision disabilities. The –ms-view-state media feature enables you to detect the state of an application. For example, when an application is snapped, the application only occupies part of the available screen real estate. The snapped application appears on the left or right side of the screen and the rest of the screen real estate is dominated by the fill application (Metro style applications can only be snapped on devices with a horizontal resolution of greater than 1,366 pixels). Here is a page which contains style rules for an application in both a snap and fill application state: <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>MyWinWebApp</title> <style type="text/css"> html { font-family:'Segoe UI Semilight'; font-size: xx-large; } @media screen and (-ms-view-state:snapped) { html { background-color: lime; } } @media screen and (-ms-view-state:fill) { html { background-color: red; } } </style> </head> <body> <p class="content"> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Maecenas porttitor congue massa. Fusce posuere, magna sed pulvinar ultricies, purus lectus malesuada libero, sit amet commodo magna eros quis urna. </p> </body> </html> When the application is snapped, the application appears with a lime background color: When the application state is fill then the background color changes to red: When the application takes up the entire screen real estate – it is not in snapped or fill state – then no special style rules apply and the application appears with a white background color. Querying Media Features with JavaScript You can perform media queries using JavaScript by taking advantage of the window.msMatchMedia() method. This method returns a MSMediaQueryList which has a matches method that represents success or failure. For example, the following code checks whether the current device is in portrait mode: if (window.msMatchMedia("(orientation:portrait)").matches) { console.log("portrait"); } else { console.log("landscape"); } If the matches property returns true, then the device is in portrait mode and the message “portrait” is written to the Visual Studio JavaScript Console window. Otherwise, the message “landscape” is written to the JavaScript Console window. You can create an event listener which triggers code whenever the results of a media query changes. For example, the following code writes a message to the JavaScript Console whenever the current device is switched into or out of Portrait mode: window.msMatchMedia("(orientation:portrait)").addListener(function (mql) { if (mql.matches) { console.log("Switched to portrait"); } }); Be aware that the event listener is triggered whenever the result of the media query changes. So the event listener is triggered both when you switch from landscape to portrait and when you switch from portrait to landscape. For this reason, you need to verify that the matches property has the value true before writing the message. Summary The goal of this blog entry was to explain how CSS media queries work in the context of a Metro style application written with JavaScript. First, you were provided with an overview of the W3C CSS Media Query recommendation. You learned about the standard media features which you can query such as width and orientation. Next, we focused on the Microsoft extensions to media queries. You learned how to use –ms-view-state to detect whether a Metro style application is in “snapped” or “fill” state. You also learned how to use the msMatchMedia() method to perform a media query from JavaScript.

    Read the article

  • Programming Language? - To create a application (eLearning course) that will work on PC, Mac, iPhone, iPad, Touch etc?

    - by Josh
    Hi Currently at work I'm helping put together and create eLearning courses within Flash. Our senior programmers have knowledge of how to do this, Although - I would like to know how you could go from converting a eLearning course from Flash into a application for Mac and PC, looking similar to Garageband's music lessons? What programming language was used to create Garageband on Mac? What is the best way to create a application that will work on PC, Mac, iPhone, iPad, Touch etc, Rather then using flash and Actionscript to create online based applications, that will only work in a browser on Mac and PC? Any further tips? Thanks Josh

    Read the article

  • Quaternion Camera Orbiting around a Sphere

    - by jessejuicer
    Background: I'm trying to create a game where the camera is always rotating around a single sphere. I'm using the DirectX D3DX math functions in C++ on Windows. The Problem: I cannot get both the camera position and orientation both working properly at the same time. Either one works but not both together. Here's the code for my quaternion camera that revolves around a sphere, always looking at the centerpoint of the sphere, ... as far as I understand it (but which isn't working properly): (I'm only going to present rotation around the X axis here, to simplify this post) Whenever the UP key is pressed or held down, the camera should rotate around the X axis, while looking at the centerpoint of the sphere (which is at 0,0,0 in the world). So, I build a quaternion that represents a small angle of rotation around the x axis like this (where 'deltaAngle' is a small enough number for a slow rotation): D3DXVECTOR3 rotAxis; D3DXQUATERNION tempQuat; tempQuat.x = 0.0f; tempQuat.y = 0.0f; tempQuat.z = 0.0f; tempQuat.w = 1.0f; rotAxis.x = 1.0f; rotAxis.y = 0.0f; rotAxis.z = 0.0f; D3DXQuaternionRotationAxis(&tempQuat, &rotAxis, deltaAngle); ...and I accumulate the result into the camera's current orientation quat, like this: D3DXQuaternionMultiply(&cameraOrientationQuat, &cameraOrientationQuat, &tempQuat); ...which all works fine. Now I need to build a view matrix to pass to DirectX SetTransform function. So I build a rotation matrix from the camera orientation quat as follows: D3DXMATRIXA16 rotationMatrix; D3DXMatrixIdentity(&rotationMatrix); D3DXMatrixRotationQuaternion(&rotationMatrix, &cameraOrientationQuat); ...Now (as seen below) if I just transpose that rotationMatrix and plug it into the 3x3 section of the view matrix, then negate the camera's position and plug it into the translation section of the view matrix, the rotation magically works. Perfectly. (even when I add in rotations for all three axes). There's no gimbal lock, just a smooth rotation all around in any direction. BUT- this works even though I never change the camera's position. At all. Which sorta blows my mind. I even display the camera position and can watch it stay constant at it's starting point (0.0, 0.0, -4000.0). It never moves, but the rotation around the sphere is perfect. I don't understand that. For proper view rotation, the camera position should be revolving around the sphere. Here's the rest of building the view matrix (I'll talk about the commented code below). Note that the camera starts out at (0.0, 0.0, -4000.0) and m_camDistToTarget is 4000.0: /* D3DXVECTOR3 vec1; D3DXVECTOR4 vec2; vec1.x = 0.0f; vec1.y = 0.0f; vec1.z = -1.0f; D3DXVec3Transform(&vec2, &vec1, &rotationMatrix); g_cameraActor->pos.x = vec2.x * g_cameraActor->m_camDistToTarget; g_cameraActor->pos.y = vec2.y * g_cameraActor->m_camDistToTarget; g_cameraActor->pos.z = vec2.z * g_cameraActor->m_camDistToTarget; */ D3DXMatrixTranspose(&g_viewMatrix, &rotationMatrix); g_viewMatrix._41 = -g_cameraActor->pos.x; g_viewMatrix._42 = -g_cameraActor->pos.y; g_viewMatrix._43 = -g_cameraActor->pos.z; g_viewMatrix._44 = 1.0f; g_direct3DDevice9->SetTransform( D3DTS_VIEW, &g_viewMatrix ); ...(The world matrix is always an identity, and the perspective projection works fine). ...So, without the commented code being compiled, the rotation works fine. But to be proper, for obvious reasons, the camera position should be rotating around the sphere, which it currently is not. That's what the commented code is supposed to do. And when I add in that chunk of code to do that, and look at all the data as I hold the keys down (using UP, DOWN, LEFT, RIGHT to rotate different directions) all the values look correct! The camera position is rotating around the sphere just fine, and I can watch that happen visually too. The problem is that the camera orientation does not lookat the center of the sphere. It always looks straight forward down the z axis (toward positive z) as it revolves around the sphere. Yet the values of both the rotation matrix and the view matrix seem to be behaving correctly. (The view matrix orientation is the same as the rotation matrix, just transposed). For instance if I just hold down the key to spin around the x axis, I can watch the values of the three axes represented in the view matrix (x, y, and z axes)... view x-axis stays at (1.0, 0.0, 0.0), and view y-axis and z-axis both spin around the x axis just fine. All the numbers are changing as they should be... well, almost. As far as I can tell, the position of the view matrix is spinning around the sphere one direction (like clockwise), and the orientation (the axes in the view matrix) are spinning the opposite direction (like counter-clockwise). Which I guess explains why the orientation appears to stay straight ahead. I know the position is correct. It revolves properly. It's the orientation that's wrong. Can anyone see what am I doing wrong? Am I using these functions incorrectly? Or is my algorithm flawed? As usual I've been combing my code for simple mistakes for many hours. I'm willing to post the actual code, and a video of the behavior, but that will take much more effort. Thought I'd ask this way first.

    Read the article

  • Specs, Form and Function – What am I Missing?

    - by Barry Shulam
    0 0 1 628 3586 08041 29 8 4206 14.0 Normal 0 false false false EN-US JA X-NONE /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:12.0pt; font-family:Cambria; mso-ascii-font-family:Cambria; mso-ascii-theme-font:minor-latin; mso-hansi-font-family:Cambria; mso-hansi-theme-font:minor-latin;} Friday October 26th the Microsoft Surface RT arrived at the office.  I was summoned to my boss’s office for the grand unpacking.  If I had planned ahead I could have used my iPhone 4 to film the event and post it on YouTube however the desire to hold the device and turn it ON was more inviting than becoming a proxy reviewer for Engadget’s website.  1980 was the first time we had a personal computer in our house.  It was a  Kaypro computer. It weighed 29 pounds more than any persons lap could hold.  Then the term “portable computer” meant you could remove it from the building and take it else where.  Today I am typing on this entry on a Macbook Air which weighs 2.38 pounds. This morning Amazons front page main title is: “Much More for Much Less” I was born at the right time to start with the CPM operating system on the Kaypro thru the DOS, Windows, Linux, Mac OSX and mobile phone operating systems and languages.  If you are not aware Technology is moving at a rapid pace.  The New iPad (those who are keeping score – iPad4) is replacing a 7 month old machine the New iPad (iPad 3) I have used and owned many technology devices in my life.  The main point that most of the reader who are in the USA overlook is the fact that we are in the USA.  The devices we purchase have a great digital garden to support them.  The Kaypro computer had a 7-inch screen.  It was a TV tube with two colors – Black and Green.  You could see the 80-column screen flicker with characters – have you every played Pac-Man emulated on the screen with the ABC characters. Traveling across the world you will find that not all apps on your device will function as they did back home because they are not offered outside of your country of origin. I think the main question a buyer of technology should be asking is Function.  The greatest Specs with out function limit you.  The most beautiful form with out function is the same as a crystal vase on your shelf – not a good cereal bowl in the morning. Microsoft Surface RT, Amazon Kindle Fire and Apple iPad all great devices in their respective customers hands. My advice for those looking to purchase on this year:  If the device is your only technology device you buy what you WANT and LIKE. Consider this parallel universe if its not your only device?  Ever go shopping for clothing, shoes, and accessories with your wife, girlfriend, sister or mother?  If you listen carefully you will hear the little voices coming out of there heads saying:  “This goes well with that and I can use it also with that outfit” ”Do you think this clashes with that?”  “Ohh I love how that combination looks on you”.  Portable devices such as tablets and computers can offer a whole lot more when they are combined with the digital echo system you have at home and the manufacturer offers online. Pros of each Device: Microsoft Surface RT: There is a new functionality named SmartGlass which will let you share the content off your tablet to your XBOX 360.  Microsoft office is loaded on the tablet.  You can have more than one user profile on the tablet if you share it with others.   Amazon Kindle or Kindle HD: If you are an Amazon consumer with an annual Amazon Prime service you can consume videos and read books off the Amazon site.  Its the cheapest device.  Its a step up from the kindle reader in many ways.   Apple Ipad or Ipad mini: Over 270 Thousand applications.  Airplay permits you the ability to share to your TV screen. If you are a cord cutter (a person who gets their entertainment content over the web or air vs Cable Providers) the Airplay or Smart glass are a huge bonus.  iPad mini or not: The mini will fit in a purse where the larger one will not.  Its lighter which makes it nice to hold for prolonged periods.  It has an option for LTE wireless which non of the other sub 9 inch tables offer.  The screen is non retina which means the applications are smaller.  Speaking with individuals who are above 50 in age that wear glasses they retina does not make a difference for them however they prefer the larger iPad over the new mini.   Happy Shopping this Channuka Season.   The Kosher Coder.   Follow me on twitter @KosherCoder

    Read the article

  • Security &amp; Dev Opinions needed for 2013 Global Information Security Workforce study and have a chance to win an Ipad!

    - by SoftwareSecurity
    You have the opportunity to help guide the security profession world wide with your opinions and experiences by taking part in the 2013 edition of (ISC)2 Global Information Security Workforce Study and have the chance to win an Ipad!  This study will provide an understanding about upcoming trends, technologies, and visions that as technology professional you will be able to provide invaluable understanding.  The study is being conducted by Frost & Sullivan.  You can participate in the study by clicking here.  Read the last study that was conducted in 2011 and provided tremendous insight into upcoming Trends.  Software developers are encouraged to respond!

    Read the article

< Previous Page | 72 73 74 75 76 77 78 79 80 81 82 83  | Next Page >