#include <brush.h>
Public Methods | |
| void | create_from_plane (const plane_t *p) |
| Create a face from plane. | |
| bool | cut (const plane_t *p) |
| Cut this face in half. | |
| ulong | get_vertex_count () |
| Get number of vertices. | |
| const vertex_t * | get_vertices () |
| Get vertices of this face. | |
| vec3_c | get_normal () |
| Get this face's plane normal. | |
| const plane_t * | get_plane () |
| Get this face's plane. | |
| void | get_vertex (ulong num, vertex_t *out) |
| Get a single vertex. | |
| void | get_edge (ulong num, edge_t out) |
| Get a single edge. | |
| void | set_shader (const struct shader_s *_shader) |
| Set face's shader. | |
| const struct shader_s * | get_shader () |
| Get face's shader. | |
| void | set_tex_params (const vec2_t scale, const vec2_t offset, float rot) |
| Set texture parameters. | |
| void | draw () |
| Draw this face. | |
Protected Methods | |
| void | createvertices () |
| called to create a big quad | |
Protected Attributes | |
| ulong | vertexcount |
| number of vertices | |
| vertex_t * | vertices |
| the vertices themselves | |
| plane_t | plane |
| the plane | |
| const struct shader_s * | shader |
| shader for this face | |
| vec2_c | offset |
| texture modifiers | |
Definition at line 62 of file brush.h.
|
|
Initializes this face using a plane_t.
Definition at line 68 of file x_brush.cpp. References SafeArrayDelete. Referenced by brush_c::add_plane(). |
|
|
Cuts this face in two pieces using p as the dividing plane. Returns true if degenerated so you know that you can be removed
Definition at line 146 of file x_brush.cpp. References _sgn(), vec2_c::copy(), vec3_c::copy(), vertex_s::diffuse, vec2_c::linear(), vertex_s::normal, plane_line_intersect(), plane_pointdist(), SafeArrayDelete, vertex_s::uv, vec3_t, vertex_copy(), and vertex_s::xyz. Referenced by brush_c::add_plane(). |
|
||||||||||||
|
Gets edge num and stores it in out. An edge is the connection of two vertices on this face. There are as many edges as vertices. If num is larger than the vertex count it wraps around.
Definition at line 224 of file x_brush.cpp. References edge_t. Referenced by brush_c::find_edges(). |
|
|
Returns the normal vector of the plane this face lies in. Definition at line 168 of file brush.h. References plane_s::n, and plane. |
|
|
Returns a pointer to the plane of the face. Definition at line 175 of file brush.h. References plane. Referenced by brush_c::add_plane(). |
|
|
Returns the shader that is used to draw the face |
|
||||||||||||
|
Gets vertex num and stores it in out. If num is larger than the vertex count it wraps around.
Definition at line 210 of file x_brush.cpp. References vertex_copy(). |
|
|
Returns the number of vertices in this face Definition at line 156 of file brush.h. References vertexcount. Referenced by brush_c::find_edges(). |
|
|
Returns a pointer to the vertices of this face. Definition at line 162 of file brush.h. References vertices. |
|
|
Sets the shader to draw this face with.
Definition at line 181 of file brush.h. References shader. Referenced by brush_c::add_plane(), brush_c::set_face_shader(), and brush_c::set_shader(). |
|
||||||||||||||||
|
Sets the texture parameters scale, offset and rotation.
Definition at line 238 of file x_brush.cpp. References vec2_t. |
1.2.18