Main Page   Class Hierarchy   Alphabetical List   Data Structures   File List   Data Fields   Globals   Related Pages  

brush_c Class Reference

A brush class. More...

#include <brush.h>


Public Methods

void add_plane (const plane_t *p)
 Add a new face.

void set_shader (const shader_t *shader)
 Set shader for new faces.

void set_face_shader (ulong face, const shader_t *shader)
 Set a face's shader.

void draw ()
 Draw this brush.

brushface_cget_brush_face (ulong i)
 Get brush face.


Protected Methods

void find_edges ()
 find all edges


Protected Attributes

array_c< brushface_c > * faces
 the sides of this brush

edge_tedges
 all edges of all faces

ulong edgecount
 total edge count

const shader_tshader
 shader for new faces


Detailed Description

This is a brush. A brush is a convex region of 3 dimensional space defined by a set of planes.

Definition at line 200 of file brush.h.


Member Function Documentation

void add_plane const plane_t   p
 

Adds a new face to the brush using plane p. All existing faces cut the new face in shape and are cut by it.

Parameters:
p  plane to add

Definition at line 291 of file x_brush.cpp.

References brushface_c::create_from_plane(), brushface_c::cut(), brushface_c::get_plane(), SafeDelete, and brushface_c::set_shader().

void draw  
 

Draws this brush and all it's faces.

Definition at line 381 of file x_brush.cpp.

References brushface_c::draw().

brushface_c* get_brush_face ulong    i [inline]
 

Returns a pointer to brush face i. If i is larger than the face count NULL is returned.

Parameters:
i  Index of the face to get

Definition at line 273 of file brush.h.

References array_c::get().

void set_face_shader ulong    face,
const shader_t   shader
 

Sets the shader of a face face to shader.

Parameters:
face  face index
shader  shader to use

Definition at line 355 of file x_brush.cpp.

References brushface_c::set_shader().

void set_shader const shader_t   shader
 

Sets the shader of this brush. All new faces will get this shader.

Parameters:
_shader  shader to use

Definition at line 336 of file x_brush.cpp.

References brushface_c::set_shader().


The documentation for this class was generated from the following files:
Generated on Wed Dec 18 15:48:49 2002 for omicron engine by doxygen1.2.18