| EdSceneObject.PAS Updated 05 Apr 2018 | Upper levels: - QuArK Information Base - 4. The Source Code - 4.5. File-by-file descriptions - 4.5.10. The 3D-Render classes

4.5.10.1. EdSceneObject.PAS | [ Prev - Up - Next ]

The abstract base-class for a 3D-Render window-class, and the texture-manager object which stores used textures for the 3D-view.

Index

- - The 'TSceneObject' class (05 Apr 2018)

The 'TSceneObject' class | Decker, DanielPharos - 05 Apr 2018 | [ Top ]

Let me see, if I can explain what this class is all about. Mind you, I have not understood it completely, so parts of this look-through explanation may be wrong. It's also very incomplete, but when you're working with the code, most of it will explain itself. The idea of `TSceneObject` is to encapsulate the complex data structures and 3D-render API calls, in a general class interface for QuArK to use. This makes it much easier to add additional renderers later, because the generic interface with QuArK will be the same. It does not contain any code for a specific 3D-render, so one has to inherit from it and create a specialized class. The main function calls into this abstract class are the following:
    procedure Init( ... ); virtual; abstract;
This function must initialize the window, setup default data-structures and options, and ready the 3D-render API calls by for instance load a DLL. It also applies the settings from the Configuration, and saved the camera position. It is not defined in the TSceneObject class, as can be seen on the `abstract` keyword. So all classes that inherit from TSceneObject, must define the contents of this function themselves.
    procedure BuildScene( ... );
info missing...
    procedure Render3DView; virtual; abstract;
This procedure has to render the image data. It's also possible it has to output the actual image to the screen, I'm not sure.
    procedure AddPolyFace( ... );
info missing...
    procedure AddModel( ... );
info missing...
    procedure AddBezier( ... );
info missing...
    procedure AddLight( ... ); virtual;
info missing...
    function StartBuildScene( ... ) : TBuildMode; virtual; abstract;
info missing...
    procedure EndBuildScene; virtual;
info missing...

Copyright (c) 2021, GNU General Public License by The QuArK (Quake Army Knife) Community - http://quark.sourceforge.net/ | [ Prev - Top - Next ]