]> git.mxchange.org Git - flightgear.git/blobdiff - src/Objects/newmat.hxx
Fixed runway-altitude problem that prevented starts at airports higher
[flightgear.git] / src / Objects / newmat.hxx
index 28199619e07d73661def82eba81bf5cafd552b8f..a1fb2e8acfa6e19c59fb302783a00f8a026630c9 100644 (file)
@@ -150,25 +150,42 @@ public:
   /**
    * Get the current state.
    */
-  virtual inline ssgStateSelector *get_state() const { return state; }
+  virtual inline ssgStateSelector *get_state () const { return state; }
 
 
   /**
-   * Add a reference to the texture.
+   * Increment the reference count for this material.
+   *
+   * A material with 0 references may be deleted by the
+   * material library.
+   */
+  virtual inline void ref () { refcount++; }
+
+
+  /**
+   * Decrement the reference count for this material.
    */
-  virtual inline void ref() { refcount++; }
+  virtual inline void deRef () { refcount--; }
 
 
   /**
-   * Remove a reference from the texture.
+   * Get the reference count for this material.
+   *
+   * @return The number of references (0 if none).
    */
-  virtual inline void deRef() { refcount--; }
+  virtual inline int getRef () const { return refcount; }
+
+protected:
 
+\f
+  ////////////////////////////////////////////////////////////////////
+  // Protected methods.
+  ////////////////////////////////////////////////////////////////////
 
   /**
-   * Get the number of references to the texture.
+   * Initialization method, invoked by all public constructors.
    */
-  virtual inline int getRef() const { return refcount; }
+  virtual void init();
 
 
 private:
@@ -186,9 +203,6 @@ private:
   ssgSimpleState *textured;
   ssgSimpleState *nontextured;
 
-  // alpha texture?
-  bool alpha;
-  
   // texture size
   double xsize, ysize;
 
@@ -217,7 +231,6 @@ private:
   // Internal constructors and methods.
   ////////////////////////////////////////////////////////////////////
 
-  FGNewMat ();
   FGNewMat (const FGNewMat &mat); // unimplemented
 
   void read_properties (const SGPropertyNode * props);