My Project: Surface Class Reference

My Project

Public Member Functions | Public Attributes | List of all members
Surface Class Reference

`#include <surface.h>`

## Public Member Functions

| Surface ()
| ~Surface ()
Surface * | Copy ()
void | ClearSurface (int clear_verts=true, int clear_tris=true)
int | AddVertex (float x, float y, float z, float u=0.0, float v=0.0, float w=0.0)
int | AddTriangle (unsigned short, unsigned short, unsigned short)
int | CountVertices ()
int | CountTriangles ()
void | VertexCoords (int vid, float x, float y, float z)
void | VertexNormal (int vid, float nx, float ny, float nz)
void | VertexColor (int vid, float r, float g, float b, float a=1.0)
void | VertexTexCoords (int vid, float u, float v, float w=0.0, int coord_set=0)
float | VertexX (int vid)
float | VertexY (int vid)
float | VertexZ (int vid)
float | VertexRed (int vid)
float | VertexGreen (int vid)
float | VertexBlue (int vid)
float | VertexAlpha (int vid)
float | VertexNX (int vid)
float | VertexNY (int vid)
float | VertexNZ (int vid)
float | VertexU (int vid, int coord_set=0)
float | VertexV (int vid, int coord_set=0)
float | VertexW (int vid, int coord_set=0)
Brush * | GetSurfaceBrush ()
void | PaintSurface (Brush *bru)
void | SurfaceColor (float r, float g, float b, float a)
void | SurfaceColor (float r, float g, float b)
void | SurfaceRed (float r)
void | SurfaceGreen (float g)
void | SurfaceBlue (float b)
void | SurfaceAlpha (float a)
void | UpdateNormals ()
int | TriangleVertex (int tri_no, int corner)
float | TriangleNX (int tri_no)
float | TriangleNY (int tri_no)
float | TriangleNZ (int tri_no)
void | UpdateVBO ()
void | FreeVBO ()
void | RemoveTri (int tri)
void | UpdateTexCoords ()

## Public Attributes

int | no_verts
int | no_tris
vector< float > | vert_coords
vector< float > | vert_norm
vector< float > | vert_tex_coords0
vector< float > | vert_tex_coords1
vector< float > | vert_col
vector< unsigned short > | tris
vector< int > | vert_bone1_no
vector< int > | vert_bone2_no
vector< int > | vert_bone3_no
vector< int > | vert_bone4_no
vector< float > | vert_weight1
vector< float > | vert_weight2
vector< float > | vert_weight3
vector< float > | vert_weight4
Brush * | brush
Shader * | ShaderMat
unsigned int | vbo_id [7]
int | vert_array_size
int | tri_array_size
int | vmin
int | vmax
int | vbo_enabled
int | reset_vbo
int | alpha_enable

## Constructor & Destructor Documentation

## § Surface()

Surface::Surface | ( |  | ) |

## § ~Surface()

Surface::~Surface | ( |  | ) |

## Member Function Documentation

## § AddTriangle()

int Surface::AddTriangle | ( | unsigned short | v0,
|  | unsigned short | v1,
|  | unsigned short | v2
| ) |  |

## § AddVertex()

int Surface::AddVertex | ( | float | x,
|  | float | y,
|  | float | z,
|  | float | u = `0.0`,
|  | float | v = `0.0`,
|  | float | w = `0.0`
| ) |  |

## § ClearSurface()

void Surface::ClearSurface | ( | int | clear_verts = `true`,
|  | int | clear_tris = `true`
| ) |  |

## § Copy()

Surface * Surface::Copy | ( |  | ) |

## § CountTriangles()

int Surface::CountTriangles | ( |  | ) |

## § CountVertices()

int Surface::CountVertices | ( |  | ) |

## § FreeVBO()

void Surface::FreeVBO | ( |  | ) |

## § GetSurfaceBrush()

Brush * Surface::GetSurfaceBrush | ( |  | ) |

## § PaintSurface()

void Surface::PaintSurface | ( | Brush * | bru | ) |

## § RemoveTri()

void Surface::RemoveTri | ( | int | tri | ) |

## § SurfaceAlpha()

void Surface::SurfaceAlpha | ( | float | a | ) |

## § SurfaceBlue()

void Surface::SurfaceBlue | ( | float | b | ) |

## § SurfaceColor() [1/2]

void Surface::SurfaceColor | ( | float | r,
|  | float | g,
|  | float | b,
|  | float | a
| ) |  |

## § SurfaceColor() [2/2]

