#include <VisualParams.h>
Class gathering parameters used by visual components and by the draw method of each component. Transmitted by visitors. More...
Class gathering parameters used by visual components and by the draw method of each component. Transmitted by visitors.
Protected Attributes | |
sofa::type::BoundingBox | m_sceneBoundingBox |
Viewport | m_viewport |
SReal | m_zNear |
SReal | m_zFar |
CameraType | m_cameraType |
Pass | m_pass |
DisplayFlags | m_displayFlags |
helper::visual::DrawTool * | m_drawTool |
ConstMultiVecCoordId | m_x |
Ids of position vector. More... | |
ConstMultiVecDerivId | m_v |
Ids of velocity vector. More... | |
unsigned int | m_supportedAPIs |
Mask of supported graphics API. More... | |
SReal | m_modelViewMatrix [16] |
model view matrix. More... | |
SReal | m_projectionMatrix [16] |
projection matrix. More... | |
Public Member Functions | |
VisualParams () | |
const Viewport & | viewport () const |
Viewport & | viewport () |
const SReal & | zNear () const |
const SReal & | zFar () const |
SReal & | zNear () |
SReal & | zFar () |
const CameraType & | cameraType () const |
CameraType & | cameraType () |
const Pass & | pass () const |
Pass & | pass () |
helper::visual::DrawTool *& | drawTool () |
helper::visual::DrawTool *& | drawTool () const |
DisplayFlags & | displayFlags () |
const DisplayFlags & | displayFlags () const |
sofa::type::BoundingBox & | sceneBBox () |
const sofa::type::BoundingBox & | sceneBBox () const |
void | setModelViewMatrix (const double m[16]) |
Store the ModelView matrix used to draw the scene. This OpenGL matrix defines the world coordinate system with respect to the camera. More... | |
void | getModelViewMatrix (double m[16]) const |
Get the ModelView matrix used to draw the scene. This OpenGL matrix defines the world coordinate system with respect to the camera. More... | |
void | setProjectionMatrix (const double m[16]) |
Store the projection matrix used to draw the scene. This OpenGL matrix defines the camera coordinate system with respect to the viewport, including perspective if any. More... | |
void | getProjectionMatrix (double m[16]) const |
Get the projection matrix used to draw the scene. This OpenGL matrix defines the camera coordinate system with respect to the viewport, including perspective if any. More... | |
bool | isSupported (unsigned int api) const |
void | setSupported (unsigned int api, bool val=true) |
Access to vectors from a given state container (i.e. State or MechanicalState) | |
template<class S > | |
const Data< typename S::VecCoord > * | readX (const S *state) const |
Read access to current position vector. More... | |
template<class S > | |
const Data< typename S::VecDeriv > * | readV (const S *state) const |
Read access to current velocity vector. More... | |
Setup methods | |
Called by the OdeSolver from which the mechanical computations originate. They all return a reference to this MechanicalParam instance, to ease chaining multiple setup calls. | |
const ConstMultiVecCoordId & | x () const |
ConstMultiVecCoordId & | x () |
const ConstMultiVecDerivId & | v () const |
ConstMultiVecDerivId & | v () |
VisualParams & | setX (ConstVecCoordId v) |
Set the IDs of position vector. More... | |
VisualParams & | setX (ConstMultiVecCoordId v) |
template<class StateSet > | |
VisualParams & | setX (const StateSet &g, ConstVecCoordId v) |
VisualParams & | setV (ConstVecDerivId v) |
Set the IDs of velocity vector. More... | |
VisualParams & | setV (ConstMultiVecDerivId v) |
template<class StateSet > | |
VisualParams & | setV (const StateSet &g, ConstVecDerivId v) |
Public Member Functions inherited from sofa::core::ExecParams | |
bool | checkValidStorage () const |
ExecMode | execMode () const |
Mode of execution requested. More... | |
int | threadID () const |
Index of current thread (0 corresponding to the only thread in sequential mode, or first thread in parallel mode) More... | |
int | nbThreads () const |
Number of threads currently known to Sofa. More... | |
ExecParams () | |
void | update () |
Make sure this instance is up-to-date relative to the current thread. More... | |
ExecParams & | setExecMode (ExecMode v) |
Request a specific mode of execution. More... | |
ExecParams & | setThreadID (int v) |
Specify the index of the current thread. More... | |
Static Public Member Functions | |
static VisualParams * | defaultInstance () |
Get the default VisualParams, to be used to provide a default values for method parameters. More... | |
Static Public Member Functions inherited from sofa::core::ExecParams | |
static ExecParams * | defaultInstance () |
Get the default ExecParams, to be used to provide a default values for method parameters. More... | |
|
protected |
|
protected |
|
mutableprotected |
|
protected |
model view matrix.
|
protected |
|
protected |
projection matrix.
|
protected |
|
protected |
Mask of supported graphics API.
|
protected |
Ids of velocity vector.
|
protected |
|
protected |
Ids of position vector.
|
protected |
|
protected |
sofa::core::visual::VisualParams::VisualParams | ( | ) |
|
inline |
|
inline |
|
static |
Get the default VisualParams, to be used to provide a default values for method parameters.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the ModelView matrix used to draw the scene. This OpenGL matrix defines the world coordinate system with respect to the camera.
|
inline |
Get the projection matrix used to draw the scene. This OpenGL matrix defines the camera coordinate system with respect to the viewport, including perspective if any.
|
inline |
|
inline |
|
inline |
|
inline |
Read access to current velocity vector.
|
inline |
Read access to current position vector.
|
inline |
|
inline |
|
inline |
Store the ModelView matrix used to draw the scene. This OpenGL matrix defines the world coordinate system with respect to the camera.
|
inline |
Store the projection matrix used to draw the scene. This OpenGL matrix defines the camera coordinate system with respect to the viewport, including perspective if any.
|
inline |
|
inline |
|
inline |
|
inline |
Set the IDs of velocity vector.
|
inline |
|
inline |
|
inline |
Set the IDs of position vector.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |