Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Tools for Microsoft .Net
 QCChart3D 3D Charting Tools for .Net (VB and C#)
 Rotation on keyPress

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
   

T O P I C    R E V I E W
oliversleep Posted - 14 Jan 2011 : 05:14:03
Hello,

I would like to know if it's possible to do a rotation (X, or Y or Z) on a keyPress event ? With no Mouse event ?

For example, when I press X+L => create a X rotation direction Left.

Thanks.
1   L A T E S T    R E P L I E S    (Newest First)
quinncurtis Posted - 14 Jan 2011 : 10:18:17
I'm don't know what x-rotation left means, since rotation about the x-axis would normally tilt in or out of the screen.

But otherwise it is simple enough. Add a keypressed event handler to your class derived from ChartView, trap the key you want to trigger on, and call the coordinate systems (pTransform1, made global to the entire class in this case) RelRotateCoordinateSystem method, for the axis and degrees you want to rotate. Call UpdateDraw to force the changes to be applied to the chart.


private void LinePlotSaleVolume_KeyPress(object sender, KeyPressEventArgs e)
{
  //Rotate a negative 5 degrees about the x-axis
  pTransform1.RelRotateCoordinateSystem(new Point3D(-5, 0, 0));
  this.UpdateDraw();
}

Quinn-Curtis Forums © 2000-2018 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07