Graphite  Version 3
An experimental 3D geometry processing program
mesh_grob_shapes_commands.h
Go to the documentation of this file.
1 /*
2  * OGF/Graphite: Geometry and Graphics Programming Library + Utilities
3  * Copyright (C) 2000-2009 INRIA - Project ALICE
4  *
5  * This program is free software; you can redistribute it and/or modify
6  * it under the terms of the GNU General Public License as published by
7  * the Free Software Foundation; either version 2 of the License, or
8  * (at your option) any later version.
9  *
10  * This program is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13  * GNU General Public License for more details.
14  *
15  * You should have received a copy of the GNU General Public License
16  * along with this program; if not, write to the Free Software
17  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18  *
19  * If you modify this software, you should include a notice giving the
20  * name of the person performing the modification, the date of modification,
21  * and the reason for such modification.
22  *
23  * Contact: Bruno Levy - levy@loria.fr
24  *
25  * Project ALICE
26  * LORIA, INRIA Lorraine,
27  * Campus Scientifique, BP 239
28  * 54506 VANDOEUVRE LES NANCY CEDEX
29  * FRANCE
30  *
31  * Note that the GNU General Public License does not permit incorporating
32  * the Software into proprietary programs.
33  *
34  * As an exception to the GPL, Graphite can be linked
35  * with the following (non-GPL) libraries:
36  * Qt, SuperLU, WildMagic and CGAL
37  */
38 
39 
40 #ifndef H_OGF_MESH_COMMANDS_MESH_GROB_SHAPES_COMMANDS_H
41 #define H_OGF_MESH_COMMANDS_MESH_GROB_SHAPES_COMMANDS_H
42 
43 #include <OGF/mesh/common/common.h>
45 
51 namespace OGF {
52 
57  public:
58 
63 
68 
69  gom_slots:
70 
75  void create_square(
76  double x1=0, double y1=0, double z1=0,
77  double x2=1, double y2=0, double z2=0,
78  double x3=1, double y3=1, double z3=0,
79  double x4=0, double y4=1, double z4=0
80  );
81 
87  double x1=0, double y1=0, double z1=0,
88  double x2=1, double y2=1, double z2=1
89  );
90 
96  const vec3& center = vec3(0,0,0),
97  const vec3& X_axis = vec3(0.25,0,0),
98  const vec3& Y_axis = vec3(0,0.25,0),
99  const vec3& Z_axis = vec3(0,0,1),
100  index_t precision = 10
101  );
102 
108 
116  index_t precision = 4,
117  double radius = 1.0,
118  const vec3& center = vec3(0,0,0)
119  );
120 
126  const vec3& center = vec3(0,0,0),
127  double R = 1.0,
128  index_t nb_edges = 6,
129  bool triangulate = true
130  );
131 
140  const GrobName& grob,
141  index_t nb_split = 0
142  );
143  };
144 
145 }
146 
147 #endif
Base class for Commands related with a MeshGrob object.
Commands that create simple shapes.
MeshGrobShapesCommands()
MeshGrobShapesCommands constructor.
void create_cube(double x1=0, double y1=0, double z1=0, double x2=1, double y2=1, double z2=1)
Creates a new cube in the current mesh. \menu /Surface/Shapes.
~MeshGrobShapesCommands() override
MeshGrobShapesCommands destructor.
void create_sphere(index_t precision=4, double radius=1.0, const vec3 &center=vec3(0, 0, 0))
Creates a mesh that approximates a sphere.
void create_ngon(const vec3 &center=vec3(0, 0, 0), double R=1.0, index_t nb_edges=6, bool triangulate=true)
Creates a new ngon in the current mesh. \menu /Surface/Shapes.
void create_from_bounding_box(const GrobName &grob, index_t nb_split=0)
Creates a surfacic mesh from the bounding box of an object.
void create_cylinder(const vec3 &center=vec3(0, 0, 0), const vec3 &X_axis=vec3(0.25, 0, 0), const vec3 &Y_axis=vec3(0, 0.25, 0), const vec3 &Z_axis=vec3(0, 0, 1), index_t precision=10)
Creates a new cylinder in the current mesh. \menu /Surface/Shapes.
void create_icosahedron()
Creates a new icosahedron in the current mesh. \menu /Surface/Shapes.
A template class for strings that need to have a specific type in the GOM system.
Definition: properties.h:218
Base class for Commands related with a MeshGrob object.
vecng< 3, Numeric::float64 > vec3
Represents points and vectors in 3d.
Definition: geometry.h:65
geo_index_t index_t
The type for storing and manipulating indices.
Definition: numeric.h:329
Global Graphite namespace.
Definition: common.h:76
Definitions common to all include files in the mesh library.