Vegastrike 0.5.1 rc1
1.0
Original sources for Vegastrike Evolved
|
#include <gfxlib_struct.h>
Public Member Functions | |
GFXSphereVertexList (float radius, int detail, bool insideout, bool reverse_normals) | |
creates a vertex list with 1 polytype and a given number of vertices More... | |
~GFXSphereVertexList () | |
virtual VDAT * | BeginMutate (int offset) |
Returns the array of vertices to be mutated. More... | |
virtual void | EndMutate (int newsize=0) |
Ends mutation and refreshes display list. More... | |
virtual void | BeginDrawState (GFXBOOL lock=GFXTRUE) |
virtual void | Draw () |
Draws a single copy of the mass-loaded vlist. More... | |
virtual void | EndDrawState (GFXBOOL lock=GFXTRUE) |
virtual void | GetPolys (GFXVertex **vert, int *numPolys, int *numTris) |
returns a packed vertex list with number of polys and number of tries to passed in arguments. Useful for getting vertex info from a mesh More... | |
virtual void | ProceduralModification () |
generates procedural planetdata to the actual detaillevel with the "plasma method" More... | |
![]() | |
void | RefreshDisplayList () |
Propagates modifications to the display list. More... | |
GFXVertexList (enum POLYTYPE poly, int numVertices, const GFXVertex *vertices, int numindices, bool Mutable=false, unsigned int *index=0) | |
creates a vertex list with 1 polytype and a given number of vertices More... | |
GFXVertexList (enum POLYTYPE *poly, int numVertices, const GFXVertex *vertices, int numlists, int *offsets, bool Mutable=false, unsigned int *index=0) | |
Creates a vertex list with an arbitrary number of poly types and given vertices, num list and offsets (see above) More... | |
GFXVertexList (enum POLYTYPE poly, int numVertices, const GFXColorVertex *colors, int numindices, bool Mutable=false, unsigned int *index=0) | |
Creates a vertex list with 1 poly type and color information to boot. More... | |
GFXVertexList (enum POLYTYPE *poly, int numVertices, const GFXColorVertex *colors, int numlists, int *offsets, bool Mutable=false, unsigned int *index=0) | |
Creates a vertex list with an arbitrary number of poly types and color. More... | |
virtual | ~GFXVertexList () |
virtual int | numTris () const |
Returns number of Triangles in vertex list (counts tri strips) More... | |
virtual int | numQuads () const |
Returns number of Quads in vertex list (counts quad strips) More... | |
unsigned int | GetIndex (int offset) const |
Looks up the index in the appropriate short, char or int array. More... | |
POLYTYPE * | GetPolyType () const |
int * | GetOffsets () const |
int | GetNumLists () const |
bool | hasColor () const |
int | GetNumVertices () const |
virtual VDAT * | Map (bool read, bool write) |
void | UnMap () |
void | LoadDrawState () |
Loads the draw state (what is active) of a given vlist for mass drawing. More... | |
void | Draw (enum POLYTYPE poly, int numV) |
void | Draw (enum POLYTYPE poly, int numV, unsigned char *index) |
void | Draw (enum POLYTYPE poly, int numV, unsigned short *index) |
void | Draw (enum POLYTYPE poly, int numV, unsigned int *index) |
void | DrawOnce () |
Loads draw state and prepares to draw only once. More... | |
Protected Member Functions | |
virtual void | Draw (enum POLYTYPE *poly, const INDEX index, const int numLists, const int *offsets) |
![]() | |
const GFXVertex * | GetVertex (int index) const |
Num vertices allocated. More... | |
const GFXColorVertex * | GetColorVertex (int index) const |
void | Init (enum POLYTYPE *poly, int numVertices, const GFXVertex *vert, const GFXColorVertex *colors, int numlists, int *offsets, bool Mutable, unsigned int *indices) |
Init function (call from construtor) More... | |
void | RenormalizeNormals () |
GFXVertexList () | |
Protected Attributes | |
float | radius |
Num vertices allocated. More... | |
GFXVertexList * | sphere |
![]() | |
int | numVertices |
union GFXVertexList::VDAT | data |
union GFXVertexList::INDEX | index |
enum POLYTYPE * | mode |
Array of modes that vertices will be drawn with. More... | |
bool | unique_mode |
int | display_list |
Display list number if list is indeed active. 0 otherwise. More... | |
int | vbo_data |
int | numlists |
number of different mode, drawn lists More... | |
int * | offsets |
char | changed |
If vertex list has been mutated since last draw. Low 3 bits store the stride of the index list (if avail). another bit for if color is presnet. More... | |
Additional Inherited Members | |
![]() | |
static void | VtxCopy (GFXVertexList *thus, GFXVertex *dst, int offset, int howmany) |
copies nonindexed vertices to dst vertex array More... | |
static void | ColVtxCopy (GFXVertexList *thus, GFXVertex *dst, int offset, int howmany) |
Copies nonindex colored vertices to dst vertex array. More... | |
static void | ColIndVtxCopy (GFXVertexList *thus, GFXVertex *dst, int offset, int howmany) |
Copies indexed colored vertices to dst vertex array. More... | |
static void | IndVtxCopy (GFXVertexList *thus, GFXVertex *dst, int offset, int howmany) |
Copies indexed vertices to dst vertex array. More... | |
Definition at line 638 of file gfxlib_struct.h.
GFXSphereVertexList::GFXSphereVertexList | ( | float | radius, |
int | detail, | ||
bool | insideout, | ||
bool | reverse_normals | ||
) |
creates a vertex list with 1 polytype and a given number of vertices
Definition at line 59 of file gl_sphere_list.cpp.
References UniverseUtil::cos(), GFXVertexList::data, GFXVertexList::display_list, g_rho, g_theta, GetS, GetT, GFXQUADSTRIP, GFXVertexList::GFXVertexList(), GFXVertex::i, i, GFXVertexList::INDEX::i, GFXVertexList::index, GFXVertex::j, j, GFXVertex::k, GFXVertexList::mode, GFXVertexList::numlists, GFXVertexList::numVertices, GFXVertexList::offsets, radius, GFXVertex::s, UniverseUtil::sin(), size, sphere, GFXVertex::t, GFXVertex::tw, GFXVertex::tx, GFXVertex::ty, GFXVertex::tz, GFXVertexList::vbo_data, GFXVertexList::VDAT::vertices, GFXVertex::x, x, GFXVertex::y, y, GFXVertex::z, and z.
GFXSphereVertexList::~GFXSphereVertexList | ( | ) |
Definition at line 207 of file gl_sphere_list.cpp.
References GFXVertexList::VDAT::colors, GFXVertexList::data, GFXVertexList::display_list, GFXVertexList::INDEX::i, GFXVertexList::index, GFXVertexList::mode, GFXVertexList::numlists, GFXVertexList::numVertices, GFXVertexList::offsets, GFXVertexList::vbo_data, and GFXVertexList::VDAT::vertices.
Loads the draw state (what is active) of a given vlist for mass drawing Specifies array pointers and loads the draw state of a given vlist for mass drawing
Reimplemented from GFXVertexList.
Definition at line 28 of file gl_sphere_list.cpp.
References GFXVertexList::BeginDrawState(), and sphere.
|
virtual |
Returns the array of vertices to be mutated.
Reimplemented from GFXVertexList.
Definition at line 51 of file gl_sphere_list.cpp.
|
protectedvirtual |
Reimplemented from GFXVertexList.
Definition at line 18 of file gl_sphere_list.cpp.
References GFXVertexList::Draw(), f, radius, and sphere.
|
virtual |
Draws a single copy of the mass-loaded vlist.
Reimplemented from GFXVertexList.
Definition at line 7 of file gl_sphere_list.cpp.
References GFXVertexList::Draw(), f, radius, and sphere.
Reimplemented from GFXVertexList.
Definition at line 46 of file gl_sphere_list.cpp.
References GFXVertexList::EndDrawState(), and sphere.
|
virtual |
Ends mutation and refreshes display list.
Reimplemented from GFXVertexList.
Definition at line 55 of file gl_sphere_list.cpp.
returns a packed vertex list with number of polys and number of tries to passed in arguments. Useful for getting vertex info from a mesh
Reimplemented from GFXVertexList.
Definition at line 34 of file gl_sphere_list.cpp.
References GFXVertexList::GetPolys(), i, GFXVertexList::numTris(), radius, and sphere.
|
virtual |
generates procedural planetdata to the actual detaillevel with the "plasma method"
Definition at line 637 of file gfxlib_struct.cpp.
References GFXVertexList::BeginMutate(), GFXVertexList::EndMutate(), GFXVertex::GetPosition(), i, j, GFXVertexList::numVertices, CockpitXML::ROWS, SetVector(), GFXVertex::SetVertex(), sphere, VSRandom::uniformInc(), v, Vector, vert, GFXVertexList::VDAT::vertices, and vsrandom.
|
protected |
Num vertices allocated.
Definition at line 642 of file gfxlib_struct.h.
Referenced by Draw(), GetPolys(), and GFXSphereVertexList().
|
protected |
Definition at line 643 of file gfxlib_struct.h.
Referenced by BeginDrawState(), Draw(), EndDrawState(), GetPolys(), GFXSphereVertexList(), and ProceduralModification().