00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #ifndef __HOM_Surface_h__
00017 #define __HOM_Surface_h__
00018
00019 #include "HOM_API.h"
00020 #include "HOM_Defines.h"
00021 #include "HOM_Errors.h"
00022 #include "HOM_Prim.h"
00023 #include "HOM_Vertex.h"
00024 #include <vector>
00025 #include <stdexcept>
00026 class HOM_Vector3;
00027 class HOM_Vector4;
00028
00029 SWIGOUT(%rename(Surface) HOM_Surface;)
00030
00031 class HOM_API HOM_Surface : virtual public HOM_Prim
00032 {
00033 public:
00034 HOM_Surface()
00035 { HOM_CONSTRUCT_OBJECT(this) }
00036 HOM_Surface(const HOM_Surface &surface)
00037 : HOM_Prim(surface)
00038 { HOM_CONSTRUCT_OBJECT(this) }
00039 virtual ~HOM_Surface()
00040 { HOM_DESTRUCT_OBJECT(this) }
00041
00042
00043
00044 SWIGOUT(virtual std::string __repr__()
00045 throw(HOM_ObjectWasDeleted, HOM_Error) = 0;)
00046
00047
00048 virtual int numRows() throw(HOM_ObjectWasDeleted, HOM_Error) = 0;
00049 virtual int numCols() throw(HOM_ObjectWasDeleted, HOM_Error) = 0;
00050
00051 SWIGOUT(%newobject vertex;)
00052 virtual HOM_Vertex *vertex(int u_index, int v_index)
00053 throw(std::out_of_range, HOM_ObjectWasDeleted, HOM_Error) = 0;
00054
00055 SWIGPYTHONOUT(%feature("autodoc",
00056 "verticesInRow(self, v_index) -> tuple of Vertex") verticesInRow;)
00057 virtual std::vector<HOM_ElemPtr<HOM_Vertex> > verticesInRow(int v_index)
00058 throw(std::out_of_range, HOM_ObjectWasDeleted, HOM_Error) = 0;
00059
00060 SWIGPYTHONOUT(%feature("autodoc",
00061 "verticesInCol(self, u_index) -> tuple of Vertex") verticesCol;)
00062 virtual std::vector<HOM_ElemPtr<HOM_Vertex> > verticesInCol(int u_index)
00063 throw(std::out_of_range, HOM_ObjectWasDeleted, HOM_Error) = 0;
00064
00065
00066 virtual bool isClosedInU() throw(HOM_ObjectWasDeleted, HOM_Error) = 0;
00067 virtual bool isClosedInV() throw(HOM_ObjectWasDeleted, HOM_Error) = 0;
00068
00069 SWIGOUT(%newobject positionAt;)
00070 virtual HOM_Vector4 *positionAt(float u, float v)
00071 throw(HOM_ObjectWasDeleted, HOM_Error) = 0;
00072
00073 SWIGOUT(%newobject normalAt;)
00074 virtual HOM_Vector3 *normalAt(float u, float v)
00075 throw(HOM_ObjectWasDeleted, HOM_Error) = 0;
00076
00077
00078
00079
00080 SWIGOUT(%ignore boostAnyAttribValueAt;)
00081 virtual boost::any boostAnyAttribValueAt(
00082 const char *name, float u, float v, int du=0, int dv=0)
00083 throw(HOM_OperationFailed, HOM_ObjectWasDeleted, HOM_Error) = 0;
00084
00085 SWIGOUT(%ignore boostAnyAttribValueAt;)
00086 virtual boost::any boostAnyAttribValueAt(
00087 HOM_Attrib &attrib, float u, float v, int du=0, int dv=0)
00088 throw(HOM_OperationFailed, HOM_ObjectWasDeleted, HOM_Error) = 0;
00089
00090 #ifdef SWIG
00091 %extend
00092 {
00093 SWIGPYTHONOUT(%feature("autodoc",
00094 "attribValueAt(self, name, u, v, du=0, dv=0) "
00095 "-> int, float, string or tuple") attribValueAt;)
00096 InterpreterObject attribValueAt(
00097 const char *name, float u, float v, int du=0, int dv=0)
00098 throw(HOM_OperationFailed, HOM_ObjectWasDeleted, HOM_Error)
00099 {
00100 return HOMboostAnyToInterpreterObject(
00101 self->boostAnyAttribValueAt(name, u, v, du, dv));
00102 }
00103
00104 SWIGPYTHONOUT(%feature("autodoc",
00105 "attribValueAt(self, attrib, u, v, du=0, dv=0) "
00106 "-> int, float, string or tuple") attribValueAt;)
00107 InterpreterObject attribValueAt(
00108 HOM_Attrib &attrib, float u, float v, int du=0, int dv=0)
00109 throw(HOM_OperationFailed, HOM_ObjectWasDeleted, HOM_Error)
00110 {
00111 return HOMboostAnyToInterpreterObject(
00112 self->boostAnyAttribValueAt(attrib, u, v, du, dv));
00113 }
00114 }
00115 #endif
00116
00117
00118 SWIGOUT(%kwargs addRow;)
00119 virtual void addRow(int after=-1)
00120 throw(std::out_of_range, HOM_GeometryPermissionError,
00121 HOM_ObjectWasDeleted, HOM_Error) = 0;
00122
00123 SWIGOUT(%kwargs addCol;)
00124 virtual void addCol(int after=-1)
00125 throw(std::out_of_range, HOM_GeometryPermissionError,
00126 HOM_ObjectWasDeleted, HOM_Error) = 0;
00127 };
00128
00129 #endif