Main Page | Modules | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages
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 { 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 00177 struct iBezierState : public iBase 00178 { 00180 virtual iBezierFactoryState* GetFactory () = 0; 00181 }; 00182 00183 SCF_VERSION (iCurve, 0, 1, 0); 00184 00185 #endif // __CS_IMESH_BEZIER_H__ 00186
Generated for Crystal Space by doxygen 1.3.9.1