CrystalSpace

Public API Reference

imesh/bezier.h

Go to the documentation of this file.
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 
00026 #include "csutil/scf.h"
00027 
00028 class csCurve;
00029 class csFlags;
00030 class csMatrix3;
00031 class csVector2;
00032 class csVector3;
00033 
00034 struct iMaterialWrapper;
00035 struct iObject;
00036 
00050 struct iCurve : public virtual iBase
00051 {
00052   SCF_INTERFACE (iCurve,  1, 0, 0);
00053   
00055   virtual iObject *QueryObject() = 0;
00057   virtual void SetMaterial (iMaterialWrapper* mat) = 0;
00059   virtual iMaterialWrapper* GetMaterial () const = 0;
00061   virtual void SetControlPoint (int idx, int control_id) = 0;
00062 
00064   virtual int GetVertexCount () const = 0;
00066   virtual int GetVertex (int idx) const = 0;
00068   virtual void SetVertex (int idx, int vt) = 0;
00069 };
00070 
00086 struct iBezierFactoryState : public virtual iBase
00087 {
00088   SCF_INTERFACE (iBezierFactoryState, 1, 0, 0);
00089   
00093   virtual const csVector3& GetCurvesCenter () const = 0;
00097   virtual void SetCurvesCenter (const csVector3& cen) = 0;
00098 
00102   virtual float GetCurvesScale () const = 0;
00106   virtual void SetCurvesScale (float scale) = 0;
00107 
00109   virtual size_t AddCurveVertex (const csVector3& v, const csVector2& uv) = 0;
00111   virtual int GetCurveCount () const = 0;
00113   virtual iCurve* GetCurve (int idx) const = 0;
00115   virtual int GetCurveVertexCount () const = 0;
00117   virtual csVector3& GetCurveVertex (int i) const = 0;
00119   virtual csVector3* GetCurveVertices () const = 0;
00121   virtual csVector2& GetCurveTexel (int i) const = 0;
00123   virtual void SetCurveVertex (int idx, const csVector3& vt) = 0;
00125   virtual void SetCurveTexel (int idx, const csVector2& vt) = 0;
00127   virtual void ClearCurveVertices () = 0;
00128 
00130   virtual iCurve* CreateCurve () = 0;
00132   virtual int FindCurveIndex (iCurve* curve) const = 0;
00134   virtual void RemoveCurve (int idx) = 0;
00136   virtual void RemoveCurves () = 0;
00137 
00141   virtual float GetCosinusFactor () const = 0;
00147   virtual void SetCosinusFactor (float cosfact) = 0;
00148 
00152   virtual void MergeTemplate (iBezierFactoryState* tpl,
00153         iMaterialWrapper* default_material = 0,
00154         csVector3* shift = 0, csMatrix3* transform = 0) = 0;
00155 };
00156 
00171 struct iBezierState : public virtual iBase
00172 {
00173   SCF_INTERFACE (iBezierState, 1, 0, 0);
00174   
00176   virtual iBezierFactoryState* GetFactory () = 0;
00177 };
00178 
00181 #endif // __CS_IMESH_BEZIER_H__
00182 

Generated for Crystal Space by doxygen 1.4.7