9/19/2005 - dmorris

* Released version 1.3 (stable).

* Added the examples web page to the examples directory.  It makes
  CHAI look awesome.


9/19/2005 - francois

* All examples compile in the root BIN directory and not in the BIN directory
  of the EXAMPLES directory. The reason for this move is that demos will run with
  the correct DLL's located in the same directory.

* The drivers for the delta and omega have been updated. I am working on loading and
  freeing the DLL automatically like the Freedom6 implementation. Will post this later
  this week but was experiencing some issues.

* Some of the Borland demos were cleaned up and "relooked"

* Virtual device was not working any more. Fixed a small bug in tools following a recent
  change someone posted.

* A RESOURCES directory was added in the BIN directory to organize all data files our
  demos may use (images, models, sounds, ...)


9/14/2005 - dmorris

* cImageLoader.h, BTW, has become the home of several filename-related
  utility functions that I use all the time.  I occasionally add new
  ones, even if they're not used by cImageLoader; sometime in the
  future we may move these to something like a chaiFilenameUtils.h.


9/13/2005 - dmorris

* Created an msvc7 version of the sounds example

* Modified all copies of the pointer/device/tool classes so that
  methods like start() and initialize() return an int (instead of
  void), and return 0 for success.  It was hard to tell where
  something went wrong if a device failed to start; this will
  help a lot.  Also deleted empty implementations from
  cGenericTool3dof (it's still inheriting empty implentations
  from cGenericTool)

* Modified _all_ examples so they compile to the examples/bin
  directory.  We've finally started to have some examples that
  have data, and it was going to be a mess to either have 
  three copies of every mp3/bmp/etc. file or to try to have a 
  complex scheme for finding the CHAI data files.  So now
  everyone lives in one nice bin directory, along with all
  the data.

  This is something we've been talking about doing for a long
  time anyway; now folks can just open up that bin directory
  and quickly see what CHAI can do.


9/12/2005 - Chris

* Changed record player example to use (much smaller) mp3's
  instead of (very large) .wav's.


9/8/2005 - Chris

* Created new version of msvc6 sounds example using BASS audio
  library.


9/8/2005 - dmorris

* Added conversion from local to global velocity in
  cGeneric3dofPointer; it was previously grabbing the (local)
  velocity from the device and calling it global.

* Removed the forcesON and forcesOFF methods from cGenericTool
  and cGenericTool3dof, and replaced them with setForcesON and
  setForcesOff, which is what they were called in the only
  subclass that actually implemented anything like them
  (cGeneric3dofPointer).  This was quite confusing, since
  there were two methods with nearly the same name, one of
  which didn't do anything.

  I apologize for this minor breaking change, but it was
  really confusing and needed to be fixed.  I updated all the
  examples (Borland and MSVC) accordingly.

* Added a version of the str() function in the vector and 
  matrix classes that takes no arguments, so you can do
  this:

  printf("My vector is %s\n",v.str(2).c_str());


9/6/2005 - dmorris

* Added msvc7 version of the record_player demo

* Cleaned up warnings and gui things in the record_player demo,
  moved binary files into the 'bin' directory for the msvc6 and
  msvc7 versions.


9/2/2005 - Chris

* Added sound-enabled record_player demo in msvc6 examples.


7/26/2005 - Chris

* Made m_deviceGlobalRot in cGeneric3dofPointer publicly accessible.

* Made renderSceneGraph in cGenericObject virtual.

* Removed "#include "CMacrosGL.h" from CPrecisionClock.cpp, as it
  was causing compile problems for Borland, and is not needed.
 

7/12/2005 - dmorris

* MSVC7-compiled CHAI wasn't working on pIII's, because SSE2 was turned on.
  I turned it off.
 

7/7/2005 - dmorris

* Modified msvc examples to allow window resizing, because
  Francois is passionate about window resizing.

* Aesthetic improvements to MSVC object loader.  Disabled
  mouse input, centered the camera in the room, backed
  the camera up a little, etc.


7/1/2005 - dmorris

* Made renderSceneGraph virtual in cGenericObject


7/4/2005 - Chris

