|
1 |
package rst.geometry;
|
|
2 |
|
|
3 |
option java_outer_classname = "PolygonalPatch3DType";
|
|
4 |
|
|
5 |
import "rst/geometry/Pose.proto";
|
|
6 |
import "rst/math/Vec2DFloat.proto";
|
|
7 |
|
|
8 |
/**
|
|
9 |
* A two-dimensional patch in 3D space bounded by a polygon.
|
|
10 |
*
|
|
11 |
* In contrast to planes (with infinite extend) this kind of bounded
|
|
12 |
* patch needs a local coordinate system in order to define the
|
|
13 |
* borders of the patch. Thus, instead of the widely used point-normal
|
|
14 |
* representation, we use a complete 6D pose or describing the
|
|
15 |
* location of the plane. We define that the X and Y axes of the
|
|
16 |
* resulting coordinate system span the plane. Accordingly, the Z axis
|
|
17 |
* corresponds to the normal on the plane. The patch border is a 2D
|
|
18 |
* polygon defined by a sequence of @ref .math.Vec2DFloat objects.
|
|
19 |
*
|
|
20 |
* In order to construct a 3D representation of the patch, the 2D
|
|
21 |
* coordinates of the polygon must be extended by a Z = 0 coordinate
|
|
22 |
* and transformed using the 6D pose.
|
|
23 |
*
|
|
24 |
* TODO self intersection, convex?
|
|
25 |
*
|
|
26 |
* @author Leon Ziegler <lziegler@techfak.uni-bielefeld.de>
|
|
27 |
*/
|
|
28 |
message PolygonalPatch3D {
|
|
29 |
|
|
30 |
/**
|
|
31 |
* The 6D transformation specifying the base (X and Y axes span
|
|
32 |
* the plane in which the patch and its bounding polygon reside).
|
|
33 |
*/
|
|
34 |
required Pose base = 1;
|
|
35 |
|
|
36 |
/**
|
|
37 |
* The 2D polygon defining the border of the patch.
|
|
38 |
*
|
|
39 |
* TODO winding rule: ccw or cw w.r.t. normal (== Z axis)?
|
|
40 |
*
|
|
41 |
* Linear segments arise by connecting consecutive entries of the
|
|
42 |
* array (including an additional implicit segment connecting the
|
|
43 |
* last entry to the first entry).
|
|
44 |
*
|
|
45 |
* TODO Duplicate entries are not allowed?
|
|
46 |
* Order of entries is significant.
|
|
47 |
*/
|
|
48 |
// @constraint(len(value) >= 3)
|
|
49 |
repeated math.Vec2DFloat border = 2;
|
|
50 |
|
|
51 |
}
|
0 |
|
-
|