Soft-body Physics Simulation
Data Structures | Public Member Functions | Data Fields | Private Attributes
RoR::FlexAirfoil Class Reference

#include <FlexAirfoil.h>

+ Collaboration diagram for RoR::FlexAirfoil:

Data Structures

struct  CoVertice_t

Public Member Functions

 FlexAirfoil (Ogre::String const &wname, ActorPtr actor, NodeNum_t pnfld, NodeNum_t pnfrd, NodeNum_t pnflu, NodeNum_t pnfru, NodeNum_t pnbld, NodeNum_t pnbrd, NodeNum_t pnblu, NodeNum_t pnbru, std::string const &texname, Ogre::Vector2 texlf, Ogre::Vector2 texrf, Ogre::Vector2 texlb, Ogre::Vector2 texrb, char mtype, float controlratio, float mind, float maxd, Ogre::String const &afname, float lift_coef, bool break_able)
 ~FlexAirfoil ()
void updateVerticesPhysics ()
Ogre::Vector3 updateVerticesGfx (RoR::GfxActor *gfx_actor)
void uploadVertices ()
void setControlDeflection (float val)
void enableInducedDrag (float span, float area, bool l)
void addwash (int propid, float ratio)
void updateForces ()

Data Fields

float aoa
char type
NodeNum_t nfld
NodeNum_t nfrd
NodeNum_t nflu
NodeNum_t nfru
NodeNum_t nbld
NodeNum_t nbrd
NodeNum_t nblu
NodeNum_t nbru
bool broken
bool breakable
float liftcoef
float * vertices

Private Attributes