* Modified and added comments to Borland sound example, and added
  MSVC6 version of the sound example.


7/2/2005 - Chris

* Rewrote Borland sound example; it now convolves the force with the
  sound modes and also hopefully will now run on a wider variety of 
  machines.


6/29/2005 - dmorris

* Added a 'getNumDescendants' function to cGenericObject, to 
  recursively ask how many children an object has


6/28/2005 - Chris

* Made minor change in a variable declaration in cMesh (Visual Studio 6
  didn't like the same variable declared in two for loops, causing CHAI
  not to compile in MSVC6).


6/13/2005 - dmorris

* Added recursive setTag and setName functions to cGenericObject

* Added project files for the intel compiler


6/6/2005 - dmorris

* Added arbitrary clip planes to cCamera


6/1/2005 - dmorris

* Released the 1.25 beta (preceded by the 1.23 and 1.24 betas)

* Fixed a bug in the MSVC object loader that prevented haptics from 
  working just after you fired up an object.

* Removed the TIME_KILL_SYNCHRONOUS flag from the CHAI timer; it's XP-specific
  and breaks timers on win2k.

* Added a 'chai_release.txt' file to the 'src' directory, which reminds me
  of everything I need to do to release a CHAI build and everything I should
  put into a build script one of these days.


6/1/2005 - Chris

* Added sound example in Borland.  May add Visual version later if we decide
  we want to include this in releases.


5/31/2005 - Chris

* Added a function to test bounding boxes of internal nodes of AABB collision
  trees directly against the proxy/goal segment (rather than just the bounding
  box of the segment).  This is particularly useful if the segment is large 
  (such as when collision detection is used for ray casting), though could
  potentially be slower in some cases (trade off of extra pruning versus extra
  work to test box/segment instead of box/box).  It can be enabled/disabled 
  with m_testLineBox in cCollisionAABBInternal; by default it is enabled.

* Made renderView in cViewport virtual so that children can override it.


5/27/2005 - dmorris

* In several places in cmath, ctriangle, and ccollisionaabb, I made things
  const, pass-by-reference, and/or inline to speed things up a little.  I
  also put in a new implementation of cTriangle's computeCollision 
  method, although I left the old code there - #define'd out - in case this
  gives us any problems.


5/26/2005 - dmorris

* Added Steve Sinclair's contribution for MPB Freedom 6S support.  This 
  includes a new tool, a new device, and the appropriate modification
  to the meta pointer.


5/18/2005 - dmorris

* Added more overloaded operators to cVector3d and created overloaded
  operators for cMatrix3d

* Added the ability to move and pan the camera using the mouse to the
  MSVC object loader (mouse commands are listed in the main dialog).
  Consequently, the haptic tool is now a child of the camera.  This
  makes it more useful for viewing object but more importantly
  demonstrates a wider variety of camera operations.


4/27/2005 - dmorris

* cGenericObject now includes an m_objectName variable, which is generally
  left for the user to do whatever he wants with, but is automatically set
  by the mesh loader to import mesh names from .3ds/.obj files.

* Added a reverseAllNormals function to the 'mesh manipulation' section
  of cMesh

* Added a getCenterOfMass function to the 'mesh manipulation' section
  of cMesh

* Added an enumerateChildren function to cGenericObject; this fills up
  a list with all descendants of an object (I found myself doing this
  operation all the time, particularly for mesh manipulation)

* cMesh now generally refers to pVertices() instead of directly referring
  to m_vertices.  This makes it much easier to have a mesh refer to 
  a vertex array that lives in another mesh.

* Added some useful commented-out code in object_loader.cpp (in the
  object_loader example) to give you an idea of some useful things
  you can do to meshes that "don't look right" after you load them.


4/16/2005 - dmorris

* Fixed the meta tool so it automatically spawns the virtual device if
  no other device was found, as long as it's in your path or in your
  $(CHAI_BASE)/bin directory.  Basically the problem was that the meta
  tool was using spawnl to start the virtual device instead of spawnlp.


4/14/2005 - dmorris

