Ejemplo n.º 1
0
ssgVtxTableCarlight::ssgVtxTableCarlight(ssgVertexArray *vtx, double s, sgVec3 p)
{
	gltype = GL_TRIANGLE_STRIP;
	type = ssgTypeVtxTable();
	size = s;
	on = 1;
	pos[0] = p[0];
	pos[1] = p[1];
	pos[2] = p[2];
	vertices = (vtx!=NULL) ? vtx : new ssgVertexArray();
	normals = new ssgNormalArray();
	texcoords = new ssgTexCoordArray();
	colours = new ssgColourArray();
	vertices->ref();
	normals->ref();
	texcoords->ref();
	colours->ref();

	recalcBSphere();
}
Ejemplo n.º 2
0
ssgVtxTableSmoke:: ssgVtxTableSmoke (ssgVertexArray	*shd_vtx , float initsize, int typ)
{
    sizex = sizey = sizez = initsize;
	
    gltype = GL_TRIANGLE_STRIP;
    type = ssgTypeVtxTable () ;
    stype = typ;
    vertices  = (shd_vtx!=NULL) ? shd_vtx : new ssgVertexArray   () ;
    normals   =  new ssgNormalArray   () ;
    texcoords =  new ssgTexCoordArray () ;
    colours   =  new ssgColourArray   () ;

    vertices  -> ref () ;
    normals   -> ref () ;
    texcoords -> ref () ;
    colours   -> ref () ;
	cur_col[0] = cur_col[1] = cur_col[2] = 0.8;
	vvx = vvy = vvz = 0.0;
	init_alpha = 0.9;
    recalcBSphere () ;
}