CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

bezier.h

00001 /*
00002     Copyright (C) 1998-2001 by Jorrit Tyberghein
00003 
00004     This library is free software; you can redistribute it and/or
00005     modify it under the terms of the GNU Library General Public
00006     License as published by the Free Software Foundation; either
00007     version 2 of the License, or (at your option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful,
00010     but WITHOUT ANY WARRANTY; without even the implied warranty of
00011     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012     Library General Public License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public
00015     License along with this library; if not, write to the Free
00016     Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017 */
00018 
00019 #ifndef __CS_IMESH_BEZIER_H__
00020 #define __CS_IMESH_BEZIER_H__
00021 
00022 #include "csutil/scf.h"
00023 #include "csutil/flags.h"
00024 
00025 class csCurve;
00026 class csVector2;
00027 class csVector3;
00028 class csMatrix3;
00029 struct iSector;
00030 struct iCurve;
00031 struct iMaterialWrapper;
00032 struct iMovable;
00033 
00037 struct iCurve : public iBase
00038 {
00040   virtual csCurve* GetOriginalObject () = 0;
00042   virtual iObject *QueryObject() = 0;
00044   virtual void SetMaterial (iMaterialWrapper* mat) = 0;
00046   virtual iMaterialWrapper* GetMaterial () = 0;
00048   virtual void SetControlPoint (int idx, int control_id) = 0;
00049 
00051   virtual int GetVertexCount () const = 0;
00053   virtual int GetVertex (int idx) const = 0;
00055   virtual void SetVertex (int idx, int vt) = 0;
00056 };
00057 
00058 SCF_VERSION (iBezierFactoryState, 0, 0, 1);
00059 
00064 struct iBezierFactoryState : public iBase
00065 {
00067   virtual void* GetPrivateObject () = 0;
00068 
00072   virtual const csVector3& GetCurvesCenter () const = 0;
00076   virtual void SetCurvesCenter (const csVector3& cen) = 0;
00077 
00081   virtual float GetCurvesScale () const = 0;
00085   virtual void SetCurvesScale (float scale) = 0;
00086 
00088   virtual void AddCurveVertex (const csVector3& v, const csVector2& uv) = 0;
00090   virtual int GetCurveCount () const = 0;
00092   virtual iCurve* GetCurve (int idx) const = 0;
00094   virtual int GetCurveVertexCount () const = 0;
00096   virtual csVector3& GetCurveVertex (int i) const = 0;
00098   virtual csVector3* GetCurveVertices () const = 0;
00100   virtual csVector2& GetCurveTexel (int i) const = 0;
00102   virtual void SetCurveVertex (int idx, const csVector3& vt) = 0;
00104   virtual void SetCurveTexel (int idx, const csVector2& vt) = 0;
00106   virtual void ClearCurveVertices () = 0;
00107 
00109   virtual iCurve* CreateCurve () = 0;
00111   virtual int FindCurveIndex (iCurve* curve) const = 0;
00113   virtual void RemoveCurve (int idx) = 0;
00115   virtual void RemoveCurves () = 0;
00116 
00120   virtual float GetCosinusFactor () const = 0;
00126   virtual void SetCosinusFactor (float cosfact) = 0;
00127 
00131   virtual void MergeTemplate (iBezierFactoryState* tpl,
00132         iMaterialWrapper* default_material = NULL,
00133         csVector3* shift = NULL, csMatrix3* transform = NULL) = 0;
00134 };
00135 
00136 SCF_VERSION (iBezierState, 0, 0, 1);
00137 
00142 struct iBezierState : public iBase
00143 {
00145   virtual void* GetPrivateObject () = 0;
00146 
00148   virtual iBezierFactoryState* GetFactory () = 0;
00149 };
00150 
00151 SCF_VERSION (iCurve, 0, 1, 0);
00152 
00153 #endif // __CS_IMESH_BEZIER_H__
00154 

Generated for Crystal Space by doxygen 1.2.14