RigsofRods
Soft-body Physics Simulation
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 
8 namespace RoR {
9 
10 struct Locator_t
11 {
15  Ogre::Vector3 coords;
16 
17  NodeNum_t getSmallestNode() { return std::min(ref, std::min(nx, ny)); }
18  NodeNum_t getBiggestNode() { return std::min(ref, std::min(nx, ny)); }
19  NodeNum_t getMean() { return (ref + nx + ny) / 3; }
20 };
21 
22 } // namespace RoR
RoR::Locator_t::nx
NodeNum_t nx
Definition: Locator_t.h:13
RoR::Locator_t::ny
NodeNum_t ny
Definition: Locator_t.h:14
RoR::Locator_t::ref
NodeNum_t ref
Definition: Locator_t.h:12
RoR::Locator_t
Definition: Locator_t.h:10
RoR::Locator_t::getBiggestNode
NodeNum_t getBiggestNode()
Definition: Locator_t.h:18
RoR::NodeNum_t
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
Definition: ForwardDeclarations.h:52
SimData.h
Core data structures for simulation; Everything affected by by either physics, network or user intera...
RoR::Locator_t::getMean
NodeNum_t getMean()
Definition: Locator_t.h:19
RoR::Locator_t::coords
Ogre::Vector3 coords
Definition: Locator_t.h:15
RoR::Locator_t::getSmallestNode
NodeNum_t getSmallestNode()
Definition: Locator_t.h:17
RoR
Definition: AppContext.h:36