## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# 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 iBase
    00051 {
    00053   virtual csCurve* GetOriginalObject () = 0;
    00055   virtual iObject *QueryObject() = 0;
    00057   virtual void SetMaterial (iMaterialWrapper* mat) = 0;
    00059   virtual iMaterialWrapper* GetMaterial () = 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
    00071 SCF_VERSION (iBezierFactoryState, 0, 0, 1);
    00072
    00088 struct iBezierFactoryState : public iBase
    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 void 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
    00157 SCF_VERSION (iBezierState, 0, 0, 1);
    00158
    00173 struct iBezierState : public iBase
    00174 {
    00176   virtual iBezierFactoryState* GetFactory () = 0;
    00177 };
    00178
    00179 SCF_VERSION (iCurve, 0, 1, 0);
    00180
    00183 #endif // __CS_IMESH_BEZIER_H__
    00184