Custom 3-D Vector Control

 

This control has the following features:

  • A 3D vector MFC control derived from CButton.
  • Real-time light rendering on a 3D ball.
  • Variable ball radius and position.
  • Supports bitmap background (tiled).
  • Supports vertical gradient color background (from color to color, as visiable in screen capture above).
  • Variable ball color (diffuse), light color and ambient color.
  • Variable specular intensity.
  • Supports attached controls (for automatic update).
    That is, you can specify IDs of other controls that will reflect (textually) the value of a specific vector component. The vector control will automatically update (calling SetwindowText) the display. See the 3 static text controls in the example above.
  • Variable mouse sensitivity.
  • Supports front clipping (vector will not have negative Z values).
  • Supports callback functions for the following events:
    1. The trackball has moved (vector is changing).
    2. The user dropped the trackball (released left mouse button). i.e., the vector was changed.

A dialog-based sample application (screen capture above) and the control source code can be found here



Comments

  • Simple great

    Posted by Legacy on 01/25/2002 12:00am

    Originally posted by: Andre

    Very nice job. At first I thought you were using OpenGL or DirectX, but this is much better and compatible.

    Andr�

    Reply
  • Error when run in whistler

    Posted by Legacy on 10/27/2001 12:00am

    Originally posted by: nameSpace

    It generates an error in Windows XP.

    Reply
  • Congrats

    Posted by Legacy on 10/03/2001 12:00am

    Originally posted by: Jack Downar

    Very nice job

    Reply
  • High Hand!

    Posted by Legacy on 09/30/2000 12:00am

    Originally posted by: Error Free

    Beautiful enhance! I need it!

    Reply
  • appriciation from Syed Tauseef Ahmed

    Posted by Legacy on 02/23/2000 12:00am

    Originally posted by: SYED TAUSEEF AHMED

    Nice Try man keep it up and we are here to appriciate

    you.

    Reply
  • About 3D Vector Control

    Posted by Legacy on 06/26/1999 12:00am

    Originally posted by: Balasubramanian.Natarajan

    It is very nice to see...

    Reply
  • This is WELL cool - and I have a question...

    Posted by Legacy on 04/12/1999 12:00am

    Originally posted by: Jason Hattingh

    I am *trying* to find a good reason to use your code! I don't really want a specular ball in my apps, but I *have* written an object reader for Lightwave 3D files. Is it possible to use your control to display a lightwave object, given the fact that the object can supply all the coordinates of it's points, etc? It's not clear to me how this would be done - presumably in BuildImage()

    Thanks in advance!

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: October 29, 2014 @ 11:00 a.m. ET / 8:00 a.m. PT Are you interested in building a cognitive application using the power of IBM Watson? Need a platform that provides speed and ease for rapidly deploying this application? Join Chris Madison, Watson Solution Architect, as he walks through the process of building a Watson powered application on IBM Bluemix. Chris will talk about the new Watson Services just released on IBM bluemix, but more importantly he will do a step by step cognitive …

  • Live Event Date: October 23, 2014 @ 12:00 p.m. ET / 9:00 a.m. PT Despite the current "virtualize everything" mentality, there are advantages to utilizing physical hardware for certain tasks. This is especially true for backups. In many cases, it is clearly in an organization's best interest to make use of physical, purpose-built backup appliances rather than relying on virtual backup software (VBA - Virtual Backup Appliances). Join us for this eSeminar to learn why physical appliances are preferable to …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds