CrystalSpace

Public API Reference

csPrimitives Class Reference

A primitive mesh generator. More...

#include <cstool/primitives.h>

List of all members.

Static Public Member Functions

static void GenerateBox (const csBox3 &box, csDirtyAccessArray< csVector3 > &mesh_vertices, csDirtyAccessArray< csVector2 > &mesh_texels, csDirtyAccessArray< csVector3 > &mesh_normals, csDirtyAccessArray< csTriangle > &mesh_triangles)
 Generate a box with 24 vertices and 12 triangles so that the normals of every face point outwards (the normals of the vertices belonging to a face will point with the correct normal of the face).
static void GenerateQuad (const csVector3 &v1, const csVector3 &v2, const csVector3 &v3, const csVector3 &v4, csDirtyAccessArray< csVector3 > &mesh_vertices, csDirtyAccessArray< csVector2 > &mesh_texels, csDirtyAccessArray< csVector3 > &mesh_normals, csDirtyAccessArray< csTriangle > &mesh_triangles)
 Generate quad.
static void GenerateSphere (const csEllipsoid &ellips, int num, csDirtyAccessArray< csVector3 > &mesh_vertices, csDirtyAccessArray< csVector2 > &mesh_texels, csDirtyAccessArray< csVector3 > &mesh_normals, csDirtyAccessArray< csTriangle > &mesh_triangles, bool cyl_mapping=false, bool toponly=false, bool reversed=false)
 Generate a sphere with 'num' vertices on the rim.


Detailed Description

A primitive mesh generator.

Definition at line 39 of file primitives.h.


Member Function Documentation

static void csPrimitives::GenerateBox ( const csBox3 box,
csDirtyAccessArray< csVector3 > &  mesh_vertices,
csDirtyAccessArray< csVector2 > &  mesh_texels,
csDirtyAccessArray< csVector3 > &  mesh_normals,
csDirtyAccessArray< csTriangle > &  mesh_triangles 
) [static]

Generate a box with 24 vertices and 12 triangles so that the normals of every face point outwards (the normals of the vertices belonging to a face will point with the correct normal of the face).

static void csPrimitives::GenerateQuad ( const csVector3 v1,
const csVector3 v2,
const csVector3 v3,
const csVector3 v4,
csDirtyAccessArray< csVector3 > &  mesh_vertices,
csDirtyAccessArray< csVector2 > &  mesh_texels,
csDirtyAccessArray< csVector3 > &  mesh_normals,
csDirtyAccessArray< csTriangle > &  mesh_triangles 
) [static]

Generate quad.

static void csPrimitives::GenerateSphere ( const csEllipsoid ellips,
int  num,
csDirtyAccessArray< csVector3 > &  mesh_vertices,
csDirtyAccessArray< csVector2 > &  mesh_texels,
csDirtyAccessArray< csVector3 > &  mesh_normals,
csDirtyAccessArray< csTriangle > &  mesh_triangles,
bool  cyl_mapping = false,
bool  toponly = false,
bool  reversed = false 
) [static]

Generate a sphere with 'num' vertices on the rim.

Parameters:
ellips Properties of the ellipsoid to create.
num Number of vertices in the generated mesh.
mesh_vertices Returns the generated vertices.
mesh_texels Returns the generated texture coordinates.
mesh_normals Returns the generated normals.
mesh_triangles Returns the generated triangles.
cyl_mapping if true then use cylindrical texture mapping.
toponly if true then only generate the top half of the sphere.
reversed if true then generate the sphere so it is visible from the inside.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.4.7