RigsofRods
Soft-body Physics Simulation
Data Structures | Public Member Functions | Private Attributes | Friends
RoR::Airbrake Class Reference

#include <AirBrake.h>

+ Collaboration diagram for RoR::Airbrake:

Data Structures

struct  CoVertice_t
 

Public Member Functions

 Airbrake (ActorPtr actor, const char *basename, int num, node_t *ndref, node_t *ndx, node_t *ndy, node_t *nda, Ogre::Vector3 pos, float width, float length, float maxang, std::string const &texname, float tx1, float tx2, float tx3, float tx4, float lift_coef)
 
 ~Airbrake ()
 
void updatePosition (float amount)
 
void applyForce ()
 
float getRatio () const
 
float getMaxAngle () const
 

Private Attributes

Ogre::MeshPtr msh
 
Ogre::SceneNode * snode
 
node_tnoderef
 
node_tnodex
 
node_tnodey
 
node_tnodea
 
Ogre::Vector3 offset
 gfx attribute More...
 
float ratio
 Current state. More...
 
float maxangle
 attribute from truckfile More...
 
float area
 Attribute set at spawn. More...
 
Ogre::Entity * ec
 

Friends

class RoR::ActorSpawner
 

Detailed Description

Definition at line 35 of file AirBrake.h.

Constructor & Destructor Documentation

◆ Airbrake()

Airbrake::Airbrake ( ActorPtr  actor,
const char *  basename,
int  num,
node_t ndref,
node_t ndx,
node_t ndy,
node_t nda,
Ogre::Vector3  pos,
float  width,
float  length,
float  maxang,
std::string const &  texname,
float  tx1,
float  tx2,
float  tx3,
float  tx4,
float  lift_coef 
)

Create the mesh via the MeshManager

Create submesh

Define the vertices

Define triangles The values in this table refer to vertices in the above table

Create vertex data structure for vertices shared between submeshes

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

Set bounding information (for culling)

Notify Mesh object that it has been loaded

Definition at line 34 of file AirBrake.cpp.

+ Here is the call graph for this function:

◆ ~Airbrake()

RoR::Airbrake::~Airbrake ( )
inline

Definition at line 63 of file AirBrake.h.

Member Function Documentation

◆ applyForce()

void Airbrake::applyForce ( )

Definition at line 171 of file AirBrake.cpp.

◆ getMaxAngle()

float RoR::Airbrake::getMaxAngle ( ) const
inline

Definition at line 68 of file AirBrake.h.

◆ getRatio()

float RoR::Airbrake::getRatio ( ) const
inline

Definition at line 67 of file AirBrake.h.

◆ updatePosition()

void Airbrake::updatePosition ( float  amount)

Definition at line 165 of file AirBrake.cpp.

Friends And Related Function Documentation

◆ RoR::ActorSpawner

friend class RoR::ActorSpawner
friend

Definition at line 37 of file AirBrake.h.

Field Documentation

◆ area

float RoR::Airbrake::area
private

Attribute set at spawn.

Definition at line 57 of file AirBrake.h.

◆ ec

Ogre::Entity* RoR::Airbrake::ec
private

Definition at line 59 of file AirBrake.h.

◆ maxangle

float RoR::Airbrake::maxangle
private

attribute from truckfile

Definition at line 56 of file AirBrake.h.

◆ msh

Ogre::MeshPtr RoR::Airbrake::msh
private

Definition at line 48 of file AirBrake.h.

◆ nodea

node_t* RoR::Airbrake::nodea
private

Definition at line 53 of file AirBrake.h.

◆ noderef

node_t* RoR::Airbrake::noderef
private

Definition at line 50 of file AirBrake.h.

◆ nodex

node_t* RoR::Airbrake::nodex
private

Definition at line 51 of file AirBrake.h.

◆ nodey

node_t* RoR::Airbrake::nodey
private

Definition at line 52 of file AirBrake.h.

◆ offset

Ogre::Vector3 RoR::Airbrake::offset
private

gfx attribute

Definition at line 54 of file AirBrake.h.

◆ ratio

float RoR::Airbrake::ratio
private

Current state.

Definition at line 55 of file AirBrake.h.

◆ snode

Ogre::SceneNode* RoR::Airbrake::snode
private

Definition at line 49 of file AirBrake.h.


The documentation for this class was generated from the following files: