|
|
|
This is a base class for both FltFace and FltMesh, which are two different kinds of geometric primitives that might be encountered in a MultiGen file.
More...
#include "fltGeometry.h"
List of all members.
Public Types |
| enum | BillboardType { BT_none = 0,
BT_fixed = 1,
BT_axial = 2,
BT_point = 4
} |
| enum | DrawType {
DT_solid_cull_backface = 0,
DT_solid_no_cull = 1,
DT_wireframe = 2,
DT_wireframe_close = 3,
DT_wireframe_highlight = 4,
DT_omni_light = 8,
DT_uni_light = 9,
DT_bi_light = 10
} |
| enum | Flags {
F_terrain = 0x80000000,
F_no_color = 0x40000000,
F_no_alt_color = 0x20000000,
F_packed_color = 0x10000000,
F_terrain_footprint = 0x08000000,
F_hidden = 0x04000000
} |
| enum | LightMode { LM_face_no_normal = 0,
LM_vertex_no_normal = 1,
LM_face_with_normal = 2,
LM_vertex_with_normal = 3
} |
Public Member Functions |
|
| FltGeometry (FltHeader *header) |
|
virtual TypeHandle | force_init_type () |
| LColor | get_alt_color () const |
| | If has_alt_color() indicates true, returns the alternate color of the face, as a four-component value (including alpha as the transparency channel).
|
| LRGBColor | get_alt_rgb () const |
| | If has_alt_color() indicates true, returns the alternate color of the face, as a three-component value ignoring transparency.
|
| LColor | get_color () const |
| | Returns the primary color of the face, as a four-component value (including alpha as the transparency channel).
|
| FltMaterial * | get_material () const |
| | Returns the material applied to this face, or NULL if no material was applied.
|
| LRGBColor | get_rgb () const |
| | Returns the primary color of the face, as a three-component value ignoring transparency.
|
| FltTexture * | get_texture () const |
| | Returns the texture applied to this face, or NULL if no texture was applied.
|
|
virtual TypeHandle | get_type () const |
| bool | has_alt_color () const |
| | Returns true if the face has an alternate color indicated, false otherwise.
|
| bool | has_color () const |
| | Returns true if the face has a primary color indicated, false otherwise.
|
| bool | has_material () const |
| | Returns true if the face has a material applied, false otherwise.
|
| bool | has_texture () const |
| | Returns true if the face has a texture applied, false otherwise.
|
| void | set_color (const LColor &color) |
| | Sets the primary color of the face, using the packed color convention.
|
| void | set_material (FltMaterial *material) |
| | Applies the indicated material to this face, or if the material is NULL, clears it.
|
| void | set_rgb (const LRGBColor &rgb) |
| | Sets the primary color of the face, using the packed color convention; does not affect transparency.
|
| void | set_texture (FltTexture *texture) |
| | Applies the indicated texture to this face, or if the texture is NULL, clears it.
|
Static Public Member Functions |
|
static TypeHandle | get_class_type () |
| static void | init_type () |
| | This function is declared non-inline to work around a compiler bug in g++ 2.96.
|
Public Attributes |
|
int | _alt_color_index |
|
int | _alt_color_name_index |
|
FltPackedColor | _alt_packed_color |
|
BillboardType | _billboard_type |
|
int | _color_index |
|
int | _color_name_index |
|
int | _detail_texture_index |
|
int | _dfad_feature_id |
|
int | _dfad_material_code |
|
DrawType | _draw_type |
|
unsigned int | _flags |
|
int | _ir_color |
|
int | _ir_material_code |
|
LightMode | _light_mode |
|
int | _line_style_index |
|
int | _lod_generation_control |
|
int | _material_index |
|
FltPackedColor | _packed_color |
|
int | _relative_priority |
|
int | _texture_index |
|
int | _texture_mapping_index |
|
bool | _texwhite |
|
int | _transparency |
Protected Member Functions |
| virtual bool | build_record (FltRecordWriter &writer) const |
| | Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer.
|
| virtual bool | extract_record (FltRecordReader &reader) |
| | Fills in the information in this bead based on the information given in the indicated datagram, whose opcode has already been read.
|
Detailed Description
This is a base class for both FltFace and FltMesh, which are two different kinds of geometric primitives that might be encountered in a MultiGen file.
They have similar properties.
Definition at line 36 of file fltGeometry.h.
Member Function Documentation
| bool FltGeometry::build_record |
( |
FltRecordWriter & |
writer | ) |
const [protected, virtual] |
Fills up the current record on the FltRecordWriter with data for this record, but does not advance the writer.
Returns true on success, false if there is some error.
Reimplemented from FltBeadID.
Reimplemented in FltFace, and FltMesh.
Definition at line 248 of file fltGeometry.cxx.
References Datagram::add_be_int16(), Datagram::add_be_int32(), Datagram::add_be_uint16(), Datagram::add_be_uint32(), Datagram::add_int8(), Datagram::add_uint8(), FltHeader::get_flt_version(), Datagram::pad_bytes(), and FltRecordWriter::update_datagram().
Referenced by FltMesh::build_record(), and FltFace::build_record().
| bool FltGeometry::extract_record |
( |
FltRecordReader & |
reader | ) |
[protected, virtual] |
Fills in the information in this bead based on the information given in the indicated datagram, whose opcode has already been read.
Returns true on success, false if the datagram is invalid.
Reimplemented from FltBeadID.
Reimplemented in FltFace, and FltMesh.
Definition at line 194 of file fltGeometry.cxx.
References DatagramIterator::get_be_int16(), DatagramIterator::get_be_int32(), DatagramIterator::get_be_uint16(), DatagramIterator::get_be_uint32(), FltHeader::get_flt_version(), DatagramIterator::get_int8(), FltRecordReader::get_iterator(), DatagramIterator::get_uint8(), and DatagramIterator::skip_bytes().
Referenced by FltMesh::extract_record(), and FltFace::extract_record().
| LColor FltGeometry::get_alt_color |
( |
| ) |
const |
| LColor FltGeometry::get_color |
( |
| ) |
const |
| FltMaterial * FltGeometry::get_material |
( |
| ) |
const [inline] |
| FltTexture * FltGeometry::get_texture |
( |
| ) |
const [inline] |
| bool FltGeometry::has_alt_color |
( |
| ) |
const |
| bool FltGeometry::has_color |
( |
| ) |
const [inline] |
| bool FltGeometry::has_material |
( |
| ) |
const [inline] |
| bool FltGeometry::has_texture |
( |
| ) |
const [inline] |
| static void FltGeometry::init_type |
( |
| ) |
[inline, static] |
This function is declared non-inline to work around a compiler bug in g++ 2.96.
Making it inline seems to cause problems in the optimizer.
Reimplemented from FltBeadID.
Reimplemented in FltFace, and FltMesh.
Definition at line 130 of file fltGeometry.h.
| void FltGeometry::set_color |
( |
const LColor & |
color | ) |
|
Sets the primary color of the face, using the packed color convention.
Definition at line 100 of file fltGeometry.cxx.
References set_rgb().
| void FltGeometry::set_material |
( |
FltMaterial * |
material | ) |
[inline] |
| void FltGeometry::set_rgb |
( |
const LRGBColor & |
rgb | ) |
|
| void FltGeometry::set_texture |
( |
FltTexture * |
texture | ) |
[inline] |
The documentation for this class was generated from the following files:
| | |