#include <SlideNode.h>
Definition at line 64 of file SlideNode.h.
◆ SlideNode()
- Parameters
-
sliding_node | valid pointer to the node acting as a slide node |
rail | initial RailGroup to slide on, or NULL. |
Definition at line 63 of file SlideNode.cpp.
◆ AttachToRail()
void RoR::SlideNode::AttachToRail |
( |
RailGroup * |
toAttach | ) |
|
|
inline |
- Parameters
-
toAttach | Which rail to attach to, Pass NULL to detach this SlideNode from any rail. |
Definition at line 140 of file SlideNode.h.
◆ CalcCorrectiveForces()
Ogre::Vector3 SlideNode::CalcCorrectiveForces |
( |
| ) |
|
|
private |
Calculate forces between the ideal and actual position of the sliding node.
Definition at line 249 of file SlideNode.cpp.
◆ getLenTo() [1/6]
Ogre::Real SlideNode::getLenTo |
( |
const beam_t * |
beam | ) |
const |
- Parameters
-
- Returns
- value is always positive, if beam is null return infinity
Definition at line 244 of file SlideNode.cpp.
◆ getLenTo() [2/6]
Ogre::Real SlideNode::getLenTo |
( |
const beam_t * |
beam, |
|
|
const Ogre::Vector3 & |
point |
|
) |
| |
|
static |
- Parameters
-
- Returns
- value is always positive, if beam is null return infinity
Definition at line 226 of file SlideNode.cpp.
◆ getLenTo() [3/6]
Ogre::Real SlideNode::getLenTo |
( |
const RailGroup * |
group | ) |
const |
- Parameters
-
- Returns
- value is always positive, if group is null return infinity.
Definition at line 234 of file SlideNode.cpp.
◆ getLenTo() [4/6]
Ogre::Real SlideNode::getLenTo |
( |
const RailGroup * |
group, |
|
|
const Ogre::Vector3 & |
point |
|
) |
| |
|
static |
- Parameters
-
- Returns
- value is always positive, if group is null return infinity.
Definition at line 210 of file SlideNode.cpp.
◆ getLenTo() [5/6]
Ogre::Real SlideNode::getLenTo |
( |
const RailSegment * |
rail | ) |
const |
- Parameters
-
- Returns
- value is always positive, if rail is null return infinity.
Definition at line 239 of file SlideNode.cpp.
◆ getLenTo() [6/6]
Ogre::Real SlideNode::getLenTo |
( |
const RailSegment * |
rail, |
|
|
const Ogre::Vector3 & |
point |
|
) |
| |
|
static |
- Parameters
-
- Returns
- value is always positive, if rail is null return infinity.
Definition at line 218 of file SlideNode.cpp.
◆ GetSlideNodeId()
int SlideNode::GetSlideNodeId |
( |
| ) |
|
Returns the node index of the slide node.
Definition at line 159 of file SlideNode.cpp.
◆ GetSlideNodePosition()
const Ogre::Vector3 & SlideNode::GetSlideNodePosition |
( |
| ) |
const |
◆ ResetPositions()
void SlideNode::ResetPositions |
( |
| ) |
|
◆ ResetSlideNode()
void RoR::SlideNode::ResetSlideNode |
( |
| ) |
|
|
inline |
Move back to initial rail, reset 'broken' flag and recalculate closest position.
Definition at line 92 of file SlideNode.h.
◆ SetDefaultRail()
void RoR::SlideNode::SetDefaultRail |
( |
RailGroup * |
rail | ) |
|
|
inline |
Sets rail to initially use when spawned or reset.
Definition at line 82 of file SlideNode.h.
◆ UpdateForces()
void SlideNode::UpdateForces |
( |
float |
dt | ) |
|
Updates the corrective forces and applies these forces to the beam.
- Parameters
-
Definition at line 87 of file SlideNode.cpp.
◆ UpdatePosition()
void SlideNode::UpdatePosition |
( |
| ) |
|
Checks for current rail segment and updates ideal position of the node.
Definition at line 164 of file SlideNode.cpp.
◆ m_attach_distance
float RoR::SlideNode::m_attach_distance |
|
private |
Maximum distance slide node will attach to a beam (m)
Definition at line 126 of file SlideNode.h.
◆ m_attach_rate
float RoR::SlideNode::m_attach_rate |
|
private |
How fast the cur threshold changes when attaching (i.e. how long it will take for springs to fully attach to the Rail) (m/s)
Definition at line 125 of file SlideNode.h.
◆ m_break_force
float RoR::SlideNode::m_break_force |
|
private |
Force at which Slide Node breaks away from the rail (N)
Definition at line 124 of file SlideNode.h.
◆ m_cur_rail_seg
Current rail segment we are sliding on.
Definition at line 118 of file SlideNode.h.
◆ m_cur_railgroup
Current Rail group, used for attachments.
Definition at line 117 of file SlideNode.h.
◆ m_cur_threshold
float RoR::SlideNode::m_cur_threshold |
|
private |
Distance away from beam before corrective forces begin to act on the node (m)
Definition at line 122 of file SlideNode.h.
◆ m_ideal_position
Ogre::Vector3 RoR::SlideNode::m_ideal_position |
|
private |
Where the node SHOULD be. (World, m)
Definition at line 120 of file SlideNode.h.
◆ m_initial_railgroup
RailGroup* RoR::SlideNode::m_initial_railgroup |
|
private |
Initial Rail group on spawn.
Definition at line 116 of file SlideNode.h.
◆ m_initial_threshold
float RoR::SlideNode::m_initial_threshold |
|
private |
Distance from beam calculating corrective forces (m)
Definition at line 121 of file SlideNode.h.
◆ m_node_forces_ratio
float RoR::SlideNode::m_node_forces_ratio |
|
private |
Ratio of length along the slide beam where the virtual node is "0.0f = p1, 1.0f = p2".
Definition at line 119 of file SlideNode.h.
◆ m_sliding_beam
beam_t* RoR::SlideNode::m_sliding_beam |
|
private |
Pointer to current beam sliding on.
Definition at line 115 of file SlideNode.h.
◆ m_sliding_node
node_t* RoR::SlideNode::m_sliding_node |
|
private |
Pointer to node that is sliding.
Definition at line 114 of file SlideNode.h.
◆ m_spring_rate
float RoR::SlideNode::m_spring_rate |
|
private |
Spring rate holding node to rail (N/m)
Definition at line 123 of file SlideNode.h.
◆ sn_attach_foreign
bool RoR::SlideNode::sn_attach_foreign |
Attach/detach to rails only on other vehicles.
Definition at line 107 of file SlideNode.h.
◆ sn_attach_self
bool RoR::SlideNode::sn_attach_self |
Attach/detach to rails on the current vehicle only.
Definition at line 106 of file SlideNode.h.
◆ sn_slide_broken
bool RoR::SlideNode::sn_slide_broken |
The slidenode was pulled away from the rail.
Definition at line 108 of file SlideNode.h.
The documentation for this class was generated from the following files: