template<UnsignedInt dimensions>
ShapeGroup class
Group of shapes.
Contents
See Shape for more information. See Collision detection for brief introduction.
Base classes
-
template<UnsignedInt dimensions, class Feature, class T>class Magnum::SceneGraph::FeatureGroup
- Group of features.
Constructors, destructors, conversion operators
- ShapeGroup() explicit
- Constructor.
Public functions
- auto isDirty() const -> bool
- Whether the group is dirty.
- void setDirty()
- Set the group as dirty.
- void setClean()
- Set the group and all bodies as clean.
- auto firstCollision(const AbstractShape<dimensions>& shape) -> AbstractShape<dimensions>*
- First collision of given shape with other shapes in the group.
Function documentation
template<UnsignedInt dimensions>
Magnum:: Shapes:: ShapeGroup<dimensions>:: ShapeGroup() explicit
Constructor.
Marks the group as dirty.
template<UnsignedInt dimensions>
bool Magnum:: Shapes:: ShapeGroup<dimensions>:: isDirty() const
Whether the group is dirty.
Returns | True if any object in the group is dirty, false otherwise. |
---|
template<UnsignedInt dimensions>
void Magnum:: Shapes:: ShapeGroup<dimensions>:: setDirty()
Set the group as dirty.
If some body in the group changes its transformation, it sets dirty status also on the group to indicate that the body and maybe also group state needs to be cleaned before computing collisions.
template<UnsignedInt dimensions>
void Magnum:: Shapes:: ShapeGroup<dimensions>:: setClean()
Set the group and all bodies as clean.
This function is called before computing any collisions to ensure all objects are cleaned.
template<UnsignedInt dimensions>
AbstractShape<dimensions>* Magnum:: Shapes:: ShapeGroup<dimensions>:: firstCollision(const AbstractShape<dimensions>& shape)
First collision of given shape with other shapes in the group.
Returns first shape colliding with given one. If there aren't any collisions, returns nullptr
. Calls setClean() before the operation.