void Surface::SurfaceColor | ( | float | r,
|  | float | g,
|  | float | b
| ) |  |

## § SurfaceGreen()

void Surface::SurfaceGreen | ( | float | g | ) |

## § SurfaceRed()

void Surface::SurfaceRed | ( | float | r | ) |

## § TriangleNX()

float Surface::TriangleNX | ( | int | tri_no | ) |

## § TriangleNY()

float Surface::TriangleNY | ( | int | tri_no | ) |

## § TriangleNZ()

float Surface::TriangleNZ | ( | int | tri_no | ) |

## § TriangleVertex()

int Surface::TriangleVertex | ( | int | tri_no,
|  | int | corner
| ) |  |

## § UpdateNormals()

void Surface::UpdateNormals | ( |  | ) |

## § UpdateTexCoords()

void Surface::UpdateTexCoords | ( |  | ) |

## § UpdateVBO()

void Surface::UpdateVBO | ( |  | ) |

## § VertexAlpha()

float Surface::VertexAlpha | ( | int | vid | ) |

## § VertexBlue()

float Surface::VertexBlue | ( | int | vid | ) |

## § VertexColor()

void Surface::VertexColor | ( | int | vid,
|  | float | r,
|  | float | g,
|  | float | b,
|  | float | a = `1.0`
| ) |  |

## § VertexCoords()

void Surface::VertexCoords | ( | int | vid,
|  | float | x,
|  | float | y,
|  | float | z
| ) |  |

## § VertexGreen()

float Surface::VertexGreen | ( | int | vid | ) |

## § VertexNormal()

void Surface::VertexNormal | ( | int | vid,
|  | float | nx,
|  | float | ny,
|  | float | nz
| ) |  |

## § VertexNX()

float Surface::VertexNX | ( | int | vid | ) |

## § VertexNY()

float Surface::VertexNY | ( | int | vid | ) |

## § VertexNZ()

float Surface::VertexNZ | ( | int | vid | ) |

## § VertexRed()

float Surface::VertexRed | ( | int | vid | ) |

## § VertexTexCoords()

void Surface::VertexTexCoords | ( | int | vid,
|  | float | u,
|  | float | v,
|  | float | w = `0.0`,
|  | int | coord_set = `0`
| ) |  |

## § VertexU()

float Surface::VertexU | ( | int | vid,
|  | int | coord_set = `0`
| ) |  |

## § VertexV()

float Surface::VertexV | ( | int | vid,
|  | int | coord_set = `0`
| ) |  |

## § VertexW()

float Surface::VertexW | ( | int | vid,
|  | int | coord_set = `0`
| ) |  |

## § VertexX()

float Surface::VertexX | ( | int | vid | ) |

## § VertexY()

float Surface::VertexY | ( | int | vid | ) |

## § VertexZ()

float Surface::VertexZ | ( | int | vid | ) |

## Member Data Documentation

## § alpha_enable

int Surface::alpha_enable

## § brush

Brush* Surface::brush

## § no_tris

int Surface::no_tris

## § no_verts

int Surface::no_verts

## § reset_vbo

int Surface::reset_vbo

## § ShaderMat

Shader* Surface::ShaderMat

## § tri_array_size

int Surface::tri_array_size

## § tris

vector<unsigned short> Surface::tris

## § vbo_enabled

int Surface::vbo_enabled

## § vbo_id

unsigned int Surface::vbo_id[7]

## § vert_array_size

int Surface::vert_array_size

## § vert_bone1_no

vector<int> Surface::vert_bone1_no

## § vert_bone2_no

vector<int> Surface::vert_bone2_no

## § vert_bone3_no

vector<int> Surface::vert_bone3_no

## § vert_bone4_no

vector<int> Surface::vert_bone4_no

## § vert_col

vector<float> Surface::vert_col

## § vert_coords

vector<float> Surface::vert_coords

## § vert_norm

vector<float> Surface::vert_norm

## § vert_tex_coords0

vector<float> Surface::vert_tex_coords0

## § vert_tex_coords1

vector<float> Surface::vert_tex_coords1

## § vert_weight1

vector<float> Surface::vert_weight1

## § vert_weight2

vector<float> Surface::vert_weight2

## § vert_weight3

vector<float> Surface::vert_weight3

## § vert_weight4

vector<float> Surface::vert_weight4

## § vmax

int Surface::vmax

## § vmin

int Surface::vmin

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

- openb3dlib.mod/openb3d/src/surface.h
- openb3dlib.mod/openb3d/src/surface.cpp