* cTriangle is no longer a friend of cMesh, so now cTriangle uses pVertices()
  like everyone else does to access vertex arrays.  In fact cMesh itself uses
  pVertices() almost everywhere... this allows overriding pVertices() to 
  point somewhere else without breaking the rest of cMesh.


4/13/2005 - dmorris

* Fixed a bug in the AABB tree that was occasionally causing it to crash
  when trees were deleted.


4/12/2005 - Chris

* Made several changes in CShapeSphere.h, CGenericPotentialField.h, and
  CPotentialFieldForceAlgo.cpp to make potential field force rendering work.


4/7/2005 - dmorris

* Added support for loading jpeg files.  The solution is win32-specific,
  so appropriate ifdef's are included.  Basically if the file is neither
  a bmp file or a tga file, CHAI uses the OLELoadPicturePath function to
  try to load the file.  If _WIN32 is not defined, CHAI tried to force
  the extension to be .bmp and load again.  This is actually useful; if
  you have a model with lots of .jpg textures embedded in it, you can just
  convert all the textures to .bmp and CHAI will now load it happily.

  As an aside this will also load .wmf, .ico, and .gif files.

  We may want to replace the native bitmap loader with this approach
  in the win32 case; it will load a wider variety of bitmap files.


4/3/2005 - dmorris

* Added solution files to the msvc6 and msvc7 examples directories that
  have all the individual examples in them.

* Added an msvc7 version of the ODE example and fixed the release build
  settings of the msvc6 ODE example.


4/3/2005 - Chris

* Fixed a problem in the Borland mass_springs example that was making it 
  render the balls in the wrong place.  

4/1/2005 - Chris

* Added a line in PreTranslateMessage in dynamic_odeDlg and object_loaderDlg
  in the MSVC6 examples to check if the window handle for the screen coordinates
  received in pMsg is the same as the gl drawing area; otherwise, objects
  would sometimes be selected and rotated when dragging on other areas, such 
  as sliders.


3/31/2005 - Chris

* Changes to the proxy:
  * Set m_nextBestProxyGlobalPos to proxy instead of to m_proxyGlobalPos
    when the proxy is inside the friction cone (in the 
    testFrictionAndMoveProxy method in cProxyPointForceAlgo).  This
    was needed to eliminate slipping through in the dynamic ODE
    example, and we *think* is the correct thing to do.
  * Added a member m_touchingPoint and a getter function so
    that external classes and obtain the point of contact between
    the device and objects.
* Added m_lastRot, m_lastPos, and m_historyValid members to cGenericObject,
  and update m_lastRot and m_lastPos in the setPos and setRot methods
* Changes to computeCollisionDetection methods in cWorld and cGenericObject
  to allow it to keep track of dynamic proxies, adjusting the segment on
  which collision detection is tested according to the previous position 
  of the proxy (using a new AdjustCollisionSegment method in cGenericObject) 
* Lots of changes to dynamic_ode example (in MSVC6 examples)
  * Eliminated cODEProxyPointForceAlgo, cODEMeta3dofPointer, and
    cODEWorld subclasses, since the real proxy now works.
  * Set it up so that collision detection and force rendering are started 
    when the user moves the haptic device inside the walled room, preventing
    the user from starting out stuck outside the room, while not requiring
    any extra button pushes.
  * Cleaned-up some in terms of comments, variable names, README, etc.
* Added a line to reset forces to zero in StartCommunication function of
  phantomHD.dll; otherwise, when I disabled and then re-enabled haptics,
  forces would be applied even before any were applied.
 

3/26/2005 - dmorris

* Lots of changes to the proxy:
  * Now uses the Melder friction model for static and dynamic friction;
    previously two friction models were mixed in a way that didn't
    really represent static and dynamic friction.
  * Fixed miscellaneous bugs and added lots of comments
  * Special-cased the friction model when you're in contact with two
    triangles; the friction model can no longer stop you from 
    moving in this case.  This helps solves limitations where the
    not-really-volumetric proxy gets "stuck" in corners, e.g.
    inside a tesselated cylinder

* Added a cProjectPointOnPlane() method that takes a plane represented
  by a point and a surface normal.