float airfoilpos [90]
Ogre::MeshPtr msh
Ogre::SubMesh * subface
Ogre::SubMesh * subband
Ogre::SubMesh * subcup
Ogre::SubMesh * subcdn
Ogre::VertexDeclaration * decl
Ogre::HardwareVertexBufferSharedPtr vbuf
size_t nVertices
size_t vbufCount
union {
   float *   vertices
   CoVertice_t *   covertices
size_t faceibufCount
size_t bandibufCount
size_t cupibufCount
size_t cdnibufCount
unsigned short * facefaces
unsigned short * bandfaces
unsigned short * cupfaces
unsigned short * cdnfaces
float sref
float deflection
float chordratio
bool hascontrol
bool isstabilator
bool stabilleft
float lratio
float rratio
float mindef
float maxdef
float thickness
bool useInducedDrag
float idSpan
float idArea
bool idLeft
AeroEngine ** aeroengines
int free_wash
int washpropnum [MAX_AEROENGINES]
float washpropratio [MAX_AEROENGINES]

Detailed Description

Definition at line 33 of file FlexAirfoil.h.

Constructor & Destructor Documentation

◆ FlexAirfoil()

FlexAirfoil::FlexAirfoil ( Ogre::String const &  wname,
ActorPtr  actor,
NodeNum_t  pnfld,
NodeNum_t  pnfrd,
NodeNum_t  pnflu,
NodeNum_t  pnfru,
NodeNum_t  pnbld,
NodeNum_t  pnbrd,
NodeNum_t  pnblu,
NodeNum_t  pnbru,
std::string const &  texname,
Ogre::Vector2  texlf,
Ogre::Vector2  texrf,
Ogre::Vector2  texlb,
Ogre::Vector2  texrb,
char  mtype,
float  controlratio,
float  mind,
float  maxd,
Ogre::String const &  afname,
float  lift_coef,
bool  break_able 

Create the mesh via the MeshManager

Create submeshes

Define the vertices

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

Create vertex data structure for 8 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

Allocate index buffer of the requested number of vertices (ibufCount)

Upload the index data to the card

Set parameters of the submesh

Allocate index buffer of the requested number of vertices (ibufCount)

Upload the index data to the card

Set parameters of the submesh

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 77 of file FlexAirfoil.cpp.

+ Here is the call graph for this function:

◆ ~FlexAirfoil()

FlexAirfoil::~FlexAirfoil ( )

Definition at line 682 of file FlexAirfoil.cpp.

Member Function Documentation

◆ addwash()

void FlexAirfoil::addwash ( int  propid,
float  ratio 

Definition at line 583 of file FlexAirfoil.cpp.

+ Here is the caller graph for this function:

◆ enableInducedDrag()

void FlexAirfoil::enableInducedDrag ( float  span,
float  area,
bool  l 

Definition at line 575 of file FlexAirfoil.cpp.

+ Here is the caller graph for this function:

◆ setControlDeflection()

void FlexAirfoil::setControlDeflection ( float  val)

Definition at line 569 of file FlexAirfoil.cpp.

◆ updateForces()

void FlexAirfoil::updateForces ( )

Definition at line 590 of file FlexAirfoil.cpp.

+ Here is the call graph for this function:

◆ updateVerticesGfx()

Vector3 FlexAirfoil::updateVerticesGfx ( RoR::GfxActor gfx_actor)

Definition at line 442 of file FlexAirfoil.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateVerticesPhysics()

void FlexAirfoil::updateVerticesPhysics ( )

Definition at line 413 of file FlexAirfoil.cpp.

+ Here is the caller graph for this function:

◆ uploadVertices()

void FlexAirfoil::uploadVertices ( )

Definition at line 563 of file FlexAirfoil.cpp.

+ Here is the caller graph for this function:

Field Documentation

◆ @11

union { ... }

◆ aeroengines

AeroEngine** RoR::FlexAirfoil::aeroengines

Definition at line 131 of file FlexAirfoil.h.

◆ airfoil

Airfoil* RoR::FlexAirfoil::airfoil

Definition at line 130 of file FlexAirfoil.h.

◆ airfoilpos

float RoR::FlexAirfoil::airfoilpos[90]

Definition at line 74 of file FlexAirfoil.h.

◆ aoa

float RoR::FlexAirfoil::aoa

Definition at line 57 of file FlexAirfoil.h.

◆ bandfaces

unsigned short* RoR::FlexAirfoil::bandfaces

Definition at line 108 of file FlexAirfoil.h.

◆ bandibufCount

size_t RoR::FlexAirfoil::bandibufCount

Definition at line 104 of file FlexAirfoil.h.

◆ breakable

bool RoR::FlexAirfoil::breakable

Definition at line 69 of file FlexAirfoil.h.

◆ broken

bool RoR::FlexAirfoil::broken

Definition at line 68 of file FlexAirfoil.h.

◆ cdnfaces

unsigned short* RoR::FlexAirfoil::cdnfaces

Definition at line 110 of file FlexAirfoil.h.

◆ cdnibufCount

size_t RoR::FlexAirfoil::cdnibufCount

Definition at line 106 of file FlexAirfoil.h.

◆ chordratio

float RoR::FlexAirfoil::chordratio

Definition at line 116 of file FlexAirfoil.h.

◆ covertices

CoVertice_t* RoR::FlexAirfoil::covertices

Definition at line 100 of file FlexAirfoil.h.

◆ cupfaces

unsigned short* RoR::FlexAirfoil::cupfaces

Definition at line 109 of file FlexAirfoil.h.

◆ cupibufCount

size_t RoR::FlexAirfoil::cupibufCount

Definition at line 105 of file FlexAirfoil.h.

◆ decl

Ogre::VertexDeclaration* RoR::FlexAirfoil::decl

Definition at line 91 of file FlexAirfoil.h.

◆ deflection

float RoR::FlexAirfoil::deflection

Definition at line 115 of file FlexAirfoil.h.

◆ facefaces

unsigned short* RoR::FlexAirfoil::facefaces

Definition at line 107 of file FlexAirfoil.h.

◆ faceibufCount

size_t RoR::FlexAirfoil::faceibufCount

Definition at line 103 of file FlexAirfoil.h.

◆ free_wash

int RoR::FlexAirfoil::free_wash

Definition at line 132 of file FlexAirfoil.h.

◆ hascontrol

bool RoR::FlexAirfoil::hascontrol

Definition at line 117 of file FlexAirfoil.h.

◆ idArea

float RoR::FlexAirfoil::idArea

Definition at line 127 of file FlexAirfoil.h.

◆ idLeft

bool RoR::FlexAirfoil::idLeft

Definition at line 128 of file FlexAirfoil.h.

◆ idSpan

float RoR::FlexAirfoil::idSpan

Definition at line 126 of file FlexAirfoil.h.

◆ isstabilator

bool RoR::FlexAirfoil::isstabilator

Definition at line 118 of file FlexAirfoil.h.

◆ liftcoef

float RoR::FlexAirfoil::liftcoef

Definition at line 70 of file FlexAirfoil.h.

◆ lratio

float RoR::FlexAirfoil::lratio

Definition at line 120 of file FlexAirfoil.h.

◆ maxdef

float RoR::FlexAirfoil::maxdef

Definition at line 123 of file FlexAirfoil.h.

◆ mindef

float RoR::FlexAirfoil::mindef

Definition at line 122 of file FlexAirfoil.h.

◆ msh

Ogre::MeshPtr RoR::FlexAirfoil::msh

Definition at line 84 of file FlexAirfoil.h.

◆ nbld

NodeNum_t RoR::FlexAirfoil::nbld

Definition at line 63 of file FlexAirfoil.h.

◆ nblu

NodeNum_t RoR::FlexAirfoil::nblu

Definition at line 65 of file FlexAirfoil.h.

◆ nbrd

NodeNum_t RoR::FlexAirfoil::nbrd

Definition at line 64 of file FlexAirfoil.h.

◆ nbru

NodeNum_t RoR::FlexAirfoil::nbru

Definition at line 66 of file FlexAirfoil.h.

◆ nfld

NodeNum_t RoR::FlexAirfoil::nfld

Definition at line 59 of file FlexAirfoil.h.

◆ nflu

NodeNum_t RoR::FlexAirfoil::nflu

Definition at line 61 of file FlexAirfoil.h.

◆ nfrd

NodeNum_t RoR::FlexAirfoil::nfrd

Definition at line 60 of file FlexAirfoil.h.

◆ nfru

NodeNum_t RoR::FlexAirfoil::nfru

Definition at line 62 of file FlexAirfoil.h.

◆ nodes

node_t* RoR::FlexAirfoil::nodes

Definition at line 111 of file FlexAirfoil.h.

◆ nVertices

size_t RoR::FlexAirfoil::nVertices

Definition at line 94 of file FlexAirfoil.h.

◆ rratio

float RoR::FlexAirfoil::rratio

Definition at line 121 of file FlexAirfoil.h.

◆ sref

float RoR::FlexAirfoil::sref

Definition at line 113 of file FlexAirfoil.h.

◆ stabilleft

bool RoR::FlexAirfoil::stabilleft

Definition at line 119 of file FlexAirfoil.h.

◆ subband

Ogre::SubMesh* RoR::FlexAirfoil::subband

Definition at line 86 of file FlexAirfoil.h.

◆ subcdn

Ogre::SubMesh* RoR::FlexAirfoil::subcdn

Definition at line 89 of file FlexAirfoil.h.

◆ subcup

Ogre::SubMesh* RoR::FlexAirfoil::subcup

Definition at line 88 of file FlexAirfoil.h.

◆ subface

Ogre::SubMesh* RoR::FlexAirfoil::subface

Definition at line 85 of file FlexAirfoil.h.

◆ thickness

float RoR::FlexAirfoil::thickness

Definition at line 124 of file FlexAirfoil.h.

◆ type

char RoR::FlexAirfoil::type

Definition at line 58 of file FlexAirfoil.h.

◆ useInducedDrag

bool RoR::FlexAirfoil::useInducedDrag

Definition at line 125 of file FlexAirfoil.h.

◆ vbuf

Ogre::HardwareVertexBufferSharedPtr RoR::FlexAirfoil::vbuf

Definition at line 92 of file FlexAirfoil.h.

◆ vbufCount

size_t RoR::FlexAirfoil::vbufCount

Definition at line 95 of file FlexAirfoil.h.

◆ vertices

float* RoR::FlexAirfoil::vertices

Definition at line 99 of file FlexAirfoil.h.

◆ washpropnum

int RoR::FlexAirfoil::washpropnum[MAX_AEROENGINES]

Definition at line 133 of file FlexAirfoil.h.

◆ washpropratio

float RoR::FlexAirfoil::washpropratio[MAX_AEROENGINES]

Definition at line 134 of file FlexAirfoil.h.

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