00001 #ifndef K3DSDK_NURBS_PATCH_H
00002 #define K3DSDK_NURBS_PATCH_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include <k3dsdk/mesh.h>
00024
00025 namespace k3d
00026 {
00027
00028 namespace nurbs_patch
00029 {
00030
00032 class primitive
00033 {
00034 public:
00035 primitive(
00036 mesh::indices_t& PatchFirstPoints,
00037 mesh::counts_t& PatchUPointCounts,
00038 mesh::counts_t& PatchVPointCounts,
00039 mesh::orders_t& PatchUOrders,
00040 mesh::orders_t& PatchVOrders,
00041 mesh::indices_t& PatchUFirstKnots,
00042 mesh::indices_t& PatchVFirstKnots,
00043 mesh::selection_t& PatchSelections,
00044 mesh::materials_t& PatchMaterials,
00045 mesh::indices_t& PatchPoints,
00046 mesh::weights_t& PatchPointWeights,
00047 mesh::knots_t& PatchUKnots,
00048 mesh::knots_t& PatchVKnots,
00049 mesh::indices_t& PatchFirstTrimLoops,
00050 mesh::counts_t& PatchTrimLoopCounts,
00051 mesh::indices_t& TrimLoopFirstCurves,
00052 mesh::counts_t& TrimLoopCurveCounts,
00053 mesh::selection_t& TrimLoopSelections,
00054 mesh::indices_t& CurveFirstPoints,
00055 mesh::counts_t& CurvePointCounts,
00056 mesh::orders_t& CurveOrders,
00057 mesh::indices_t& CurveFirstKnots,
00058 mesh::selection_t& CurveSelections,
00059 mesh::indices_t& CurvePoints,
00060 mesh::weights_t& CurvePointWeights,
00061 mesh::knots_t& CurveKnots,
00062 mesh::points_2d_t& Points,
00063 mesh::selection_t& PointSelections,
00064 mesh::table_t& ConstantAttributes,
00065 mesh::table_t& PatchAttributes,
00066 mesh::table_t& ParameterAttributes,
00067 mesh::table_t& VertexAttributes
00068 );
00069
00070 mesh::indices_t& patch_first_points;
00071 mesh::counts_t& patch_u_point_counts;
00072 mesh::counts_t& patch_v_point_counts;
00073 mesh::orders_t& patch_u_orders;
00074 mesh::orders_t& patch_v_orders;
00075 mesh::indices_t& patch_u_first_knots;
00076 mesh::indices_t& patch_v_first_knots;
00077 mesh::selection_t& patch_selections;
00078 mesh::materials_t& patch_materials;
00079 mesh::indices_t& patch_points;
00080 mesh::weights_t& patch_point_weights;
00081 mesh::knots_t& patch_u_knots;
00082 mesh::knots_t& patch_v_knots;
00083 mesh::indices_t& patch_first_trim_loops;
00084 mesh::counts_t& patch_trim_loop_counts;
00085 mesh::indices_t& trim_loop_first_curves;
00086 mesh::counts_t& trim_loop_curve_counts;
00087 mesh::selection_t& trim_loop_selections;
00088 mesh::indices_t& curve_first_points;
00089 mesh::counts_t& curve_point_counts;
00090 mesh::orders_t& curve_orders;
00091 mesh::indices_t& curve_first_knots;
00092 mesh::selection_t& curve_selections;
00093 mesh::indices_t& curve_points;
00094 mesh::weights_t& curve_point_weights;
00095 mesh::knots_t& curve_knots;
00096 mesh::points_2d_t& points;
00097 mesh::selection_t& point_selections;
00098 mesh::table_t& constant_attributes;
00099 mesh::table_t& patch_attributes;
00100 mesh::table_t& parameter_attributes;
00101 mesh::table_t& vertex_attributes;
00102 };
00103
00105 class const_primitive
00106 {
00107 public:
00108 const_primitive(
00109 const mesh::indices_t& PatchFirstPoints,
00110 const mesh::counts_t& PatchUPointCounts,
00111 const mesh::counts_t& PatchVPointCounts,
00112 const mesh::orders_t& PatchUOrders,
00113 const mesh::orders_t& PatchVOrders,
00114 const mesh::indices_t& PatchUFirstKnots,
00115 const mesh::indices_t& PatchVFirstKnots,
00116 const mesh::selection_t& PatchSelections,
00117 const mesh::materials_t& PatchMaterials,
00118 const mesh::indices_t& PatchPoints,
00119 const mesh::weights_t& PatchPointWeights,
00120 const mesh::knots_t& PatchUKnots,
00121 const mesh::knots_t& PatchVKnots,
00122 const mesh::indices_t& PatchFirstTrimLoops,
00123 const mesh::counts_t& PatchTrimLoopCounts,
00124 const mesh::indices_t& TrimLoopFirstCurves,
00125 const mesh::counts_t& TrimLoopCurveCounts,
00126 const mesh::selection_t& TrimLoopSelections,
00127 const mesh::indices_t& CurveFirstPoints,
00128 const mesh::counts_t& CurvePointCounts,
00129 const mesh::orders_t& CurveOrders,
00130 const mesh::indices_t& CurveFirstKnots,
00131 const mesh::selection_t& CurveSelections,
00132 const mesh::indices_t& CurvePoints,
00133 const mesh::weights_t& CurvePointWeights,
00134 const mesh::knots_t& CurveKnots,
00135 const mesh::points_2d_t& Points,
00136 const mesh::selection_t& PointSelections,
00137 const mesh::table_t& ConstantAttributes,
00138 const mesh::table_t& PatchAttributes,
00139 const mesh::table_t& ParameterAttributes,
00140 const mesh::table_t& VertexAttributes
00141 );
00142
00143 const_primitive(primitive& Primitive);
00144
00145 const mesh::indices_t& patch_first_points;
00146 const mesh::counts_t& patch_u_point_counts;
00147 const mesh::counts_t& patch_v_point_counts;
00148 const mesh::orders_t& patch_u_orders;
00149 const mesh::orders_t& patch_v_orders;
00150 const mesh::indices_t& patch_u_first_knots;
00151 const mesh::indices_t& patch_v_first_knots;
00152 const mesh::selection_t& patch_selections;
00153 const mesh::materials_t& patch_materials;
00154 const mesh::indices_t& patch_points;
00155 const mesh::weights_t& patch_point_weights;
00156 const mesh::knots_t& patch_u_knots;
00157 const mesh::knots_t& patch_v_knots;
00158 const mesh::indices_t& patch_first_trim_loops;
00159 const mesh::counts_t& patch_trim_loop_counts;
00160 const mesh::indices_t& trim_loop_first_curves;
00161 const mesh::counts_t& trim_loop_curve_counts;
00162 const mesh::selection_t& trim_loop_selections;
00163 const mesh::indices_t& curve_first_points;
00164 const mesh::counts_t& curve_point_counts;
00165 const mesh::orders_t& curve_orders;
00166 const mesh::indices_t& curve_first_knots;
00167 const mesh::selection_t& curve_selections;
00168 const mesh::indices_t& curve_points;
00169 const mesh::weights_t& curve_point_weights;
00170 const mesh::knots_t& curve_knots;
00171 const mesh::points_2d_t& points;
00172 const mesh::selection_t& point_selections;
00173 const mesh::table_t& constant_attributes;
00174 const mesh::table_t& patch_attributes;
00175 const mesh::table_t& parameter_attributes;
00176 const mesh::table_t& vertex_attributes;
00177 };
00178
00181 primitive* create(mesh& Mesh);
00182
00185 primitive* create(mesh::primitive& Primitive);
00186
00189 const_primitive* validate(const mesh& Mesh, const mesh::primitive& GenericPrimitive);
00192 primitive* validate(const mesh& Mesh, mesh::primitive& GenericPrimitive);
00195 primitive* validate(const mesh& Mesh, pipeline_data<mesh::primitive>& GenericPrimitive);
00196
00197 }
00198
00199 }
00200
00201 #endif // !K3DSDK_NURBS_PATCH_H
00202