Implementation of a dynamic object which supports sequentiable dynamic motions.
More...
|
| DynSequentiableMovingObject ()=default |
|
| DynSequentiableMovingObject (ScenePart const &sp, bool const shallowPrimitives=false) |
|
| DynSequentiableMovingObject (string const id) |
|
| DynSequentiableMovingObject (vector< Primitive * > const &primitives) |
|
| DynSequentiableMovingObject (string const id, vector< Primitive * > const &primitives) |
|
bool | doSimStep () override |
| Sequentiable dynamic motions behavior implementation. More...
|
|
void | addSequence (shared_ptr< DynSequence< DynMotion >> dmSequence) |
| Add the dynamic sequence of dynamic motions to the dynamic motion sequencer. More...
|
|
void | removeSequence (string const &id) |
| Remove the dynamic sequence of dynamic motions with given identifier. More...
|
|
shared_ptr< DynSequence< DynMotion > > | getSequence (string const &id) |
| Get the dynamic sequence of dynamic motions with given identifier. More...
|
|
bool | hasSequences (string const &id) |
| Check if the dynamic sequencer has a dynamic sequence of dynamic motions with given identifier. More...
|
|
void | clearSequences () |
| Remove all dynamic sequences of dynamic motions composing the dynamic sequencer. More...
|
|
| DynMovingObject () |
|
| DynMovingObject (ScenePart const &sp, bool const shallowPrimitives=false) |
|
| DynMovingObject (string const id) |
|
| DynMovingObject (vector< Primitive * > const &primitives) |
|
| DynMovingObject (string const id, vector< Primitive * > const &primitives) |
|
virtual void | doObserverUpdate () |
| Handle update notifications to the subscribed observer. It is, notify the observer that it has been updated by the dynamic moving object. More...
|
|
void | pushPositionMotion (shared_ptr< DynMotion > const dm) |
| Push given dynamic motion to the position motion queue. More...
|
|
shared_ptr< DynMotion > | nextPositionMotion () |
| Retrieve the first dynamic motion in the position motion queue. More...
|
|
void | clearPositionMotionQueue () |
| Remove all dynamic motions from the position motion queue.
|
|
bool | positionMotionQueueHasNext () const |
| Check if position motion queue has a next dynamic motion or not. More...
|
|
void | pushNormalMotion (shared_ptr< DynMotion > const dm) |
| Push given dynamic motion to the normal motion queue. More...
|
|
shared_ptr< DynMotion > | nextNormalMotion () |
| Retrieve the first dynamic motion in the normal motion queue. More...
|
|
void | clearNormalMotionQueue () |
| Remove all dynamic motions from the normal motion queue.
|
|
bool | normalMotionQueueHasNext () const |
| Check if normal motion queue has a next dynamic motion or not. More...
|
|
void | registerObserverGrove (shared_ptr< KDGrove > kdGroveObserver) override |
| Register given grove as a observer for the dynamic moving object. More...
|
|
void | unregisterObserverGrove () override |
| Unregister current grove observer. More...
|
|
void | setGroveSubjectId (std::size_t const id) override |
|
std::size_t | getGroveSubjectId () override |
|
ObjectType | getType () const override |
|
void | setObserverStepInterval (int const stepInterval) |
| Set the step interval between consecutive observer update notifications. More...
|
|
int | getObserverStepInterval () const |
| Get the step interval between consecutive observer update notifications. More...
|
|
| DynObject () |
| Dynamic object default constructor.
|
|
| DynObject (ScenePart const &sp, bool const shallowPrimitives=false) |
| Build the dynamic object from given scene part. More...
|
|
| DynObject (string const id) |
| Dynamic object constructor with id as argument. More...
|
|
| DynObject (vector< Primitive * > const &primitives) |
| Dynamic object constructor with primitives as argument. More...
|
|
| DynObject (string const id, vector< Primitive * > const &primitives) |
| Dynamic object constructor with id and primitives as arguments. More...
|
|
virtual bool | doStep () |
| Handle the computation of current simulation step according to configured step loop. This means that the DynObject::doSimStep method (which implements the logic of the DynObject) will be called by the DynObject::stepLoop when enough simulation steps have elapsed. More...
|
|
void | operator() () |
| Alias for DynObject::doStep method so it can be used as a functor. More...
|
|
size_t | countVertices () const |
| Count how many vertices there are defining the dynamic object. More...
|
|
arma::mat | positionMatrixFromPrimitives () const |
| Obtain the position matrix for primitives defining the dynamic object. More...
|
|
arma::mat | positionMatrixFromPrimitives (size_t const m) const |
| Like DynObject::positionMatrixFromPrimitives but receiving the total number of vertices beforehand. More...
|
|
arma::mat | normalMatrixFromPrimitives () const |
| Obtain the normal matrix for primitives defining the dynamic object. More...
|
|
arma::mat | normalMatrixFromPrimitives (size_t const m) const |
| Like DynObject::normalMatrixFromPrimitives but receiving the total number of vertices beforehand. More...
|
|
void | updatePrimitivesPositionFromMatrix (arma::mat const &X) |
| Update the position of each primitive with given matrix. More...
|
|
void | updatePrimitivesPositionFromMatrix (size_t const m, arma::mat const &X) |
| Like updatePrimitivesPositionFromMatrix(arma::mat const &) but receiving the total number of vertices beforehand. More...
|
|
void | updatePrimitivesNormalFromMatrix (arma::mat const &X) |
| Update the normal of each primitive with given matrix. More...
|
|
void | updatePrimitivesNormalFromMatrix (size_t const m, arma::mat const &X) |
| Like updatePrimitivesNormalFromMatrix(arma::mat const &) but receiving the total number of vertices beforehand. More...
|
|
ObjectType | getType () const override |
|
int | getStepInterval () const |
| Obtain the current step interval for the dynamic object. More...
|
|
void | setStepInterval (int const stepInterval) |
| Set the step interval for the dynamic object. More...
|
|
| ScenePart () |
| Default constructor for a scene part. More...
|
|
| ScenePart (ScenePart const &sp, bool const shallowPrimitives=false) |
|
ScenePart & | operator= (const ScenePart &rhs) |
| Copy assigment operator.
|
|
void | addObj (WavefrontObj *obj) |
| Add the primitives of a WavefrontObj to the ScenePart. More...
|
|
std::vector< Vertex * > | getAllVertices () const |
| Obtain all vertices in the scene part. More...
|
|
void | smoothVertexNormals () |
| Smooth normals for each vertex computing the mean for each triangle using it.
|
|
bool | splitSubparts () |
| Split each subpart into a different scene part, with the first one corresponding to this scene part. More...
|
|
void | computeCentroid (bool const computeBound=false) |
| Compute the default centroid for the scene part as the midrange point and its boundaries too. More...
|
|
std::vector< Primitive * > const & | getPrimitives () const |
| Obtain the primitives of the scene part. More...
|
|
void | setPrimitives (std::vector< Primitive * > const &primitives) |
| Set the primitives of the scene part. More...
|
|
arma::colvec | getCentroid () const |
| Obtain the centroid of the scene part. More...
|
|
void | setCentroid (arma::colvec centroid) |
| Set the centroid of the scene part. More...
|
|
std::string const & | getId () const |
| Obtain the ID of the scene part. More...
|
|
void | setId (const std::string &id) |
| Set the ID of the scene part. More...
|
|
virtual PrimitiveType | getPrimitiveType () const |
|
void | registerObserverGrove (std::shared_ptr< BasicDynGrove< GroveKDTreeRaycaster, DynMovingObject >> observer) override |
| Workaround to redirect calls from BasicDynGroveObjectSubject::registerObserverGrove to KDGroveSubject::registerObserverGrove(std::shared_ptr<KDGroveSubject>) method. More...
|
|
virtual void | registerObserverGrove (std::shared_ptr< KDGrove > observer)=0 |
| Register given KDGrove as a observer with respect to the subject. More...
|
|
|
enum | ObjectType { STATIC_OBJECT
, DYN_OBJECT
, DYN_MOVING_OBJECT
} |
| Specify the type of scene part / object. By default, the ScenePart is a static object.
|
|
enum | PrimitiveType { NONE
, TRIANGLE
, VOXEL
} |
| Specify the type of primitive used to build the scene part By default, the ScenePart is not build from primitives (None) More...
|
|
PrimitiveType | primitiveType |
| The type of primitive used to build the scene part. More...
|
|
std::vector< Primitive * > | mPrimitives |
| Vector of pointers to primitives used by this scene part.
|
|
arma::colvec | centroid |
| The centroid of the scene part.
|
|
std::shared_ptr< AABB > | bound = nullptr |
| The axis aligned bounding box defining scene part boundaries.
|
|
std::string | mId = "" |
| Identifier for the scene part.
|
|
std::vector< size_t > | subpartLimit |
| Vector specifying the limit of a subpart as the index of first element of next subpart. More...
|
|
std::string | onRayIntersectionMode = "" |
| Specify the handling mode for ray intersections.
|
|
double | onRayIntersectionArgument = 0.0 |
| Specify the extra value to be used for ray intersection handling computation, when needed (depends on mode).
|
|
bool | randomShift = false |
| Specify if apply random shift to the scene part (true) or not (false, by default)
|
|
std::shared_ptr< LadLut > | ladlut = nullptr |
| Look-up table for leaf angle distribution.
|
|
glm::dvec3 | mOrigin = glm::dvec3(0, 0, 0) |
| Specify the origin for the scene part.
|
|
Rotation | mRotation = Rotation(glm::dvec3(1, 0, 0), 0) |
| Specify the rotation for the scene part.
|
|
double | mScale = 1 |
| Specify the scale for the scene part.
|
|
int | forceOnGround = 0 |
| Force the scene part to be on ground if \(\neq 0\), do nothing if \(= 0\). More...
|
|
OGRSpatialReference * | mCrs = nullptr |
|
OGREnvelope * | mEnv = nullptr |
|
Implementation of a dynamic object which supports sequentiable dynamic motions.
- Author
- Alberto M. Esmoris Pena
- Version
- 1.0
Sequentiable dynamic motions use sequences to modify motion queues so at each step queues are filled with corresponding dynamic motions from dynamic sequencers.
- See also
- DynMovingObject
-
DynSequencer