home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-12-27 | 2.0 KB | 69 lines | [TEXT/CWIE] |
- //
- // CQD3DPane.h
- //
- // class CQD3DPane [abstract]
- // A Pane for rendering a QuickDraw 3D view.
- //
- // by James Jennings
- // Started November 21, 1995
- // Made abstract November 22.
- //
- // Note: Be sure to turn off "Erase on Update" in the containing window
- // or else you'll get lots of flickering. (Assuming you use updates
- // for all of you're drawing.)
- //
-
- #pragma once
-
- #include <LPane.h>
- #include <QD3DView.h>
- #include <QD3DShader.h>
-
- class CQD3DPane : public LPane {
- public:
- enum { class_ID = 'Q3pn' };
- // This is an abstract class: we can't create it directly from a stream.
- // static CQD3DPane* CreateQD3DPaneStream(LStream *inStream);
-
- CQD3DPane();
- CQD3DPane(const CQD3DPane &inOriginal);
- CQD3DPane(LStream *inStream);
-
- virtual ~CQD3DPane();
-
- virtual void FinishCreateSelf();
- protected:
- // overridable functions for FinishCreate();
- virtual void MakeView();
- virtual void MakeCamera() = 0; // must override
- virtual void MakeLightGroup() {} // optional
- virtual void MakeDrawContext(); // standard is ok
- virtual void MakeRenderer(); // standard is ok
-
- virtual void MakeModel() = 0; // must override
-
- // Style accessors, called by FinishCreate()
- virtual TQ3InterpolationStyle GetInterpolationStyle()
- { return kQ3InterpolationStyleNone; }
- virtual TQ3BackfacingStyle GetBackfacingStyle()
- { return kQ3BackfacingStyleBoth; }
- virtual TQ3FillStyle GetFillStyle()
- { return kQ3FillStyleFilled; }
- // called by MakeDrawContext()
- virtual void GetClearImageColor(TQ3ColorARGB *color)
- { ::Q3ColorARGB_Set(color, 1.0, 0.2, 0.2, 0.2); }
-
- // Rendering
- virtual void DrawSelf();
- protected:
- virtual TQ3Status SubmitScene();
- protected:
- TQ3ViewObject mView ; // the view for the scene
- TQ3GroupObject mModel ; // object in the scene being modelled
- TQ3StyleObject mInterpolation ; // interpolation style used when rendering
- TQ3StyleObject mBackFacing ; // whether to draw shapes that face away from the camera
- TQ3StyleObject mFillStyle ; // whether drawn as solid filled object or decomposed to components
-
- };
-
-