Rotating with keyboard
Hi all,
i'm new to Java 3D, and i've seen several examples of rotating a cube using the mouse (with the MouseRotate object). The thing is that i want to rotate a cube using the keyboard...
Does anyone knows of an example (source code) where i can see a rotation made using keyboard control?
I've tried writing a KeyListener object, and on my KeyListener i tried to rotate using the methods rotX() and rotY(); but it didn't work exactly how i wanted. When i write:
rotX(...);
rotY(...);
only the rotY(...) makes effect; and when i write:
rotY(...);
rotX(...);
only the rotX makes effect. But i want to rotate both at the same time.
Well,
i appreciate any help,
Thanks,
Vic.
Could not find any solution in the forum so I am posting mine. I simply generate mouse events that simulate specific mouse behavior. These events are dispatched to the 3d canvas.
final int DELTA = 4;
public void rotateX(boolean clockWise) {
// Drag with left button down
generateMouseDragEvent(clockWise ? DELTA : -DELTA, 0, MouseEvent.BUTTON1);
public void rotateY(boolean clockWise) {
// Drag with left button down
generateMouseDragEvent(0, clockWise ? DELTA : -DELTA, MouseEvent.BUTTON1);
public void zoom(boolean zoomIn) {
// Drag with mouse wheel button down
generateMouseDragEvent(0, zoomIn ? DELTA : -DELTA, MouseEvent.MOUSE_WHEEL);
private void generateMouseDragEvent(int dx, int dy, int modifiers) {
final int X = 100;
final int Y = 100;
canvas3D.dispatchEvent(new MouseEvent(
canvas3D,
MouseEvent.MOUSE_PRESSED,
System.currentTimeMillis(),
modifiers,
X,
Y,
1,
false));
canvas3D.dispatchEvent(new MouseEvent(
canvas3D,
MouseEvent.MOUSE_DRAGGED,
System.currentTimeMillis(),
modifiers,
X + dx,
Y + dy,
1,
false));
canvas3D.dispatchEvent(new MouseEvent(
canvas3D,
MouseEvent.MOUSE_RELEASED,
System.currentTimeMillis(),
modifiers,
X + dx,
Y + dy,
1,
false));
}
Similar Messages
-
Problem with rotation and keyboard click sound
Ok, there's still a problem with the rotation and keyboard click sound and I thought I had the problem fixed.
It's a serious bug when you want the keyboard click sound enbabled without having the rotation locked. I noticed this bug started when I had the previous iosinstalled 7.0.6.
Everytime I wanted to enable the keyboard click sound, I have to always go to settings and have lock rotation checked. And it would stay locked.
If I wanted to rotate my iPad, I have to have mute enabled, but no keyboard click sound.
I know it sounds confusing. I'm already confused... beh.I completely forgot about that.
Thank you! -
Please make XY LOGICAL when rotated with Wacom Intuos 4
I absolutely LOVE the ability to rotate my image with the Wacom Intuos 4 scroll wheel! Hours of time at the computer make this very appreciated for comfort. Some times it's a lot more comfortable to brush in a particular direction.
When temporarily rotated like this, brushing up and down along the surface of the Wacom moves the cursor the way you would expect, up and down your display, regardless of the image's real orientation (since rotating with the scroll wheel only rotates the image in VRAM). The problem occurs when you attempt to use the arrow keys on the keyboard to nudge an object with the move tool. The direction of movement in this case ignores the visual orientation of the image, and instead behaves as though the image is not visually rotated. so… if I rotate an image with the Wacom scroll wheel 90 degrees clockwise, using the up arrow with the move tool nudges objects to the left on my display rather than the VISUAL up. VERY not logical! :^)Bump
-
After reading and resetting everything with Keyboard I still get blank white screen on 2nd? page of boot. The only way I can boot to Mavericks is unplug power cord, push and hold power button while plugging power cord in. Fans run at full speed, machine boots then runs normal except the dvdrw will not . The mid 2011 IMAC had the same problem with LION. I changed hard drives, formatted, and installed a clean install of latest os x mavericks. Any help would be greatly appreciated.
EtreCheck version: 1.9.15 (52)
Report generated August 30, 2014 at 6:56:41 PM EDT
Hardware Information: ?
iMac (21.5-inch, Mid 2011) (Verified)
iMac - model: iMac12,1
1 2.5 GHz Intel Core i5 CPU: 4 cores
4 GB RAM
Video Information: ?
AMD Radeon HD 6750M - VRAM: 512 MB
iMac 1920 x 1080
System Software: ?
OS X 10.9.4 (13E28) - Uptime: 0 days 0:16:53
Disk Information: ?
ST3120026AS disk0 : (120.03 GB)
S.M.A.R.T. Status: Verified
EFI (disk0s1) <not mounted>: 209.7 MB
Untitled (disk0s2) / [Startup]: 119.17 GB (87.12 GB free)
Recovery HD (disk0s3) <not mounted>: 650 MB
HL-DT-STDVDRW GA32N
USB Information: ?
Apple Inc. FaceTime HD Camera (Built-in)
CHICONY USB NetVista Full Width Keyboard
Apple Inc. BRCM2046 Hub
Apple Inc. Bluetooth USB Host Controller
Apple Computer, Inc. IR Receiver
Apple Internal Memory Card Reader
Thunderbolt Information: ?
Apple Inc. thunderbolt_bus
Gatekeeper: ?
Anywhere
Kernel Extensions: ?
[loaded] com.nvidia.CUDA (1.1.0) Support
[loaded] com.sophos.kext.sav (9.0.61 - SDK 10.7) Support
[loaded] com.sophos.nke.swi (9.0.53 - SDK 10.8) Support
Startup Items: ?
CUDA: Path: /System/Library/StartupItems/CUDA
FanControlDaemon: Path: /Library/StartupItems/FanControlDaemon
Launch Daemons: ?
[loaded] com.adobe.fpsaud.plist Support
[running] com.arcsoft.eservutil.plist Support
[running] com.bjango.istatmenusdaemon.plist Support
[loaded] com.oracle.java.Helper-Tool.plist Support
[running] com.sophos.autoupdate.plist Support
[running] com.sophos.configuration.plist Support
[running] com.sophos.intercheck.plist Support
[running] com.sophos.notification.plist Support
[running] com.sophos.scan.plist Support
[running] com.sophos.sxld.plist Support
[running] com.sophos.webd.plist Support
Launch Agents: ?
[running] com.arcsoft.esinter.plist Support
[running] com.bjango.istatmenusagent.plist Support
[loaded] com.nvidia.CUDASoftwareUpdate.plist Support
[loaded] com.oracle.java.Java-Updater.plist Support
[running] com.sophos.uiserver.plist Support
User Login Items: ?
Macs Fan Control
Firefox
Internet Plug-ins: ?
FlashPlayer-10.6: Version: 14.0.0.176 - SDK 10.6 Support
Flash Player: Version: 14.0.0.176 - SDK 10.6 Support
QuickTime Plugin: Version: 7.7.3
JavaAppletPlugin: Version: Java 7 Update 67 Check version
Default Browser: Version: 537 - SDK 10.9
Audio Plug-ins: ?
BluetoothAudioPlugIn: Version: 1.0 - SDK 10.9
AirPlay: Version: 2.0 - SDK 10.9
AppleAVBAudio: Version: 203.2 - SDK 10.9
iSightAudio: Version: 7.7.3 - SDK 10.9
iTunes Plug-ins: ?
Quartz Composer Visualizer: Version: 1.4 - SDK 10.9
3rd Party Preference Panes: ?
CUDA Preferences Support
Fan Control Support
Flash Player Support
Java Support
Time Machine: ?
Time Machine not configured!
Top Processes by CPU: ?
1% WindowServer
1% fontd
0% firefox
0% SystemUIServer
0% SophosWebIntelligence
Top Processes by Memory: ?
229 MB firefox
156 MB SophosScanD
152 MB InterCheck
131 MB com.apple.IconServicesAgent
115 MB SophosAntiVirus
Virtual Memory Information: ?
424 MB Free RAM
1.53 GB Active RAM
1.37 GB Inactive RAM
699 MB Wired RAM
1.26 GB Page-ins
0 B Page-outsI'd start by getting rid of the following software responsible for these extensions.
Kernel Extensions: ?
[loaded] com.nvidia.CUDA (1.1.0) Support
[loaded] com.sophos.kext.sav (9.0.61 - SDK 10.7) Support
[loaded] com.sophos.nke.swi (9.0.53 - SDK 10.8) Support
Startup Items: ?
CUDA: Path: /System/Library/StartupItems/CUDA
FanControlDaemon: Path: /Library/StartupItems/FanControlDaemon
Use the uninstaller provided with the Sophos software. You can uninstall CUDA via the preference pane. Be sure you remove the com.nvidia.CUDA extension which is located in the /System/Library/Extensions/ folder. Not sure if Fan Control has an uninstaller so you will have to do it manually:
Uninstalling Software: The Basics
Most OS X applications are completely self-contained "packages" that can be uninstalled by simply dragging the application to the Trash. Applications may create preference files that are stored in the /Home/Library/Preferences/ folder. Although they do nothing once you delete the associated application, they do take up some disk space. If you want you can look for them in the above location and delete them, too.
Some applications may install an uninstaller program that can be used to remove the application. In some cases the uninstaller may be part of the application's installer, and is invoked by clicking on a Customize button that will appear during the install process.
Some applications may install components in the /Home/Library/Applications Support/ folder. You can also check there to see if the application has created a folder. You can also delete the folder that's in the Applications Support folder. Again, they don't do anything but take up disk space once the application is trashed.
Some applications may install a startupitem or a Log In item. Startupitems are usually installed in the /Library/StartupItems/ folder and less often in the /Home/Library/StartupItems/ folder. Log In Items are set in the Accounts preferences. Open System Preferences, click on the Accounts icon, then click on the LogIn Items tab. Locate the item in the list for the application you want to remove and click on the "-" button to delete it from the list.
Some software use startup daemons or agents that are a new feature of the OS. Look for them in /Library/LaunchAgents/ and /Library/LaunchDaemons/ or in /Home/Library/LaunchAgents/.
If an application installs any other files the best way to track them down is to do a Finder search using the application name or the developer name as the search term. Unfortunately Spotlight will not look in certain folders by default. You can modify Spotlight's behavior or use a third-party search utility, EasyFind, instead.
Some applications install a receipt in the /Library/Receipts/ folder. Usually with the same name as the program or the developer. The item generally has a ".pkg" extension. Be sure you also delete this item as some programs use it to determine if it's already installed.
There are many utilities that can uninstall applications. Here is a selection:
1. AppZapper
2. AppDelete
3. Automaton
4. Hazel
5. AppCleaner
6. CleanApp
7. iTrash
8. Amnesia
9. Uninstaller
10. Spring Cleaning
For more information visit The XLab FAQs and read the FAQ on removing software.
Be sure to remove your two Login Items. Finally do this:
Reinstall Lion, Mountain Lion, or Mavericks without erasing drive
Boot to the Recovery HD:
Restart the computer and after the chime press and hold down the COMMAND and R keys until the menu screen appears. Alternatively, restart the computer and after the chime press and hold down the OPTION key until the boot manager screen appears. Select the Recovery HD and click on the downward pointing arrow button.
Repair
When the recovery menu appears select Disk Utility. After DU loads select your hard drive entry (mfgr.'s ID and drive size) from the the left side list. In the DU status area you will see an entry for the S.M.A.R.T. status of the hard drive. If it does not say "Verified" then the hard drive is failing or failed. (SMART status is not reported on external Firewire or USB drives.) If the drive is "Verified" then select your OS X volume from the list on the left (sub-entry below the drive entry,) click on the First Aid tab, then click on the Repair Disk button. If DU reports any errors that have been fixed, then re-run Repair Disk until no errors are reported. If no errors are reported then click on the Repair Permissions button. When the process is completed, then quit DU and return to the main menu.
Reinstall Lion, Mountain Lion, or Mavericks
OS X Mavericks- Reinstall OS X
OS X Mountain Lion- Reinstall OS X
OS X Lion- Reinstall Mac OS X
Note: You will need an active Internet connection. I suggest using Ethernet
if possible because it is three times faster than wireless. -
870A Fuzion Power has problem with keyboard and mouse movement only in games.
Hey guys,
recently built a new system and chose to go with the 870A Fuzion Power mainboard, everything has gone very smoothly execpt for one problem, only when I play games like Crysis 2 ect the mouse seems to jolt around now and again and the keyboard decides to stop responding if I hold down the movement keys, and this is only in game not surfing the web for example. Now, I am using a wireless mouse and keyboard but I plugged in a PS/2 keyboard and the exact same thing happened. I've installed all of the drivers that came with this board and the drivers for the mouse and keyboard. Any of you guys ever had this sort of problem or know how to fix this?
Thanks.I bought a new Macbook pro in june 2010, I didn't have any keyboard or mouse issues prior to upgrading to 10.6.4 supposedly this update was made to fix some issues with keyboard and mouse becoming unresponsive. For me the opposite happened. after the upgrade, my keyboard and mouse (trackpad) becomes sometimes partially unresponsive or totally unresponsive. the only way to solve the problem is by completely turning of the computer and turning back on.. granted it doesn't happen very often.. generally once every about 2-3 weeks but it is still annoying though..
I didn't have a chance to use the computer too much on the previous version (10.6.3) so I don't know if it is software related or hardware related.. any thoughts?
Message was edited by: msoued -
How Stop Pop-Up Window: Allow Fullscreen With Keyboard Controls?
How can I cause the cessation of the pop-up window that asks me, "Allow fullscreen with keyboard controls?"
In the last month or two (January- February of 2013), this black, semi-transparent pop-up has appeared every time I go to full screen in the game Battle Pirates on facebook.
After numerous iterations, this confirmation request has become completely unneccessary and nothing more than an unwelcome annoyance.Tom,
Moderators have the authority and privilege to mark answers as correct, in addition to the original posters. ANY moderator here could have marked it that way.
The Bug report/Feature Request link is not a "vote" page per say, but a place to submit a request for a feature you'd like to see added or dropped from Flash Player. It's the best way to voice a concern or "wish" for a feature, since the development team reads the reports/requests. Management who'd make the decision to add or remove something won't read about it here. They WILL hear about it from development. -
My left arrow does not work on my macbook pro(model A1226).
I have reset nvram, performed a safe boot, pulled the cache to desktop, replaced .globalpreference.plist, & tested all other keys with "keyboard viewer" (all other keys work except for the arrow).
In addition, I have gone thru all the recommended checks with universal access and have booted from snow leopard dvd and the left arrow still does not work.
I have tried using the left arrow key in all of applications I use such as: excel, ms word, address book, calendar, iphoto, terminal, & highlighting an icon and using the arrows to move to another selected icon.
Here is the kicker! In addition, I purchased a logitech solar bluetooth keyboard and the arrows work fine with my ipad but do not work when paired with the macbook pro. All other keys work fine on the macbook pro using the bluetooth keyboard.
I believe this says that the problem is not in my macbook pro keyboard. So where can it be?
Can anyone think of any other rabbit holes I can search?
thanks and regards
vats3I would also like to add that I've reverted the two cd drive and hard drive mods I did and the laptop is back to factory hardware and there is 0 corrosion or mold visible.
-
Buggy issues with keyboard buttons.
Getting constant issues with keyboard keys in Photoshop. Delete key does not delete layer, Fill layer (Option Delete) only works when I change tools. And it does this intermittently. It's very annoying!
Anyone else have these issues? These are just some of the issues that pop up.BOILERPLATE TEXT:
Note that this is boilerplate text.
If you give complete and detailed information about your setup and the issue at hand,
such as your platform (Mac or Win),
exact versions of your OS, of Photoshop (not just "CS6", but something like CS6v.13.0.6) and of Bridge,
your settings in Photoshop > Preference > Performance
the type of file you were working on,
machine specs, such as total installed RAM, scratch file HDs, total available HD space, video card specs, including total VRAM installed,
what troubleshooting steps you have taken so far,
what error message(s) you receive,
if having issues opening raw files also the exact camera make and model that generated them,
if you're having printing issues, indicate the exact make and model of your printer, paper size, image dimensions in pixels (so many pixels wide by so many pixels high). if going through a RIP, specify that too.
etc.,
someone may be able to help you (not necessarily this poster).
a screen shot of your settings or of the image could be very helpful too.
Please read this FAQ for advice on how to ask your questions correctly for quicker and better answers:
http://forums.adobe.com/thread/419981?tstart=0
Thanks! -
updated iphone 5 to iOS 6.1.3, now I am having trouble with keyboard not responding correctly and screen zooming in by itself...
Buttons pressing themself...
Also, my main screen is permanently zoomed in...
suggestions?Double tap the screen with THREE fingers, that should get it back to normal again.
Then go into Settings > General > Accessibility > Zoom > OFF.
Not too sure about the keyboard and random button presses though. Back it up and restore from iTunes, see if that fixes it. -
strange things with keyboard happens on my macbook - after cleaning keyboard (rag with spirit) I start mac and get sticky key (continuously type one letter and beeping on speaker). I shutdown mac, remove key and clean space under it... it helps - but I found other strange bug:
pressing left shift - gives me capital letter "O"
letter "O" - always capitalized
| symbol always comes with return button
now I use external keyboard - all good on it... but macbook keyboard still wont work properly
what can it be? how fix it?
ps: sorry for my engthanks for your reply, and you might be right about using USB v2.0. The PS/2-USB adapters I am using are v.1.0 so may be incompatible, even though this technology is supposed to be backward-compatable.
Since this problem reared its ugly head, I have disabled the Toshiba applications and monitored the situation - OK so far, but I will keep an eye on it. -
When using iTunes on my iMac, I use my Delete key to delete a song and I get a pop-up. This is OK, except the Keep File button is defaulted and I cannot tab or arrow to the "Move to Trash" (or Cancel) button, and so I need to use my mouse. How can I do this only with keyboard?
Huh.. Interesting. I went back to check these proceedures and found there is a difference between using the return key or the space bar as the action command.
tabbing the blue ring moves the selection and then spacebar takes that action. The return key takes action of only the blue collored button.
.... learn somting new every day, even if it is somthing I previously forgot -
Moving selected objects up and down with keyboard is automaticly applying a colour fill.
Hi,
My InDesign is strangely applying a colour fill when i move an objects up or down using the directional arrow in my keyboard. If the colour pallet is open. Nudging an object up makes the pallet disappear on the first press. It then reappears on the second press while filling the object (text frame) with black. This is instensly frustrating. How can I stop this? Suggestions would be very appreciated.
I have already reset the preferences.
Cheers,Thanks for your reply.
I fixed the problem by replacing the keyboard!
Cheers,
Nick Meadows
0421 976 704
www.nickmeadows.com
Date: Fri, 30 Mar 2012 06:01:22 -0600
From: [email protected]
To: [email protected]
Subject: Moving selected objects up and down with keyboard is automaticly applying a colour fill.
Re: Moving selected objects up and down with keyboard is automaticly applying a colour fill.
created by Peter Spier in InDesign - View the full discussion
I have to ask if you reset the prefs uing one of the methods in this thread: Replace Your Preferences If not, there's a good chance you left out one of the files, so please try again using one of the listed methods. And please tell us the OS and your version of ID, including the patch level. Obviously this is not normal behavior. It sounds as if the Swatches panel has focus when you are pressing the arrow keys.
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4302200#4302200
To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4302200#4302200. In the Actions box on the right, click the Stop Email Notifications link.
Start a new discussion in InDesign by email or at Adobe Forums
For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746. -
Can I rotate the keyboard display on my i phone 4s?
Can I rotate the keyboard display on my 4s?
This may not be very practicable for you, but I changed my language to French. That works.
-
HT201236 how do you make a bullet with keyboard shortcuts?
how do you make a bullet with keyboard shortcuts?
According to this https://discussions.apple.com/thread/1381905?start=0&tstart=0 Option 8 will insert a bullet.
-
My child accidentally added heart symbol (♥) in username, and now I can not login into my macbook air as I can not type the ♥ symbol with keyboard. apple tech service said no such experience before.
If the user account is associated with an Apple ID, and you know the Apple ID password, then maybe the Apple ID can be used to reset your user account password.
Otherwise*, boot into Recovery mode. When the OS X Utilities screen appears, select
Utilities ▹ Terminal
from the menu bar. In the window that opens, type this:
res
Press the tab key. The partial command you typed will automatically be completed to this:
resetpassword
Press return. A Reset Password window opens. Close the Terminal window to get it out of the way.
Select your boot volume ("Macintosh HD," unless you gave it a different name) if not already selected.
Select your username from the menu labeled Select the user account if not already selected.
Follow the prompts to reset the password. It's safest to choose a password that includes only the characters a-z, A-Z, and 0-9.
Select
▹ Restart
from the menu bar.
You should now be able to log in with the new password, but your Keychain will be reset (empty.) If you've forgotten the Keychain password (which is ordinarily the same as your login password), there's no way to recover it.
*Note: If you've activated FileVault, this procedure doesn't apply. Follow instead these instructions.
Maybe you are looking for
-
How to connect an external harddrive with firewire 800 to a macbook with firewire 400?
Hello, I just got the external harddrive "Seagate FreeAgent GoFlex USB 3.0 1TB" with a Seagate FreeAgent GoFlex Upgrade Kabel FireWire 800. I have neither a USB 3.0, nor a Firewire 800 on my white macbook (2008). I already know, that it's possible to
-
I need my XY graph to plot all values it obtains, not one at a time.
When I use the XY graph and take the values from a global, it plots one point. Then when i enter in a new value to be graphed, it erases the one before it. How do I make all the values stay?
-
Error applying Patch 11724916 - 11.2.0.2.2 Patch Set Update.
Hello, I have an 11.2.0.2.1 GI installation and 12311357 path applied correctly. But patch 11724916 is missing (I know they both are installed together). Trying to apply it I have the following error (as grid) : grid@selva-2./usr/local/software/oracl
-
Logical System,Business System
Hi Gurus, What is Logical System? n What is Business System? Wt is the Difference betweent these two?Can you explain me in detial. thanks in advacne.
-
Uninstall and/or Deactivate CS4 before Installing CS5?
(Win 7 64, Production Premium CS4) I know this question has been asked a lot; I've read a dozen threads on the subject but I can't find a definitive answer ... so I thought I'd ask: Should I uninstall Prod Prem CS4 first, before I install Prod Prem C