* Defined CHAI_DEBUG_PRINT in cMacrosGL.h; use this for
  printouts, and feel free to add a better definition for the
  Borland case.

  
3/23/2005 - Chris

* Fixed a bug in the dynamic_ode example in cODEWorld that would
  sometimes allow penetration of static meshes when a dynamic
  mesh was in motion.


3/12/2005 - Chris

* Changed phantomHD.cpp (and re-built phantomHD.dll) to stop and
  restart the scheduler when a second device is opened.  This is
  necessary to get two Omnis to work on the same computer.  (For
  versions of OpenHaptics prior to 1.02, forces will feel weird
  with two Omnis, but everything seems to work with 1.02.)

* Added a line to clear the m_totalPhantomList vector at the
  beginning of the get_phantom_name() function in PhantomDriver.cpp
  (and re-built PhantomDriver.dll).  As it was, when you opened a
  second device, it would add a second copy of all Phantom names
  and then re-sort alphabetically, resulting in both indices zero
  and one of m_totalPhantomList having the same name.  This led to
  the bug that two devices could be opened in one order, but not 
  the other, which is now fixed.

* Added dynamic_ode example in the MSVC6 examples.  It builds a 
  small room where you can push around a box, much like the
  Sensable Dice Demo, using ODE.  It also allows you to enable
  a second haptic device.  The ODE lib file and include
  files are in subfolders of the dynamic_ode example folder.
  No changes were made to CHAI; instead four classes are subclassed
  in separate files within the dynamic_ode example directory.
  Subclassing cMesh and cWorld make sense in this context and are
  probably a good example of using subclassing to extend CHAI.
  However, the cODEProxyPointForceAlgo and cODEMeta3dofPointer
  classes basically re-implement a dynamic proxy that seems to
  work better than the existing proxy algorithm, especially when
  there are multiple proxies operating in the  world.  Ideally,
  good multiple-point dynamic proxies should probably be a core
  part of CHAI; I started working on this, but it would require 
  making more changes to the CHAI proxy algorithm than I would
  want to right now, especially if we're putting out a new release
  soon.

* Removed the "const" from the parameter list of loadFromFile from
  cTexture2D, since this was causing a compile error in object_loader
  example for MSVC6.  

Earlier changes:
* Added an ActiveX version of basic_shapes example (called active_x)
  for both Borland and MSVC6.  


3/10/2005 - dmorris

* Added the finalize() and unfinalize() methods to cGenericObject


3/9/2005 - dmorris

* Fixed a bug in cmesh that was causing transparency-enabled 
  objects to disappear

* Fixed two bugs in the .obj file loader:
  * The emissive material value was being set to uninitialized random
    values for all objects (the .obj format doesn't support emmissive
    lighting)
  * Transparency was not supported (not a bug fix so much as a new
    feature)

* The object_loader example now handles loaded meshes in a much
  smarter way.  Really when you load a mesh, you want the GUI
  to reflect the relevant variables that make that mesh look
  right... so if I load a mesh with material props, the material
  props checkbox is now enabled, etc.
 
  However, because _some_ of the submeshes loaded from a file
  might have material properties, or transparency, etc., these
  checkboxes are actually gray-checked to indicate an intermediate
  state.  As before, when you operate on the checkboxes, you 
  operate on _all_ the meshes you loaded.

  Basically it does the right thing now.


3/7/2005 - fed

* Fixed bugs in the Borland and MSVC version of the board tester
  examples. We were passing a wrong data type to the command function 
  when reading encoder values.

* Fixed the workspace bug for the Phantom 6DOF. I have uploaded the
  new code but have not uploaded the new DLLs since I now have to 
  find a computer with Ghost4 and ghost3.1 to recompile and test 
  everything (fun!).

* OK, DLLs are uploaded, minus the HD one that Dan will take care of.


3/6/2005 - dmorris

* Fixed a bug in ccolorb that was initializing alpha to 1.0 instead
  of 0xff

* Fixed a bug in the 3ds loader that was turning on transparency
  for non-transparent meshes.

* Made everything in cVertex public.  This is really a struct, and
  the 'friend class cMesh' approach was somewhat limiting.

* Moved the buffer-clear from cCamera to cViewport.

