imesh/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 00046 struct iCurve : public iBase 00047 { 00049 virtual csCurve* GetOriginalObject () = 0; 00051 virtual iObject *QueryObject() = 0; 00053 virtual void SetMaterial (iMaterialWrapper* mat) = 0; 00055 virtual iMaterialWrapper* GetMaterial () = 0; 00057 virtual void SetControlPoint (int idx, int control_id) = 0; 00058 00060 virtual int GetVertexCount () const = 0; 00062 virtual int GetVertex (int idx) const = 0; 00064 virtual void SetVertex (int idx, int vt) = 0; 00065 }; 00066 00067 SCF_VERSION (iBezierFactoryState, 0, 0, 1); 00068 00088 struct iBezierFactoryState : public iBase 00089 { 00091 virtual void* GetPrivateObject () = 0; 00092 00096 virtual const csVector3& GetCurvesCenter () const = 0; 00100 virtual void SetCurvesCenter (const csVector3& cen) = 0; 00101 00105 virtual float GetCurvesScale () const = 0; 00109 virtual void SetCurvesScale (float scale) = 0; 00110 00112 virtual void AddCurveVertex (const csVector3& v, const csVector2& uv) = 0; 00114 virtual int GetCurveCount () const = 0; 00116 virtual iCurve* GetCurve (int idx) const = 0; 00118 virtual int GetCurveVertexCount () const = 0; 00120 virtual csVector3& GetCurveVertex (int i) const = 0; 00122 virtual csVector3* GetCurveVertices () const = 0; 00124 virtual csVector2& GetCurveTexel (int i) const = 0; 00126 virtual void SetCurveVertex (int idx, const csVector3& vt) = 0; 00128 virtual void SetCurveTexel (int idx, const csVector2& vt) = 0; 00130 virtual void ClearCurveVertices () = 0; 00131 00133 virtual iCurve* CreateCurve () = 0; 00135 virtual int FindCurveIndex (iCurve* curve) const = 0; 00137 virtual void RemoveCurve (int idx) = 0; 00139 virtual void RemoveCurves () = 0; 00140 00144 virtual float GetCosinusFactor () const = 0; 00150 virtual void SetCosinusFactor (float cosfact) = 0; 00151 00155 virtual void MergeTemplate (iBezierFactoryState* tpl, 00156 iMaterialWrapper* default_material = 0, 00157 csVector3* shift = 0, csMatrix3* transform = 0) = 0; 00158 }; 00159 00160 SCF_VERSION (iBezierState, 0, 0, 1); 00161 00180 struct iBezierState : public iBase 00181 { 00183 virtual void* GetPrivateObject () = 0; 00184 00186 virtual iBezierFactoryState* GetFactory () = 0; 00187 }; 00188 00189 SCF_VERSION (iCurve, 0, 1, 0); 00190 00191 #endif // __CS_IMESH_BEZIER_H__ 00192
Generated for Crystal Space by doxygen 1.2.18