#include <DrawV.h>


Public Member Functions | |
| DrawV () | |
| void | initVisual () |
| Initialize the textures, or other graphical resources. | |
| void | updateVisual () |
| used to update the model if necessary. | |
| bool | isTransparent () |
| float | getVScale () |
| void | drawVisual () |
| Display the VisualModel object. | |
| void | drawTransparent () |
| Display transparent surfaces. | |
| void | drawShadow () |
| Display shadow-casting surfaces. | |
| bool | addBBox (double *minBBox, double *maxBBox) |
| used to add the bounding-box of this visual model to the given bounding box in order to compute the scene bounding box or cull hidden objects. | |
| const VecCoord * | getX () const |
| Return the current position vector (read-only access). | |
| const VecDeriv * | getV () const |
| Return the current velocity vector (read-only access). | |
| VecCoord * | getX () |
| Return the current position vector (read-write access). | |
| VecDeriv * | getV () |
| Return the current velocity vector (read-write access). | |
Data Fields | |
| Data< bool > | castShadow |
| True if object cast shadows. | |
| Data< bool > | useAlpha |
| True if velocity displayed using alpha blending. | |
| Data< double > | vscale |
| Scaling of veloity vectors. | |
Protected Member Functions | |
| void | internalDraw () |
Protected Attributes | |
| ResizableExtVector< Coord > | inputX |
| ResizableExtVector< Deriv > | inputV |
Definition at line 47 of file DrawV.h.
| bool sofa::component::visualmodel::DrawV::addBBox | ( | double * | , | |
| double * | ||||
| ) | [virtual] |
used to add the bounding-box of this visual model to the given bounding box in order to compute the scene bounding box or cull hidden objects.
Reimplemented from sofa::core::VisualModel.
Definition at line 137 of file DrawV.cpp.
References getVScale(), inputV, inputX, sofa::defaulttype::ExtVector< T >::size(), and vscale.
| void sofa::component::visualmodel::DrawV::drawShadow | ( | ) | [virtual] |
Display shadow-casting surfaces.
This method default to calling draw(). Object that do not cast any shadows, or that use a different LOD for them should reimplement it.
Reimplemented from sofa::core::VisualModel.
Definition at line 80 of file DrawV.cpp.
References castShadow, sofa::core::objectmodel::Data< T >::getValue(), internalDraw(), and isTransparent().
| void sofa::component::visualmodel::DrawV::drawTransparent | ( | ) | [virtual] |
Display transparent surfaces.
Transparent objects should use this method to get a correct display order.
Reimplemented from sofa::core::VisualModel.
Definition at line 74 of file DrawV.cpp.
References internalDraw(), and isTransparent().
| void sofa::component::visualmodel::DrawV::drawVisual | ( | ) | [virtual] |
Display the VisualModel object.
Reimplemented from sofa::core::VisualModel.
Definition at line 68 of file DrawV.cpp.
References internalDraw(), and isTransparent().
| VecDeriv* sofa::component::visualmodel::DrawV::getV | ( | ) | [inline, virtual] |
Return the current velocity vector (read-write access).
Implements sofa::core::componentmodel::behavior::State< TDataTypes >.
Definition at line 71 of file DrawV.h.
References inputV.
| const VecDeriv* sofa::component::visualmodel::DrawV::getV | ( | ) | const [inline, virtual] |
Return the current velocity vector (read-only access).
Implements sofa::core::componentmodel::behavior::State< TDataTypes >.
Definition at line 69 of file DrawV.h.
References inputV.
| float sofa::component::visualmodel::DrawV::getVScale | ( | ) |
Definition at line 89 of file DrawV.cpp.
References sofa::core::objectmodel::Data< T >::getValue(), and vscale.
Referenced by addBBox(), and internalDraw().
| VecCoord* sofa::component::visualmodel::DrawV::getX | ( | ) | [inline, virtual] |
Return the current position vector (read-write access).
Implements sofa::core::componentmodel::behavior::State< TDataTypes >.
Definition at line 70 of file DrawV.h.
References inputX.
| const VecCoord* sofa::component::visualmodel::DrawV::getX | ( | ) | const [inline, virtual] |
Return the current position vector (read-only access).
Implements sofa::core::componentmodel::behavior::State< TDataTypes >.
Definition at line 68 of file DrawV.h.
References inputX.
| void sofa::component::visualmodel::DrawV::initVisual | ( | ) | [virtual] |
Initialize the textures, or other graphical resources.
Called once before the first frame is drawn, and if the graphical context has been recreated.
Reimplemented from sofa::core::VisualModel.
| void sofa::component::visualmodel::DrawV::internalDraw | ( | ) | [protected] |
Definition at line 96 of file DrawV.cpp.
References sofa::core::objectmodel::BaseObject::getContext(), getVScale(), inputV, inputX, isTransparent(), sofa::defaulttype::ExtVector< T >::size(), and vscale.
Referenced by drawShadow(), drawTransparent(), and drawVisual().
| bool sofa::component::visualmodel::DrawV::isTransparent | ( | ) |
Definition at line 63 of file DrawV.cpp.
References sofa::core::objectmodel::Data< T >::getValue(), and useAlpha.
Referenced by drawShadow(), drawTransparent(), drawVisual(), and internalDraw().
| void sofa::component::visualmodel::DrawV::updateVisual | ( | ) | [virtual] |
True if velocity displayed using alpha blending.
Definition at line 51 of file DrawV.h.
Referenced by sofa::component::collision::ContactMapper< RigidDistanceGridCollisionModel, DataTypes >::createMapping(), and isTransparent().
Scaling of veloity vectors.
Definition at line 52 of file DrawV.h.
Referenced by addBBox(), sofa::component::collision::ContactMapper< RigidDistanceGridCollisionModel, DataTypes >::createMapping(), getVScale(), and internalDraw().
1.5.7.1