* Created separate trees for rendering 2d objects before and after
  the 3d scene within cCamera.


3/5/2005 - dmorris

* Moved the viewing transformation from the projection to the
  modelview matrix... this is an OpenGL no-no and was the source
  of our prolonged lighting problems.  Now rendering the lights in
  their _local_ coordinate frame is _correct_, and lights should
  be happy as children of other things.

  The only thing this will _break_ is that any gratuitous 
  calls to glLoadIdentity on the modelview matrix (which you
  never need to do) will wipe out the camera transformation
  and make your objects disappear.

* Added an extrude() function to move vertices outward along
  their normals (to make a model "larger")

* Added comments to clight.h to clarify that the setDir and getDir
  functions have - ironically - _nothing_ to do with the direction
  of directional lights.  They affect _only_ positional lights with
  non-180 cutoff angles, aka spotlights.

  The other consequence of this is that if you want to set the
  direction of an actual directional light (the default, and
  the most common type of OpenGL light), you use setPos().  
  This is weird, but it's OpenGL's fault, since OpenGL
  uses the same array for position and direction.  It makes
  sense if you think hard about the homogeneous coordinate,
  but no one likes to think hard about the homogeneous 
  coordinate.  So if I want a light pointing directly 
  along the positive x axis, I put it at (-1,0,0) or
  (-23423423,0,0) (those are the same).

  And another consequence here is that calling rotate() has
  no effect on a directional light.  We might re-think this
  interface in the future.

  On a related note, after using OpenGL for almost 5 years, 
  I think I finally understand lights.  SWEET!

* Filled in transparency values in the .obj and .3ds loaders
  based on the current material.  In general, transparency was
  being ignored.

* Added an isTransparent() function to cMaterial() to ask whether
  a material is at least partially transparent, i.e. whether I should
  bother to turn on blending during rendering of this material.

* Added overloaded *, -, and + operators for vectors, so you can
  do vector*scalar, scalar*vector, vector+vector, vector-vector,
  and vector*vector (dot)

* The proxy was ignoring invisible objects; I made it so that the proxy
  would _not_ ignore invisible objects.  Actually, for now, I put a
  #define at the top of the proxy .cpp file called 
  CHAI_PROXY_ONLY_USES_VISIBLE_OBJECTS that controls this behavior.
  But right now that is set to 0; i.e. the proxy should _not_ ignore
  invisible objects (because often you want touch-only objects)

* Added an adjustClippingPlanes() function to the camera, copied
  from Francois' recent CHAI branch, to automatically adjust
  the clip planes to enclose your scene.

* Removed world->addChild(camera) from the MSVC demos... this 
  doesn't really serve any purpose in any recent version of CHAI,
  since the viewport tells the camera to render itself.  So actually,
  in most of our demos, the camera was getting rendered twice.

Here are some changes I want to record here that I made one or two
checkins ago, before I started this file:

* I fixed a bug in the AABB tree that was causing
  crashes on leaf deletion.  The leaves are (nicely) allocated as
  on big chunk of memory, but were being deleted individually, which
  is a heap no-no.  Now only internal nodes are deleted recursively,
  and the leaves are deleted as one big chunk.

* I also fixed some other minor bugs in the AABB tree and in the
  3ds/obj loaders

* The viewport can now be contrained to a subsection of the window.
  This is really useful for creating a "side panel" (e.g. a 
  text area at the bottom of the screen).  See setRenderArea().

* I added an onDisplayReset() function to cGenericObject, 
  which the user should call on the root of the rendering
  tree (usually cWorld) whenever you nuke your whole display context
  (most often this means when you switch to or from fullscreen).
  Implementations of this function should re-initialize things like
  textures and display lists that get lost when this happens.
  See cMesh for an example implementation.

* The world now has a variable that lets you disable the rendering
  of lights.  The problem with always rendering lights is that
  if lights are _disabled_, they _disable_ the corresponding global
  openGL light, so there was _no way_ to control a light directly 
  from your application.  Now if you want to manage your own 
  lighting, just tell the world not to render lights.  Lights are
  of course still rendered by default.
