![]() |
Rigs of Rods 2026.01
Soft-body Physics Simulation
|
Flexbody = A deformable mesh; updated on CPU every frame, then uploaded to video memory.
Definition at line 43 of file FlexBody.h.
Public Types | |
| enum class | PlaceholderType |
Public Member Functions | |
| FlexBody (PlaceholderType, FlexbodyID_t id, const std::string &orig_meshname) | |
| ~FlexBody () | |
| void | reset () |
| void | updateBlend () |
| void | writeBlend () |
| void | computeFlexbody () |
| void | updateFlexbodyVertexBuffers () |
| bool | isVisible () const |
| void | setVisible (bool visible) |
| void | setFlexbodyCastShadow (bool val) |
| int | getVertexCount () |
| Locator_t & | getVertexLocator (int vert) |
| Ogre::Vector3 | getVertexPos (int vert) |
| Ogre::Entity * | getEntity () |
| const std::string & | getOrigMeshName () const |
| std::vector< NodeNum_t > & | getForsetNodes () |
| std::string | getOrigMeshInfo () |
| std::string | getLiveMeshInfo () |
| NodeNum_t | getRefNode () |
| NodeNum_t | getXNode () |
| NodeNum_t | getYNode () |
| FlexbodyID_t | getID () const |
| PlaceholderType | getPlaceholderType () const |
| void | destroyOgreObjects () |
Static Public Member Functions | |
| static const char * | PlaceholderTypeToString (PlaceholderType type) |
Data Fields | |
Visibility control (same as prop - see file GfxData.h) | |
| CameraMode_t | fb_camera_mode_active = CAMERA_MODE_ALWAYS_VISIBLE |
| CameraMode_t | fb_camera_mode_orig = CAMERA_MODE_ALWAYS_VISIBLE |
Private Member Functions | |
| FlexBody (RoR::FlexBodyCacheData *preloaded_from_cache, RoR::GfxActor *gfx_actor, Ogre::Entity *entity, NodeNum_t ref, NodeNum_t nx, NodeNum_t ny, Ogre::Vector3 offset, Ogre::Quaternion const &rot, std::vector< unsigned int > &node_indices, std::vector< ForvertTempData > &forvert_data) | |
| void | defragmentFlexbodyMesh () |
Friends | |
| class | RoR::FlexFactory |
| class | RoR::FlexBodyFileIO |
|
strong |
| Enumerator | |
|---|---|
| NOT_A_PLACEHOLDER | |
| TUNING_REMOVED_PLACEHOLDER | |
| FAULTY_FORSET_PLACEHOLDER | |
| FAULTY_MESH_PLACEHOLDER | |
Definition at line 63 of file FlexBody.h.
|
private |
Definition at line 38 of file FlexBody.cpp.
| FlexBody::FlexBody | ( | PlaceholderType | p_type, |
| FlexbodyID_t | id, | ||
| const std::string & | orig_meshname | ||
| ) |
Definition at line 539 of file FlexBody.cpp.
| FlexBody::~FlexBody | ( | ) |
Definition at line 547 of file FlexBody.cpp.
| void FlexBody::computeFlexbody | ( | ) |
Updates mesh deformation; works on CPU using local copy of vertex data.
Definition at line 620 of file FlexBody.cpp.
|
private |
Definition at line 793 of file FlexBody.cpp.
| void FlexBody::destroyOgreObjects | ( | ) |
Definition at line 572 of file FlexBody.cpp.
|
inline |
Definition at line 96 of file FlexBody.h.
|
inline |
Definition at line 98 of file FlexBody.h.
|
inline |
Definition at line 106 of file FlexBody.h.
|
inline |
Definition at line 100 of file FlexBody.h.
|
inline |
Definition at line 99 of file FlexBody.h.
|
inline |
Definition at line 97 of file FlexBody.h.
|
inline |
Definition at line 107 of file FlexBody.h.
|
inline |
Definition at line 102 of file FlexBody.h.
|
inline |
Definition at line 93 of file FlexBody.h.
|
inline |
Definition at line 94 of file FlexBody.h.
|
inline |
Definition at line 95 of file FlexBody.h.
|
inline |
Definition at line 103 of file FlexBody.h.
|
inline |
Definition at line 104 of file FlexBody.h.
| bool FlexBody::isVisible | ( | ) | const |
Definition at line 597 of file FlexBody.cpp.
|
static |
Definition at line 560 of file FlexBody.cpp.
| void FlexBody::reset | ( | ) |
Definition at line 692 of file FlexBody.cpp.
| void FlexBody::setFlexbodyCastShadow | ( | bool | val | ) |
Definition at line 613 of file FlexBody.cpp.
| void FlexBody::setVisible | ( | bool | visible | ) |
Definition at line 606 of file FlexBody.cpp.
| void FlexBody::updateBlend | ( | ) |
Definition at line 717 of file FlexBody.cpp.
| void FlexBody::updateFlexbodyVertexBuffers | ( | ) |
Definition at line 661 of file FlexBody.cpp.
| void FlexBody::writeBlend | ( | ) |
Definition at line 701 of file FlexBody.cpp.
|
friend |
Definition at line 46 of file FlexBody.h.
|
friend |
Definition at line 45 of file FlexBody.h.
| CameraMode_t RoR::FlexBody::fb_camera_mode_active = CAMERA_MODE_ALWAYS_VISIBLE |
Dynamic visibility mode {0 and higher = cinecam index}.
Definition at line 74 of file FlexBody.h.
| CameraMode_t RoR::FlexBody::fb_camera_mode_orig = CAMERA_MODE_ALWAYS_VISIBLE |
Dynamic visibility mode {0 and higher = cinecam index}.
Definition at line 75 of file FlexBody.h.
|
private |
Definition at line 148 of file FlexBody.h.
|
private |
Visibility control {-2 = always, -1 = 3rdPerson only, 0+ = cinecam index}.
Definition at line 132 of file FlexBody.h.
|
private |
Definition at line 129 of file FlexBody.h.
|
private |
Definition at line 122 of file FlexBody.h.
|
private |
Definition at line 120 of file FlexBody.h.
|
private |
Updated per frame.
Definition at line 116 of file FlexBody.h.
|
private |
Definition at line 151 of file FlexBody.h.
|
private |
Definition at line 114 of file FlexBody.h.
|
private |
Definition at line 146 of file FlexBody.h.
|
private |
Definition at line 147 of file FlexBody.h.
|
private |
Definition at line 117 of file FlexBody.h.
|
private |
1 loc per vertex
Definition at line 124 of file FlexBody.h.
|
private |
Definition at line 126 of file FlexBody.h.
|
private |
Definition at line 127 of file FlexBody.h.
|
private |
Definition at line 128 of file FlexBody.h.
|
private |
Definition at line 139 of file FlexBody.h.
|
private |
Definition at line 152 of file FlexBody.h.
|
private |
Definition at line 153 of file FlexBody.h.
|
private |
Definition at line 118 of file FlexBody.h.
|
private |
Definition at line 131 of file FlexBody.h.
|
private |
Definition at line 130 of file FlexBody.h.
|
private |
Definition at line 134 of file FlexBody.h.
|
private |
Definition at line 137 of file FlexBody.h.
|
private |
Definition at line 136 of file FlexBody.h.
|
private |
Definition at line 135 of file FlexBody.h.
|
private |
Definition at line 123 of file FlexBody.h.
|
private |
Definition at line 121 of file FlexBody.h.
|
private |
colors
Definition at line 143 of file FlexBody.h.
|
private |
normals
Definition at line 142 of file FlexBody.h.
|
private |
positions
Definition at line 141 of file FlexBody.h.
|
private |
Definition at line 140 of file FlexBody.h.
|
private |
Definition at line 145 of file FlexBody.h.
|
private |
Definition at line 115 of file FlexBody.h.