RigsofRods
Soft-body Physics Simulation
|
#include <FlexAirfoil.h>
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 |
CoVertice_t * | covertices |
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 |
node_t * | nodes |
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 |
Airfoil * | airfoil |
AeroEngine ** | aeroengines |
int | free_wash |
int | washpropnum [MAX_AEROENGINES] |
float | washpropratio [MAX_AEROENGINES] |
Definition at line 33 of file FlexAirfoil.h.
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.
FlexAirfoil::~FlexAirfoil | ( | ) |
Definition at line 682 of file FlexAirfoil.cpp.
void FlexAirfoil::addwash | ( | int | propid, |
float | ratio | ||
) |
void FlexAirfoil::enableInducedDrag | ( | float | span, |
float | area, | ||
bool | l | ||
) |
void FlexAirfoil::setControlDeflection | ( | float | val | ) |
Definition at line 569 of file FlexAirfoil.cpp.
void FlexAirfoil::updateForces | ( | ) |
Vector3 FlexAirfoil::updateVerticesGfx | ( | RoR::GfxActor * | gfx_actor | ) |
Definition at line 442 of file FlexAirfoil.cpp.
void FlexAirfoil::updateVerticesPhysics | ( | ) |
void FlexAirfoil::uploadVertices | ( | ) |
union { ... } |
|
private |
Definition at line 131 of file FlexAirfoil.h.
|
private |
Definition at line 130 of file FlexAirfoil.h.
|
private |
Definition at line 74 of file FlexAirfoil.h.
float RoR::FlexAirfoil::aoa |
Definition at line 57 of file FlexAirfoil.h.
|
private |
Definition at line 108 of file FlexAirfoil.h.
|
private |
Definition at line 104 of file FlexAirfoil.h.
bool RoR::FlexAirfoil::breakable |
Definition at line 69 of file FlexAirfoil.h.
bool RoR::FlexAirfoil::broken |
Definition at line 68 of file FlexAirfoil.h.
|
private |
Definition at line 110 of file FlexAirfoil.h.
|
private |
Definition at line 106 of file FlexAirfoil.h.
|
private |
Definition at line 116 of file FlexAirfoil.h.
CoVertice_t* RoR::FlexAirfoil::covertices |
Definition at line 100 of file FlexAirfoil.h.
|
private |
Definition at line 109 of file FlexAirfoil.h.
|
private |
Definition at line 105 of file FlexAirfoil.h.
|
private |
Definition at line 91 of file FlexAirfoil.h.
|
private |
Definition at line 115 of file FlexAirfoil.h.
|
private |
Definition at line 107 of file FlexAirfoil.h.
|
private |
Definition at line 103 of file FlexAirfoil.h.
|
private |
Definition at line 132 of file FlexAirfoil.h.
|
private |
Definition at line 117 of file FlexAirfoil.h.
|
private |
Definition at line 127 of file FlexAirfoil.h.
|
private |
Definition at line 128 of file FlexAirfoil.h.
|
private |
Definition at line 126 of file FlexAirfoil.h.
|
private |
Definition at line 118 of file FlexAirfoil.h.
float RoR::FlexAirfoil::liftcoef |
Definition at line 70 of file FlexAirfoil.h.
|
private |
Definition at line 120 of file FlexAirfoil.h.
|
private |
Definition at line 123 of file FlexAirfoil.h.
|
private |
Definition at line 122 of file FlexAirfoil.h.
|
private |
Definition at line 84 of file FlexAirfoil.h.
NodeNum_t RoR::FlexAirfoil::nbld |
Definition at line 63 of file FlexAirfoil.h.
NodeNum_t RoR::FlexAirfoil::nblu |
Definition at line 65 of file FlexAirfoil.h.
NodeNum_t RoR::FlexAirfoil::nbrd |
Definition at line 64 of file FlexAirfoil.h.
NodeNum_t RoR::FlexAirfoil::nbru |
Definition at line 66 of file FlexAirfoil.h.
NodeNum_t RoR::FlexAirfoil::nfld |
Definition at line 59 of file FlexAirfoil.h.
NodeNum_t RoR::FlexAirfoil::nflu |
Definition at line 61 of file FlexAirfoil.h.
NodeNum_t RoR::FlexAirfoil::nfrd |
Definition at line 60 of file FlexAirfoil.h.
NodeNum_t RoR::FlexAirfoil::nfru |
Definition at line 62 of file FlexAirfoil.h.
|
private |
Definition at line 111 of file FlexAirfoil.h.
|
private |
Definition at line 94 of file FlexAirfoil.h.
|
private |
Definition at line 121 of file FlexAirfoil.h.
|
private |
Definition at line 113 of file FlexAirfoil.h.
|
private |
Definition at line 119 of file FlexAirfoil.h.
|
private |
Definition at line 86 of file FlexAirfoil.h.
|
private |
Definition at line 89 of file FlexAirfoil.h.
|
private |
Definition at line 88 of file FlexAirfoil.h.
|
private |
Definition at line 85 of file FlexAirfoil.h.
|
private |
Definition at line 124 of file FlexAirfoil.h.
char RoR::FlexAirfoil::type |
Definition at line 58 of file FlexAirfoil.h.
|
private |
Definition at line 125 of file FlexAirfoil.h.
|
private |
Definition at line 92 of file FlexAirfoil.h.
|
private |
Definition at line 95 of file FlexAirfoil.h.
float* RoR::FlexAirfoil::vertices |
Definition at line 99 of file FlexAirfoil.h.
|
private |
Definition at line 133 of file FlexAirfoil.h.
|
private |
Definition at line 134 of file FlexAirfoil.h.