Rigs of Rods 2023.09
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Locator_t.h
Go to the documentation of this file.
1#pragma once
2
3#include <OgreVector3.h>
4#include <SimData.h>
5
6#include <algorithm>
7
8namespace RoR {
9
10 struct Locator_t
11 {
15 Ogre::Vector3 coords = Ogre::Vector3::ZERO;
16 bool is_forvert = false;
17
18 NodeNum_t getSmallestNode() { return std::min(ref, std::min(nx, ny)); }
19 NodeNum_t getBiggestNode() { return std::min(ref, std::min(nx, ny)); }
20 NodeNum_t getMean() { return (ref + nx + ny) / 3; }
21 };
22
30
31} // namespace RoR
Core data structures for simulation; Everything affected by by either physics, network or user intera...
static const NodeNum_t NODENUM_INVALID
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
< Node resolution must be done in ActorSpawner, but vert resolution in FlexBody
Definition Locator_t.h:24
NodeNum_t ref
Definition Locator_t.h:12
NodeNum_t nx
Definition Locator_t.h:13
NodeNum_t getBiggestNode()
Definition Locator_t.h:19
NodeNum_t getSmallestNode()
Definition Locator_t.h:18
NodeNum_t ny
Definition Locator_t.h:14
Ogre::Vector3 coords
Definition Locator_t.h:15
NodeNum_t getMean()
Definition Locator_t.h:20