Inherits opentl::core::cvdata::CvData.
Classes | |
| struct | Edge |
| Structure for an edge. More... | |
| struct | EdgeReferredByFace |
| Structure to hold geometric information about faces this edge is part of. More... | |
| struct | Face |
| Structure for a face. More... | |
| struct | Material |
| struct | Point |
| struct | TexCoord |
Public Member Functions | |
| void | deleteStoredData () |
| Delete stored shape appearance data in this class. | |
| int | dimension () |
| Returns number of dimensions of object shape 2 = 2d, 3 = 3d. | |
| void | getCircumCircleRadius (double &circumCircleObjectRadius, int partIdx=0) |
| Calculate Radius of object mesh circumcircle. | |
| opentl::core::cvdata::Image * | getMaterialByName (const char *materialName) |
| Retrieve a given appearance image by name. | |
| opentl::core::cvdata::Image * | getObjTexture () const |
| Get texture of an object for a certain pose and sensor. | |
| void | getShapeBoundingLimits (double &xsize, double &ysize, double &zsize, double &circumCircleObjectRadius, int partIdx=0) |
| Calculate rectangular bounding limits of object's shape. | |
| void | getShapeBoundingLimitsOfFace (unsigned int faceId, double &x, double &y, double &width, double &height) |
| opentl::core::cvdata::Skeleton * | getSkeleton () const |
| Get skeleton data for articulated objects. | |
| void | init2DContour (std::vector< math::Vector2 > &contourPoints, bool bIsClosed=true, int partIdx=-1) |
| Create a 2d contour (open or closed). | |
| void | initAppearance (std::vector< opentl::core::cvdata::Image * > *imageList, std::vector< char * > *materialNames) |
| Internal function to instantiate appearance models (only reference images, no texture maps!). | |
| void | initConnectedHalfEllipses (double rX1, double rY1, double rX2, double rY2, double height, int lineSegments=10, int partIdx=-1, math::Vector2 *offset=NULL) |
| Create a object consisting of 2 2d half-ellipses and the connected by straigt lines. | |
| void | initConnectedHalfEllipsoids (double rX1, double rY1, double rZ1, double rX2, double rY2, double rZ2, double height, int nDiv=10, int partIdx=-1, math::Vector3 *offset=NULL) |
| Create a object consisting of 2 3d half-ellipsoid and the connection of the equators. The object's coordinate origin is in the center of the first ellipsoid, which forms the base. | |
| void | initCube (int w, int h, int d, int partIdx=-1, math::Vector3 *offset=NULL) |
| Create a 3d cube object. The object's coordinate origin is in the center of the cube. | |
| void | initDeformable2DMesh (std::vector< math::Vector2 > &verticesList, std::vector< std::vector< std::size_t > > &trianglesList, bool markNonFeature=true) |
| initialize 2d deformable, triangular mesh (each triangle = link) | |
| void | initEllipse (double lengthDiagX, double lengthDiagY, int lineSegments=64, int partIdx=-1, math::Vector2 *offset=NULL) |
| Create a 2d ellipse. The object's coordinate origin is in the center of the ellipse. | |
| void | initEllipsoid (double rX, double rY, double rZ, int nDiv=10, int partIdx=-1) |
| Create a 3d ellipsoid. The object's coordinate origin is in the center of the ellipsoid. | |
| void | initMultiRect (std::vector< double > *w, std::vector< double > *h, std::vector< math::Vector2 * > *offsets=NULL, int partIdx=-1) |
| Create multiple 2d rectangles (single-mesh). | |
| void | initRectangle (int w, int h, math::Vector2 *offset=NULL, int partIdx=-1) |
| Create simple 2d rectangle object. The object's coordinate origin is in the center of the rectangle. | |
| int | links () const |
| Return number of links. | |
| void | markNonFeatureParts (std::vector< math::Vector2 > &boundBox, int linkIdx=0) |
| Load ShapeAppearance from COLLADA file. | |
| virtual ShapeAppearance & | operator= (const opentl::core::cvdata::ShapeAppearance &shape) |
| Assign operator. | |
| void | setSkeleton (opentl::core::cvdata::Skeleton *skel) |
| Set skeleon data for articulated objects. | |
| ShapeAppearance (const ShapeAppearance &value) | |
| Copy constructor. | |
| ShapeAppearance (opentl::core::cvdata::Skeleton *skel=NULL) | |
| Constructor. | |
| virtual | ~ShapeAppearance () |
| Destructor. | |
Public Attributes | |
| std::vector< math::Matrix > | m_boundingLimits |
| Matrix to store rectangular bounding limits of object's shape. 1. Index = partIdx 2. Index = x,y,z direction 3. Index = max or min value. | |
| std::vector< double > | m_circumCircleObjectRadius |
| Scalar radius of circumcircle 1. Index = partIdx. | |
| std::vector< Face * > | m_faces |
| Physical model structure. | |
| std::map< std::string, Material * > | m_material |
| std::vector< Edge * > | m_uniqueEdges |
| List of unique edges (for all articulated body parts!). | |
| std::vector< std::vector < EdgeReferredByFace > > | m_uniqueEdgesReferredByFace |
| Stores which unique edge (1. index, same es m_uniqueEdges index) is referenced by which face(s). | |
| std::vector< Point * > | m_uniquePoints |
| List of unique points. | |
| std::size_t | mShapeId |
| Unique ShapeAppearance id per instance. | |
| opentl::core::cvdata::ShapeAppearance::ShapeAppearance | ( | opentl::core::cvdata::Skeleton * | skel = NULL |
) |
Constructor.
| opentl::core::cvdata::ShapeAppearance::ShapeAppearance | ( | const ShapeAppearance & | value | ) |
Copy constructor.
| virtual opentl::core::cvdata::ShapeAppearance::~ShapeAppearance | ( | ) | [virtual] |
Destructor.
| void opentl::core::cvdata::ShapeAppearance::deleteStoredData | ( | ) |
Delete stored shape appearance data in this class.
| int opentl::core::cvdata::ShapeAppearance::dimension | ( | ) |
Returns number of dimensions of object shape 2 = 2d, 3 = 3d.
| void opentl::core::cvdata::ShapeAppearance::getCircumCircleRadius | ( | double & | circumCircleObjectRadius, | |
| int | partIdx = 0 | |||
| ) |
Calculate Radius of object mesh circumcircle.
| circumCircleObjectRadius | Radius of object mesh circumcircle | |
| partIdx | For multi-part objects: which part we are interested in |
| opentl::core::cvdata::Image* opentl::core::cvdata::ShapeAppearance::getMaterialByName | ( | const char * | materialName | ) |
Retrieve a given appearance image by name.
| materialName | Name of the material |
| opentl::core::cvdata::Image* opentl::core::cvdata::ShapeAppearance::getObjTexture | ( | ) | const |
Get texture of an object for a certain pose and sensor.
| void opentl::core::cvdata::ShapeAppearance::getShapeBoundingLimits | ( | double & | xsize, | |
| double & | ysize, | |||
| double & | zsize, | |||
| double & | circumCircleObjectRadius, | |||
| int | partIdx = 0 | |||
| ) |
Calculate rectangular bounding limits of object's shape.
| x | Size in x-direction | |
| y | Size in y-direction | |
| z | Size in z-direction | |
| circumCircleObjectRadius | Radius of object mesh circumcircle | |
| partIdx | For multi-part objects: which part we are interested in |
| void opentl::core::cvdata::ShapeAppearance::getShapeBoundingLimitsOfFace | ( | unsigned int | faceId, | |
| double & | x, | |||
| double & | y, | |||
| double & | width, | |||
| double & | height | |||
| ) |
| opentl::core::cvdata::Skeleton* opentl::core::cvdata::ShapeAppearance::getSkeleton | ( | ) | const [inline] |
Get skeleton data for articulated objects.
| void opentl::core::cvdata::ShapeAppearance::init2DContour | ( | std::vector< math::Vector2 > & | contourPoints, | |
| bool | bIsClosed = true, |
|||
| int | partIdx = -1 | |||
| ) |
Create a 2d contour (open or closed).
| contourPoints | Vertices | |
| bIsClosed | flag to specify whether the contour is closed or not | |
| partIdx | For multi-part objects: which part number are we appending (-1 = create new shape) |
| void opentl::core::cvdata::ShapeAppearance::initAppearance | ( | std::vector< opentl::core::cvdata::Image * > * | imageList, | |
| std::vector< char * > * | materialNames | |||
| ) |
Internal function to instantiate appearance models (only reference images, no texture maps!).
| imagelist | List of images. | |
| materialnames | List of corresponding names for the material. |
| void opentl::core::cvdata::ShapeAppearance::initConnectedHalfEllipses | ( | double | rX1, | |
| double | rY1, | |||
| double | rX2, | |||
| double | rY2, | |||
| double | height, | |||
| int | lineSegments = 10, |
|||
| int | partIdx = -1, |
|||
| math::Vector2 * | offset = NULL | |||
| ) |
Create a object consisting of 2 2d half-ellipses and the connected by straigt lines.
| rX1 | Half length of x-axis of first ellipse | |
| rY1 | Half length of y-axis of first ellipse | |
| rX2 | Half length of x-axis of second ellipse | |
| rY2 | Half length of y-axis of second ellipse | |
| height | Distance of the two ellipse centers | |
| lineSegments | (default = 10) | |
| partIdx | For multi-part objects: which part number are we appending (-1 = create new shape) | |
| offset | offset of the origin of the shape |
| void opentl::core::cvdata::ShapeAppearance::initConnectedHalfEllipsoids | ( | double | rX1, | |
| double | rY1, | |||
| double | rZ1, | |||
| double | rX2, | |||
| double | rY2, | |||
| double | rZ2, | |||
| double | height, | |||
| int | nDiv = 10, |
|||
| int | partIdx = -1, |
|||
| math::Vector3 * | offset = NULL | |||
| ) |
Create a object consisting of 2 3d half-ellipsoid and the connection of the equators. The object's coordinate origin is in the center of the first ellipsoid, which forms the base.
| rX1 | Half length of x-axis of first ellipsoid | |
| rY1 | Half length of y-axis of first ellipsoid | |
| rZ1 | Half length of z-axis of first ellipsoid | |
| rX2 | Half length of x-axis of second ellipsoid | |
| rY2 | Half length of y-axis of second ellipsoid | |
| rZ2 | Half length of z-axis of second ellipsoid | |
| height | Distance of the two ellipsoid centers | |
| nDiv | (default = 10) | |
| partIdx | For multi-part objects: which part number are we appending (-1 = create new shape) |
| void opentl::core::cvdata::ShapeAppearance::initCube | ( | int | w, | |
| int | h, | |||
| int | d, | |||
| int | partIdx = -1, |
|||
| math::Vector3 * | offset = NULL | |||
| ) |
Create a 3d cube object. The object's coordinate origin is in the center of the cube.
| w | Width of cube | |
| h | Height of cube | |
| d | Depth of cube | |
| partIdx | For multi-part objects: which part number are we appending (-1 = create new shape) |
| void opentl::core::cvdata::ShapeAppearance::initDeformable2DMesh | ( | std::vector< math::Vector2 > & | verticesList, | |
| std::vector< std::vector< std::size_t > > & | trianglesList, | |||
| bool | markNonFeature = true | |||
| ) |
initialize 2d deformable, triangular mesh (each triangle = link)
| verticesList | List of triangle vertices | |
| trianglesList | List of triangles (triplets of vertex indices) |
| void opentl::core::cvdata::ShapeAppearance::initEllipse | ( | double | lengthDiagX, | |
| double | lengthDiagY, | |||
| int | lineSegments = 64, |
|||
| int | partIdx = -1, |
|||
| math::Vector2 * | offset = NULL | |||
| ) |
Create a 2d ellipse. The object's coordinate origin is in the center of the ellipse.
| lengthDiagX | Length of x-axis diagonal | |
| lengthDiagY | Length of y-axis diagonal | |
| lineSegments | (default = 64) | |
| partIdx | For multi-part objects: which part number are we appending (-1 = create new shape) |
| void opentl::core::cvdata::ShapeAppearance::initEllipsoid | ( | double | rX, | |
| double | rY, | |||
| double | rZ, | |||
| int | nDiv = 10, |
|||
| int | partIdx = -1 | |||
| ) |
Create a 3d ellipsoid. The object's coordinate origin is in the center of the ellipsoid.
| rX | Half length of x-axis | |
| rY | Half length of y-axis | |
| rZ | Half length of z-axis | |
| nDiv | (default = 10) | |
| partIdx | For multi-part objects: which part number are we appending (-1 = create new shape) |
| void opentl::core::cvdata::ShapeAppearance::initMultiRect | ( | std::vector< double > * | w, | |
| std::vector< double > * | h, | |||
| std::vector< math::Vector2 * > * | offsets = NULL, |
|||
| int | partIdx = -1 | |||
| ) |
Create multiple 2d rectangles (single-mesh).
| w | Width of rectangles | |
| h | Height of rectangles | |
| offsetX | offset x relative to the shape model origin | |
| offsetY | offset y relative to the shape model origin | |
| partIdx | For multi-part objects: which part number are we appending (-1 = create new shape) |
| void opentl::core::cvdata::ShapeAppearance::initRectangle | ( | int | w, | |
| int | h, | |||
| math::Vector2 * | offset = NULL, |
|||
| int | partIdx = -1 | |||
| ) |
Create simple 2d rectangle object. The object's coordinate origin is in the center of the rectangle.
| w | Width of rectangle | |
| h | Height of rectangle | |
| offsetX | offset x relative to the shape model origin | |
| offsetY | offset y relative to the shape model origin | |
| partIdx | For multi-part objects: which part number are we appending (-1 = create new shape) |
| int opentl::core::cvdata::ShapeAppearance::links | ( | ) | const [inline] |
Return number of links.
| void opentl::core::cvdata::ShapeAppearance::markNonFeatureParts | ( | std::vector< math::Vector2 > & | boundBox, | |
| int | linkIdx = 0 | |||
| ) |
Load ShapeAppearance from COLLADA file.
| fileName | COLLADA file name | |
| filePath | Path to COLLADA file (by default, the current directory is used) |
| boundBox | Bounding volume in object space, where parts inside should be removed. NOTE: - Points are marked first
|
| virtual ShapeAppearance& opentl::core::cvdata::ShapeAppearance::operator= | ( | const opentl::core::cvdata::ShapeAppearance & | shape | ) | [virtual] |
Assign operator.
| void opentl::core::cvdata::ShapeAppearance::setSkeleton | ( | opentl::core::cvdata::Skeleton * | skel | ) | [inline] |
Set skeleon data for articulated objects.
Matrix to store rectangular bounding limits of object's shape. 1. Index = partIdx 2. Index = x,y,z direction 3. Index = max or min value.
| std::vector<double> opentl::core::cvdata::ShapeAppearance::m_circumCircleObjectRadius |
Scalar radius of circumcircle 1. Index = partIdx.
| std::vector<Face*> opentl::core::cvdata::ShapeAppearance::m_faces |
Physical model structure.
| std::map<std::string, Material*> opentl::core::cvdata::ShapeAppearance::m_material |
hold map of material types
| std::vector<Edge* > opentl::core::cvdata::ShapeAppearance::m_uniqueEdges |
List of unique edges (for all articulated body parts!).
| std::vector<std::vector<EdgeReferredByFace > > opentl::core::cvdata::ShapeAppearance::m_uniqueEdgesReferredByFace |
Stores which unique edge (1. index, same es m_uniqueEdges index) is referenced by which face(s).
| std::vector<Point* > opentl::core::cvdata::ShapeAppearance::m_uniquePoints |
List of unique points.
| std::size_t opentl::core::cvdata::ShapeAppearance::mShapeId |
Unique ShapeAppearance id per instance.
1.5.8