Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <vsbox.h>
Public Member Functions | |
Box (const Vector &cornermin, const Vector &cornermax) | |
void | ProcessDrawQueue (int whichdrawqueue) |
![]() | |
void | initTechnique (const string &technique) |
TechniquePtr | getTechnique () const |
void | setTechnique (TechniquePtr tech) |
bool | LoadExistant (Mesh *mesh) |
Loads a mesh that has been found in the hash table into this mesh (copying original data) More... | |
bool | LoadExistant (const string filehash, const Vector &scale, int faction) |
Mesh () | |
Mesh (const Mesh &m) | |
GFXVertexList * | getVertexList () const |
void | setVertexList (GFXVertexList *_vlist) |
float | getFramesPerSecond () const |
float | getCurrentFrame () const |
void | setCurrentFrame (float) |
int | getNumAnimationFrames (const string &which=string()) const |
int | getNumLOD () const |
int | getNumTextureFrames () const |
float | getTextureFramesPerSecond () const |
double | getTextureCumulativeTime () const |
void | setTextureCumulativeTime (double) |
bool | getConvex () const |
void | setConvex (bool b) |
virtual int | MeshType () const |
BLENDFUNC | getBlendSrc () const |
BLENDFUNC | getBlendDst () const |
void | Fork (Mesh *&one, Mesh *&two, float a, float b, float c, float d) |
Forks the mesh across the plane a,b,c,d into two separate meshes...upon which this may be deleted. More... | |
virtual | ~Mesh () |
Destructor... kills orig if refcount of orig becomes zero. More... | |
unsigned int | numFX () const |
Gets number of specialFX. More... | |
void | EnableSpecialFX () |
Turns on SpecialFX. More... | |
unsigned int | numTextures () const |
Texture * | texture (int i) const |
void | SetBlendMode (BLENDFUNC src, BLENDFUNC dst, bool lodcascade=false) |
void | GetPolys (vector< mesh_polygon > &) |
Gets all polygons in this mesh for collision computation. More... | |
void | SetMaterial (const GFXMaterial &mat) |
Sets the material of this mesh to mat (affects original as well) More... | |
const GFXMaterial & | GetMaterial () const |
GFXBOOL | HasBeenDrawn () const |
If it has already been drawn this frame. More... | |
void | UnDraw () |
so one can query if it has or not been drawn More... | |
Vector const & | Position () const |
Returns center of this mesh. More... | |
void | Draw (float lod, const Matrix &m=identity_matrix, float toofar=1, int cloak=-1, float nebdist=0, unsigned char damage=0, bool renormalize_normals=false, const MeshFX *mfx=NULL) |
Draws lod pixel wide mesh at Transformation LATER. More... | |
void | DrawNow (float lod, bool centered, const Matrix &m=identity_matrix, int cloak=-1, float nebdist=0) |
Draws lod pixels wide, mesh at Transformation NOW. If centered, then will center on camera and disable cull. More... | |
virtual void | ProcessDrawQueue (size_t whichpass, int whichdrawqueue, bool zsort, const QVector &sortctr) |
Will draw all undrawn meshes of this type. More... | |
virtual void | SelectCullFace (int whichdrawqueue) |
Will draw all undrawn far meshes beyond the range of zbuffer (better be convex). More... | |
virtual void | RestoreCullFace (int whichdrawqueue) |
void | forceCullFace (GFXBOOL newValue) |
Sets whether or not this unit should be environment mapped. More... | |
GFXBOOL | getCullFaceForcedOn () const |
GFXBOOL | getCullFaceForcedOff () const |
void | setEnvMap (GFXBOOL newValue, bool lodcascade=false) |
GFXBOOL | getEnvMap () const |
void | setLighting (GFXBOOL newValue, bool lodcascade=false) |
GFXBOOL | getLighting () const |
Vector | corner_min () |
Returns bounding box values. More... | |
Vector | corner_max () |
BoundingBox * | getBoundingBox () |
Returns a physical boudning box in 3space instead of in current unit space. More... | |
bool | queryBoundingBox (const QVector &start, const float err) const |
queries this bounding box with a vector and radius More... | |
bool | queryBoundingBox (const QVector &start, const QVector &end, const float err) const |
Queries bounding box with a ray. More... | |
float | rSize () const |
returns the radial size of this More... | |
virtual float | clipRadialSize () const |
void | UpdateFX (float ttime) |
based on TTL, etc, updates shield effects More... | |
void | AddDamageFX (const Vector &LocalPos, const Vector &LocalNorm, const float percentage, const GFXColor &color=GFXColor(1, 1, 1, 1)) |
Adds a new damage effect with age damage to the part of the unit. Color specifies the shield oclor. More... | |
void | setVirtualBoundingBox (const Vector &mn, const Vector &mx, float rsize) |
Additional Inherited Members | |
![]() | |
static Mesh * | LoadMesh (const char *filename, const Vector &scalex, int faction, class Flightgroup *fg, const std::vector< std::string > &textureOverride=std::vector< std::string >()) |
Loading a mesh from an XML file. faction specifies the logos. Orig is for internal (LOD) use only! More... | |
static vector< Mesh * > | LoadMeshes (const char *filename, const Vector &scalex, int faction, class Flightgroup *fg, const std::vector< std::string > &textureOverride=std::vector< std::string >()) |
static vector< Mesh * > | LoadMeshes (VSFileSystem::VSFile &f, const Vector &scalex, int faction, class Flightgroup *fg, std::string hash_name, const std::vector< std::string > &textureOverride=std::vector< std::string >()) |
static void | ProcessZFarMeshes (bool nocamerasetup=false) |
static void | ProcessUndrawnMeshes (bool pushSpecialEffects=false, bool nocamerasetup=false) |
Will draw all undrawn meshes in total If pushSpclFX, the last series of meshes will be drawn with other lighting off. More... | |
![]() | |
void | PostProcessLoading (struct MeshXML *xml, const vector< string > &overrideTexture) |
Mesh (std::string filename, const Vector &scalex, int faction, class Flightgroup *fg, bool orig=false) | |
void | InitUnit () |
Setting all values to defaults (good for mesh copying and stuff) More... | |
Mesh * | getLOD (float lod, bool bBypassDamping=true) |
Returing the mesh relevant to "size" pixels LOD of this mesh. More... | |
![]() | |
Vector | local_pos |
the position of the center of this mesh for collision detection More... | |
int | refcount |
The refcount:: how many meshes are referencing the appropriate original. More... | |
Vector | mx |
bounding box More... | |
Vector | mn |
float | radialSize |
The radial size of this mesh. More... | |
int | numlods |
num lods contained in the array of Mesh "orig" More... | |
float | framespersecond |
Mesh * | orig |
float | lodsize |
The size that this LOD (if original) comes into effect. More... | |
Logo * | forcelogos |
The number of force logos on this mesh (original) More... | |
int | numforcelogo |
Logo * | squadlogos |
The number of squad logos on this mesh (original) More... | |
int | numsquadlogo |
GFXVertexList * | vlist |
tri,quad,line, strips, etc More... | |
unsigned int | myMatNum |
The number of the appropriate material for this mesh (default 0) More... | |
TechniquePtr | technique |
The technique used to render this mesh. More... | |
vector< Texture * > | Decal |
The decal relevant to this mesh. More... | |
Texture * | detailTexture |
vector< Vector > | detailPlanes |
float | polygon_offset |
char | envMapAndLit |
whether this should be environment mapped 0x1 and 0x2 for if it should be lit (ored together) More... | |
GFXBOOL | will_be_drawn |
Whether this original will be drawn this frame. More... | |
bool | convex |
The blend functions. More... | |
unsigned char | alphatest |
enum BLENDFUNC | blendSrc |
enum BLENDFUNC | blendDst |
vector< MeshDrawContext > * | draw_queue |
Support for reorganized rendering. More... | |
int | draw_sequence |
How transparent this mesh is (in what order should it be rendered in. More... | |
string | hash_name |
The name of this unit. More... | |
vector< MeshFX > | LocalFX |
The enabled light effects on this mesh. More... | |
![]() | |
static Hashtable< std::string, Mesh, MESH_HASTHABLE_SIZE > | meshHashTable |
The hash table of all meshes. More... | |
static Hashtable< std::string, std::vector< int > , MESH_HASTHABLE_SIZE > | animationSequences |
Definition at line 14 of file vsbox.cpp.
References a, Mesh::blendDst, Mesh::blendSrc, Mesh::corner_max(), Mesh::corner_min(), Mesh::draw_queue, Mesh::draw_sequence, Hashtable< KEY, VALUE, SIZ >::Get(), GFXFALSE, GFXQUAD, GFXQUADSTRIP, Mesh::InitUnit(), Mesh::meshHashTable, NUM_ZBUF_SEQ, ONE, Mesh::orig, Hashtable< KEY, VALUE, SIZ >::Put(), Mesh::refcount, Mesh::setEnvMap(), tostring(), VERTEX, and Mesh::vlist.
void Box::ProcessDrawQueue | ( | int | whichdrawqueue) |
Definition at line 90 of file vsbox.cpp.
References Mesh::corner_max(), Mesh::corner_min(), CULLFACE, DEPTHWRITE, Mesh::draw_queue, GFXBegin(), GFXBlendMode(), GFXColor4f(), GFXDisable(), GFXEnable(), GFXEnd(), GFXLoadMatrixModel(), GFXQUAD, GFXVertex3f(), INVSRCALPHA, LIGHTING, size, SRCALPHA, TEXTURE0, and TEXTURE1.