![]() |
RigsofRods
2023.09
Soft-body Physics Simulation
|
Flexbody = A deformable mesh; updated on CPU every frame, then uploaded to video memory. More...
#include <FlexBody.h>
Public Member Functions | |
| FlexBody (PlaceholderType, FlexbodyID_t id, const std::string &orig_meshname) | |
| ~FlexBody () | |
| void | reset () |
| void | updateBlend () |
| void | writeBlend () |
| void | computeFlexbody () |
| Updates mesh deformation; works on CPU using local copy of vertex data. More... | |
| 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 |
| Dynamic visibility mode {0 and higher = cinecam index}. More... | |
| CameraMode_t | fb_camera_mode_orig = CAMERA_MODE_ALWAYS_VISIBLE |
| Dynamic visibility mode {0 and higher = cinecam index}. More... | |
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 () |
Private Attributes | |
| RoR::GfxActor * | m_gfx_actor = nullptr |
| size_t | m_vertex_count = 0 |
| Ogre::Vector3 | m_flexit_center = Ogre::Vector3::ZERO |
| Updated per frame. More... | |
| FlexbodyID_t | m_id = FLEXBODYID_INVALID |
| PlaceholderType | m_placeholder_type = PlaceholderType::NOT_A_PLACEHOLDER |
| Ogre::Vector3 * | m_dst_pos = nullptr |
| Ogre::Vector3 * | m_src_normals = nullptr |
| Ogre::Vector3 * | m_dst_normals = nullptr |
| Ogre::ARGB * | m_src_colors = nullptr |
| Locator_t * | m_locators = nullptr |
| 1 loc per vertex More... | |
| NodeNum_t | m_node_center = NODENUM_INVALID |
| NodeNum_t | m_node_x = NODENUM_INVALID |
| NodeNum_t | m_node_y = NODENUM_INVALID |
| Ogre::Vector3 | m_center_offset = Ogre::Vector3::ZERO |
| Ogre::SceneNode * | m_scene_node = nullptr |
| Ogre::Entity * | m_scene_entity = nullptr |
| int | m_camera_mode = CAMERA_MODE_ALWAYS_VISIBLE |
| Visibility control {-2 = always, -1 = 3rdPerson only, 0+ = cinecam index}. More... | |
| int | m_shared_buf_num_verts = 0 |
| Ogre::HardwareVertexBufferSharedPtr | m_shared_vbuf_pos |
| Ogre::HardwareVertexBufferSharedPtr | m_shared_vbuf_norm |
| Ogre::HardwareVertexBufferSharedPtr | m_shared_vbuf_color |
| int | m_num_submesh_vbufs = 0 |
| int | m_submesh_vbufs_vertex_counts [16] |
| Ogre::HardwareVertexBufferSharedPtr | m_submesh_vbufs_pos [16] |
| positions More... | |
| Ogre::HardwareVertexBufferSharedPtr | m_submesh_vbufs_norm [16] |
| normals More... | |
| Ogre::HardwareVertexBufferSharedPtr | m_submesh_vbufs_color [16] |
| colors More... | |
| bool | m_uses_shared_vertex_data = false |
| bool | m_has_texture = true |
| bool | m_has_texture_blend = true |
| bool | m_blend_changed = false |
| std::vector< NodeNum_t > | m_forset_nodes |
| std::string | m_orig_mesh_info |
| std::string | m_orig_mesh_name |
Friends | |
| class | RoR::FlexFactory |
| class | RoR::FlexBodyFileIO |
Flexbody = A deformable mesh; updated on CPU every frame, then uploaded to video memory.
Definition at line 43 of file FlexBody.h.
|
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.
1.8.17