![]() |
Rigs of Rods 2026.01
Soft-body Physics Simulation
|
Definition at line 62 of file ProceduralRoad.h.
Inheritance diagram for RoR::ProceduralRoad:Data Structures | |
| struct | CoVertice_t |
Public Member Functions | |
| ProceduralRoad (const std::string &_groundmodelName="") | |
| virtual | ~ProceduralRoad () override |
| void | addBlock (Ogre::Vector3 pos, Ogre::Quaternion rot, RoadType type, float width, float bwidth, float bheight, int pillartype=1) |
| void | addQuad (Ogre::Vector3 p1, Ogre::Vector3 p2, Ogre::Vector3 p3, Ogre::Vector3 p4, TextureFit texfit, Ogre::Vector3 pos, Ogre::Vector3 lastpos, float width, bool flip=false) |
| void | addCollisionQuad (Ogre::Vector3 p1, Ogre::Vector3 p2, Ogre::Vector3 p3, Ogre::Vector3 p4, ground_model_t *gm, bool flip=false) |
| void | addCollisionQuad (Ogre::Vector3 p1, Ogre::Vector3 p2, Ogre::Vector3 p3, Ogre::Vector3 p4, std::string const &gm_name, bool flip=false) |
| void | finish (Ogre::SceneNode *snode, const std::string &materialName="") |
| void | setCollisionEnabled (bool v) |
Public Member Functions inherited from RefCountingObject< ProceduralRoad > | |
| RefCountingObject () | |
| virtual | ~RefCountingObject () |
| void | AddRef () |
| void | Release () |
Static Public Attributes | |
| static const unsigned int | MAX_VERTEX = 50000 |
| static const unsigned int | MAX_TRIS = 50000 |
Private Member Functions | |
| Ogre::Vector3 | baseOf (Ogre::Vector3 p) |
| void | computePoints (Ogre::Vector3 *pts, Ogre::Vector3 pos, Ogre::Quaternion rot, RoadType type, float width, float bwidth, float bheight) |
| void | textureFit (Ogre::Vector3 p1, Ogre::Vector3 p2, Ogre::Vector3 p3, Ogre::Vector3 p4, TextureFit texfit, Ogre::Vector2 *texc, Ogre::Vector3 pos, Ogre::Vector3 lastpos, float width) |
| void | createMesh (const std::string &materialName="") |
Private Attributes | |
| Ogre::MeshPtr | msh |
| Ogre::SubMesh * | mainsub = nullptr |
| Ogre::Vector2 | tex [MAX_VERTEX] = {} |
| Ogre::Vector3 | vertex [MAX_VERTEX] = {} |
| int | tricount = 0 |
| int | vertexcount = 0 |
| uint16_t | tris [MAX_TRIS *3] = {} |
| Ogre::Quaternion | lastrot |
| Ogre::SceneNode * | snode = nullptr |
| Ogre::Vector3 | lastpos |
| bool | first = true |
| float | lastbheight = 0.f |
| float | lastbwidth = 0.f |
| float | lastwidth = 0.f |
| RoadType | lasttype |
| int | mid = 0 |
| bool | collision = true |
| ground_model_t * | m_customGroundmodel = nullptr |
| std::vector< int > | registeredCollTris |
Additional Inherited Members | |
Static Public Member Functions inherited from RefCountingObject< ProceduralRoad > | |
| static void | RegisterRefCountingObject (AS_NAMESPACE_QUALIFIER asIScriptEngine *engine, const char *name) |
| static void | RegisterRefCountingObjectGeneric (AS_NAMESPACE_QUALIFIER asIScriptEngine *engine, const char *name) |
| static void | AddRefGeneric (AS_NAMESPACE_QUALIFIER asIScriptGeneric *gen) |
| static void | ReleaseGeneric (AS_NAMESPACE_QUALIFIER asIScriptGeneric *gen) |
Data Fields inherited from RefCountingObject< ProceduralRoad > | |
| int | m_refcount |
| std::mutex | m_refcount_mtx |
| ProceduralRoad::ProceduralRoad | ( | const std::string & | _groundmodelName = "" | ) |
Definition at line 39 of file ProceduralRoad.cpp.
|
overridevirtual |
Definition at line 52 of file ProceduralRoad.cpp.
| void ProceduralRoad::addBlock | ( | Ogre::Vector3 | pos, |
| Ogre::Quaternion | rot, | ||
| RoadType | type, | ||
| float | width, | ||
| float | bwidth, | ||
| float | bheight, | ||
| int | pillartype = 1 |
||
| ) |
Definition at line 94 of file ProceduralRoad.cpp.
| void RoR::ProceduralRoad::addCollisionQuad | ( | Ogre::Vector3 | p1, |
| Ogre::Vector3 | p2, | ||
| Ogre::Vector3 | p3, | ||
| Ogre::Vector3 | p4, | ||
| ground_model_t * | gm, | ||
| bool | flip = false |
||
| ) |
| void ProceduralRoad::addCollisionQuad | ( | Ogre::Vector3 | p1, |
| Ogre::Vector3 | p2, | ||
| Ogre::Vector3 | p3, | ||
| Ogre::Vector3 | p4, | ||
| std::string const & | gm_name, | ||
| bool | flip = false |
||
| ) |
Definition at line 581 of file ProceduralRoad.cpp.
| void ProceduralRoad::addQuad | ( | Ogre::Vector3 | p1, |
| Ogre::Vector3 | p2, | ||
| Ogre::Vector3 | p3, | ||
| Ogre::Vector3 | p4, | ||
| TextureFit | texfit, | ||
| Ogre::Vector3 | pos, | ||
| Ogre::Vector3 | lastpos, | ||
| float | width, | ||
| bool | flip = false |
||
| ) |
| p1 | Top left point. |
| p2 | Top right point. |
Definition at line 371 of file ProceduralRoad.cpp.
|
inlineprivate |
Definition at line 359 of file ProceduralRoad.cpp.
|
private |
Definition at line 289 of file ProceduralRoad.cpp.
|
private |
If materialName is empty, the default material will be used.
Create the mesh via the MeshManager
Define the vertices
Define triangles
Create vertex data structure for vertices shared between sub meshes
Create declaration (memory format) of vertex data
Allocate vertex buffer of the requested number of vertices (vertexCount) and bytes per vertex (offset)
Upload the vertex data to the card
Set vertex buffer binding so buffer 0 is bound to our vertex buffer
Allocate index buffer of the requested number of vertices (ibufCount)
Upload the index data to the card
Set parameters of the submesh
Notify Mesh object that it has been loaded
Definition at line 595 of file ProceduralRoad.cpp.
| void ProceduralRoad::finish | ( | Ogre::SceneNode * | snode, |
| const std::string & | materialName = "" |
||
| ) |
If materialName is empty, the default material will be used.
Definition at line 70 of file ProceduralRoad.cpp.
|
inline |
Must be set before any quads are added. Default: true.
Definition at line 78 of file ProceduralRoad.h.
|
private |
Definition at line 421 of file ProceduralRoad.cpp.
|
private |
Register collision triangles?
Definition at line 115 of file ProceduralRoad.h.
|
private |
Definition at line 109 of file ProceduralRoad.h.
|
private |
Definition at line 110 of file ProceduralRoad.h.
|
private |
Definition at line 111 of file ProceduralRoad.h.
|
private |
Definition at line 108 of file ProceduralRoad.h.
|
private |
Definition at line 106 of file ProceduralRoad.h.
|
private |
Definition at line 113 of file ProceduralRoad.h.
|
private |
Definition at line 112 of file ProceduralRoad.h.
|
private |
Definition at line 116 of file ProceduralRoad.h.
|
private |
Definition at line 98 of file ProceduralRoad.h.
|
static |
Definition at line 81 of file ProceduralRoad.h.
|
static |
Definition at line 80 of file ProceduralRoad.h.
|
private |
Definition at line 114 of file ProceduralRoad.h.
|
private |
Definition at line 97 of file ProceduralRoad.h.
|
private |
Definition at line 117 of file ProceduralRoad.h.
|
private |
Definition at line 107 of file ProceduralRoad.h.
|
private |
Definition at line 100 of file ProceduralRoad.h.
|
private |
Definition at line 102 of file ProceduralRoad.h.
|
private |
Definition at line 104 of file ProceduralRoad.h.
|
private |
Definition at line 101 of file ProceduralRoad.h.
|
private |
Definition at line 103 of file ProceduralRoad.h.