• MacTech Network:
  • Tech Support
  • |
  • MacForge.net
  • |
  • Apple News
  • |
  • Register Domains
  • |
  • SSL Certificates
  • |
  • iPod Deals
  • |
  • Mac Deals
  • |
  • Mac Book Shelf

MAC TECH

  • Home
  • Magazine
    • About MacTech in Print
    • Issue Table of Contents
    • Subscribe
    • Risk Free Sample
    • Back Issues
    • MacTech DVD
  • Archives
    • MacTech Print Archives
    • MacMod
    • MacTutor
    • FrameWorks
    • develop
  • Forums
  • News
    • MacTech News
    • MacTech Blog
    • MacTech Reviews and KoolTools
    • Whitepapers, Screencasts, Videos and Books
    • News Scanner
    • Rumors Scanner
    • Documentation Scanner
    • Submit News or PR
    • MacTech News List
  • Store
  • Apple Expo
    • by Category
    • by Company
    • by Product
  • Job Board
  • Editorial
    • Submit News or PR
    • Writer's Kit
    • Editorial Staff
    • Editorial Calendar
  • Advertising
    • Benefits of MacTech
    • Mechanicals and Submission
    • Dates and Deadlines
    • Submit Apple Expo Entry
  • User
    • Register for Ongoing Raffles
    • Register new user
    • Edit User Settings
    • Logout
  • Contact
    • Customer Service
    • Webmaster Feedback
    • Submit News or PR
    • Suggest an article
  • Connect Tools
    • MacTech Live Podcast
    • RSS Feeds
    • Twitter

LETTERS

GAME OUT OF CONTROL
When running the code from Philip McBride's article "Game Controls for QuickDraw 3D" in Issue 27 of develop, I noticed in MySetCameraData that the call to Q3Camera_SetPlacement gets fouled up after a while. The fix shown below was needed.

void MyGetCameraData( 
    DocumentPtr theDocument,
    TQ3CameraObject theCamera)
{
    TQ3CameraPlacement cameraPlacement;
    ...
    Q3Vector3D_Cross(
        &theDocument->zVector,
        &theDocument->yVector,
        &theDocument->zVector);

    // I added this:
    Q3Vector3D_Normalize(
        &theDocument->xVector,
        &theDocument->xVector);
}
-- Flip Phillips

You made the right call. QuickDraw 3D requires all vectors to be of unit length (normalized). So any changes to vectors that could make them not normalized should be followed by a call to normalize those vectors (using Q3Vector3D_Normalize as you've done). If QuickDraw 3D didn' t have this requirement, it would have to normalize vectors itself internally, which would take away from its efficiency.
-- Philip McBride

A SIDE ISSUE
In Steve Falkenburg's article "Planning for Mac OS 8 Compatibility" in develop Issue 26, I read the following:

After some poking around, we figured out that it was assuming that InitWindows called InitMenus as a side effect. The completely new Mac OS 8 implementations of windows and menus no longer have this behavior.

However, Inside Macintosh Volume V states, under the heading "InitWindows" on page 208:

Since the menu bar definition procedure ('MBDF') actually performs these calculations, InitWindows now calls InitMenus directly. InitMenus has been modified so that it can be called twice in a program without ill effect.

I advise the Mac OS 8 engineers to read the "You're never too smart to read the manual" section of the Veteran Neophyte column in the same issue of develop ;-).
-- Reinder Verlinde

Your point is well taken. However, it's worth mentioning that Inside Macintosh: Macintosh Toolbox Essentials (the more current documentation) says no such thing, and in fact says explicitly that InitMenus should always be called after InitWindows. As always, depending on a side effect, even a documented one, is dangerous.
-- Dave Johnson

MORE GOOD STUFF

Look on this issue's CD and develop's Web site for Martin Minow's article, "Timing on the Macintosh," which was recently updated to include a few Java timing techniques. You'll also find some scripting vocabulary advice from Cal Simone.

THINK THESE LETTERS ARE BORING?T hen why not write one of your own? We welcome your letters to the editor, especially regarding articles published in develop. Write to Caroline Rose at crose@apple.com or, if technical develop-related questions, to Dave Johnson at dkj@apple.com. All letters should include your name and company name as well as your address and phone number. Letters may be excerpted or edited for clarity (or to make them say what we wish they did). Address subscription- related queries to order.adc@applelink.apple.com. *

 
MacTech Only Search:
Community Search:

 
 
 

 
 
 
 
 
  • SPREAD THE WORD:
  • Slashdot
  • Digg
  • Del.icio.us
  • Reddit
  • Newsvine
  • Generate a short URL for this page:



MacTech Magazine. www.mactech.com
Toll Free 877-MACTECH, Outside US/Canada: 805-494-9797
MacTech is a registered trademark of Xplain Corporation. Xplain, "The journal of Apple technology", Apple Expo, Explain It, MacDev, MacDev-1, THINK Reference, NetProfessional, Apple Expo, MacTech Central, MacTech Domains, MacNews, MacForge, and the MacTutorMan are trademarks or service marks of Xplain Corporation. Sprocket is a registered trademark of eSprocket Corporation. Other trademarks and copyrights appearing in this printing or software remain the property of their respective holders.
All contents are Copyright 1984-2010 by Xplain Corporation. All rights reserved. Theme designed by Icreon.
 
Nov. 20: Take Control of Syncing Data in Sow Leopard' released
Nov. 19: Cocktail 4.5 (Leopard Edition) released
Nov. 19: macProVideo offers new Cubase tutorials
Nov. 18: S Stardom anounces Safe Capsule, a companion piece for Apple's
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live
Nov. 17: Ableton releases Max for Live