Go to the documentation of this file.
37 #ifndef GEOMETRIC_SHAPES_SHAPES_
38 #define GEOMETRIC_SHAPES_SHAPES_
40 #if __cplusplus <= 199711L
41 #error This header requires at least C++11
87 virtual void print(std::ostream& out = std::cout)
const;
93 void padd(
double padding);
119 void print(std::ostream& out = std::cout)
const override;
146 void scale(
double scaleRadius,
double scaleLength);
153 void padd(
double paddRadius,
double paddLength);
162 void scaleAndPadd(
double scaleRadius,
double scaleLength,
double paddRadius,
double paddLength);
166 void print(std::ostream& out = std::cout)
const override;
185 Cone(
double r,
double l);
195 void scale(
double scaleRadius,
double scaleLength);
202 void padd(
double paddRadius,
double paddLength);
211 void scaleAndPadd(
double scaleRadius,
double scaleLength,
double paddRadius,
double paddLength);
215 void print(std::ostream& out = std::cout)
const override;
233 Box(
double x,
double y,
double z);
244 void scale(
double scaleX,
double scaleY,
double scaleZ);
252 void padd(
double paddX,
double paddY,
double paddZ);
263 void scaleAndPadd(
double scaleX,
double scaleY,
double scaleZ,
double paddX,
double paddY,
double paddZ);
267 void print(std::ostream& out = std::cout)
const override;
288 Mesh(
unsigned int v_count,
unsigned int t_count);
300 void scale(
double scaleX,
double scaleY,
double scaleZ);
311 void padd(
double paddX,
double paddY,
double paddZ);
325 void scaleAndPadd(
double scaleX,
double scaleY,
double scaleZ,
double paddX,
double paddY,
double paddZ);
329 void print(std::ostream& out = std::cout)
const override;
371 Plane(
double pa,
double pb,
double pc,
double pd);
377 void print(std::ostream& out = std::cout)
const override;
390 OcTree(
const std::shared_ptr<const octomap::OcTree>& t);
396 void print(std::ostream& out = std::cout)
const override;
400 std::shared_ptr<const octomap::OcTree>
octree;
void print(std::ostream &out=std::cout) const override
Print information about this shape.
double radius
The radius of the cone.
void scaleAndPadd(double scale, double padd) override
Uniformly scale and padd this shape.
double size[3]
x, y, z dimensions of the box (axis-aligned)
Definition of various shapes. No properties such as position are included. These are simply the descr...
double length
The length (height) of the cone.
void print(std::ostream &out=std::cout) const override
Print information about this shape.
void scaleAndPadd(double scaleRadius, double scaleLength, double paddRadius, double paddLength)
Scale this shape by a non-uniform factor and then add non-uniform padding.
std::shared_ptr< const octomap::OcTree > octree
unsigned int * triangles
The vertex indices for each triangle triangle k has vertices at index (3k, 3k+1, 3k+2) = (v1,...
Box * clone() const override
Create a copy of this shape.
void print(std::ostream &out=std::cout) const override
Print information about this shape.
void padd(double paddRadius, double paddLength)
Add non-uniform padding to this shape.
double * vertex_normals
The normal to each vertex; unit vector represented as (x,y,z); If missing from the mesh,...
void print(std::ostream &out=std::cout) const override
Print information about this shape.
Definition of a cylinder Length is along z axis. Origin is at center of mass.
void print(std::ostream &out=std::cout) const override
Print information about this shape.
void scaleAndPadd(double scale, double padd) override
Uniformly scale and padd this shape.
Cylinder * clone() const override
Create a copy of this shape.
unsigned int triangle_count
The number of triangles formed with the vertices.
void print(std::ostream &out=std::cout) const override
Print information about this shape.
std::ostream & operator<<(std::ostream &ss, ShapeType type)
void scale(double scale)
Uniformly scale this shape by a factor.
A basic definition of a shape. Shapes are considered centered at origin.
void mergeVertices(double threshold)
Merge vertices that are very close to each other, up to a threshold.
Definition of a triangle mesh By convention the "center" of the shape is at the origin....
void scale(double scaleX, double scaleY, double scaleZ)
Scale this shape by a non-uniform factor.
static const std::string STRING_NAME
The type of the shape, as a string.
bool isFixed() const override
Return a flag indicating whether this shape can be scaled and/or padded.
void scale(double scaleX, double scaleY, double scaleZ)
Scale this shape by a non-uniform factor.
void computeVertexNormals()
Compute vertex normals by averaging from adjacent triangle normals, weighted using magnitude of angle...
void padd(double padding)
Add uniform padding to this shape.
static const std::string STRING_NAME
The type of the shape, as a string.
double radius
The radius of the sphere.
std::shared_ptr< Shape > ShapePtr
Shared pointer to a Shape.
Definition of a plane with equation ax + by + cz + d = 0.
Definition of a box Aligned with the XYZ axes.
static const std::string STRING_NAME
The type of the shape, as a string.
unsigned int vertex_count
The number of available vertices.
virtual void scaleAndPadd(double scale, double padd)=0
Uniformly scale and padd this shape.
ShapeType
A list of known shape types.
double a
The plane equation is ax + by + cz + d = 0.
Cone * clone() const override
Create a copy of this shape.
ShapeType type
The type of the shape.
void computeTriangleNormals()
Compute the normals of each triangle from its vertices via cross product.
void scale(double scaleRadius, double scaleLength)
Scale this shape by a non-uniform factor.
static const std::string STRING_NAME
The type of the shape, as a string.
double * vertices
The position for each vertex vertex k has values at index (3k, 3k+1, 3k+2) = (x,y,...
Representation of an octomap::OcTree as a Shape.
void padd(double paddRadius, double paddLength)
Add non-uniform padding to this shape.
double * triangle_normals
The normal to each triangle; unit vector represented as (x,y,z); If missing from the mesh,...
void scaleAndPadd(double scale, double padd) override
Uniformly scale and padd this shape.
void padd(double paddX, double paddY, double paddZ)
Add non-uniform padding to this shape.
void scale(double scaleRadius, double scaleLength)
Scale this shape by a non-uniform factor.
void scaleAndPadd(double scaleX, double scaleY, double scaleZ, double paddX, double paddY, double paddZ)
Scale this shape by a non-uniform factor and then add non-uniform padding.
void scaleAndPadd(double scaleX, double scaleY, double scaleZ, double paddX, double paddY, double paddZ)
Scale this shape by a non-uniform factor and then add non-uniform padding.
Sphere * clone() const override
Create a copy of this shape.
virtual bool isFixed() const
Return a flag indicating whether this shape can be scaled and/or padded.
static const std::string STRING_NAME
The type of the shape, as a string.
virtual Shape * clone() const =0
Create a copy of this shape.
virtual void print(std::ostream &out=std::cout) const
Print information about this shape.
void padd(double paddX, double paddY, double paddZ)
Add non-uniform padding to this shape.
void scaleAndPadd(double scaleRadius, double scaleLength, double paddRadius, double paddLength)
Scale this shape by a non-uniform factor and then add non-uniform padding.
double radius
The radius of the cylinder.
OcTree * clone() const override
Create a copy of this shape.
std::shared_ptr< const Shape > ShapeConstPtr
Shared pointer to a const Shape.
Mesh * clone() const override
Create a copy of this shape.
double length
The length of the cylinder.
Definition of a cone Tip is on positive z axis. Center of base is on negative z axis....
static const std::string STRING_NAME
The type of the shape, as a string.
static const std::string STRING_NAME
The type of the shape, as a string.
Plane * clone() const override
Create a copy of this shape.
void print(std::ostream &out=std::cout) const override
Print information about this shape.
bool isFixed() const override
Return a flag indicating whether this shape can be scaled and/or padded.
geometric_shapes
Author(s): Ioan Sucan
, Gil Jones
autogenerated on Tue Aug 13 2024 02:40:57