home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Source Code / C++ / Snippets / QD3D Juggler / Juggler Sources / CProp.h < prev    next >
Encoding:
Text File  |  1995-12-27  |  1.2 KB  |  46 lines  |  [TEXT/CWIE]

  1. //
  2. //    CProp.h
  3. //
  4. //    class CProp
  5. //    Class for manipulating a QD3D object that may be
  6. //    spun and tossed independently.
  7. //
  8. //    by James Jennings
  9. //    Started November 23, 1995
  10. //
  11. //    Note: Be sure to call MakeModel() after construction.
  12. //    I can't call MakeModel() from the constructor because
  13. //    I plan to override it.
  14. //
  15.  
  16. #pragma once
  17.  
  18. #include "CObjectMaker.h"
  19.  
  20. class CProp {
  21. private:
  22. public:
  23.                     CProp();
  24.                     CProp(const CProp & prop);
  25.                 //    CProp(const TQ3FileObject & source);
  26.     virtual            ~CProp();
  27.     
  28.             TQ3GroupObject    Get() { return mModel; }
  29.     virtual    void            SetPosition(TQ3Point3D &where);
  30.     virtual    void            SetSpinAngle(float theta);
  31.     virtual    void            SetTiltAngle(float theta);
  32.     
  33.     virtual void    MakeModel(CObjectMaker<TQ3GeometryObject> &aThing, TQ3Point3D &anOrigin);
  34. protected:
  35.     virtual void    MakeThing(CObjectMaker<TQ3GeometryObject> &aThing);
  36.     
  37. protected:
  38.             void        Dispose();
  39.     TQ3GroupObject        mModel;    // the entire model: A QD3D version of this class
  40.     TQ3GeometryObject    mThing;    // the geometry
  41.         // we keep references to the transforms so we can update them easily
  42.     TQ3TransformObject    mTranslation;
  43.     TQ3TransformObject    mSpin;            // about the Y-Axis
  44.     TQ3TransformObject    mTilt;            // change plane of the spin
  45. };
  46.