The Model class is a holder for any kind of model, such as meshes, point clouds, surfaces ... that should inherit the model class.
More...
#include <model.hpp>
|
Eigen::Affine3f | model_matrix |
| Model matrix, holds information about the models location and orientation. More...
|
|
Eigen::Vector3f | objectCenter |
| Center of the mesh object. More...
|
|
Eigen::Vector3f | centroid |
| Object's centroid (different from center of bounding box) More...
|
|
float | radius |
| Radius of the mesh bounding sphere. More...
|
|
float | scale |
| The normalization scale factor, scales the model matrix to fit the model inside a unit cube. More...
|
|
Eigen::Vector4f | default_color = Eigen::Vector4f (0.7, 0.7, 0.7, 1.0) |
| Default color. More...
|
|
The Model class is a holder for any kind of model, such as meshes, point clouds, surfaces ... that should inherit the model class.
It basically contains only information about its spatial location and orientation, that is, a model matrix.
Tucano::Model::Model |
( |
void |
| ) |
|
|
inline |
void Tucano::Model::desnormalizeModelMatrix |
( |
void |
| ) |
|
|
inline |
Desnormalize model matrix.
virtual float Tucano::Model::getBoundingSphereRadius |
( |
void |
| ) |
const |
|
inlinevirtual |
Returns the radius of the bounding sphere. The bounding sphere is computed as the distance from the farthest point to the object's centroid.
- Returns
- Radius of the bounding sphere.
virtual Eigen::Vector3f Tucano::Model::getCentroid |
( |
void |
| ) |
const |
|
inlinevirtual |
Returns the centroid of the model.
- Returns
- The centroid of the mesh object. given by the mean position of all vertices.
Eigen::Vector4f Tucano::Model::getColor |
( |
void |
| ) |
|
|
inline |
Returns the default color of the model.
- Returns
- RGBA default color
Eigen::Affine3f Tucano::Model::getModelMatrix |
( |
void |
| ) |
const |
|
inline |
Returns the model matrix.
- Returns
- Model matrix as an Affine 3f matrix.
virtual Eigen::Vector3f Tucano::Model::getObjectCenter |
( |
void |
| ) |
const |
|
inlinevirtual |
Returns the center of the axis-aligned bounding box.
- Returns
- The center of the axis-aligned bounding box.
float Tucano::Model::getScale |
( |
void |
| ) |
const |
|
inline |
Returns the scale factor for fitting the model inside a unit cube.
- Returns
- Scale factor.
Eigen::Affine3f* Tucano::Model::modelMatrix |
( |
void |
| ) |
|
|
inline |
Returns a pointer to the model matrix.
- Returns
- Pointer to the odel matrix as an Affine 3f matrix.
void Tucano::Model::normalizeModelMatrix |
( |
void |
| ) |
|
|
inline |
Normalize model matrix to center and scale model. The model matrix will include a translation to place model's centroid at the origin, and scale the model to fit inside a unit sphere.
void Tucano::Model::resetModelMatrix |
( |
void |
| ) |
|
|
inline |
void Tucano::Model::setColor |
( |
const Eigen::Vector4f & |
color | ) |
|
|
inline |
Sets the default color of the model.
- Parameters
-
color | Given new default color |
void Tucano::Model::setModelMatrix |
( |
const Eigen::Affine3f & |
m | ) |
|
|
inline |
Sets the model matrix.
- Parameters
-
Eigen::Vector3f Tucano::Model::centroid |
|
protected |
Object's centroid (different from center of bounding box)
Eigen::Vector4f Tucano::Model::default_color = Eigen::Vector4f (0.7, 0.7, 0.7, 1.0) |
|
protected |
Eigen::Affine3f Tucano::Model::model_matrix |
|
protected |
Model matrix, holds information about the models location and orientation.
Eigen::Vector3f Tucano::Model::objectCenter |
|
protected |
Center of the mesh object.
float Tucano::Model::radius |
|
protected |
Radius of the mesh bounding sphere.
float Tucano::Model::scale |
|
protected |
The normalization scale factor, scales the model matrix to fit the model inside a unit cube.
The documentation for this class was generated from the following file: