This class is a wrapper around LwoSurface and stores additional information useful during the conversion-to-egg process. More...
#include "cLwoSurface.h"
Public Member Functions | |
CLwoSurface (LwoToEggConverter *converter, const LwoSurface *surface) | |
void | apply_properties (EggPrimitive *egg_prim, vector_PT_EggVertex &egg_vertices, PN_stdfloat &smooth_angle) |
Applies the color, texture, etc. More... | |
bool | check_material () |
Checks whether the surface demands a material or not. More... | |
bool | check_texture () |
Checks whether the surface demands a texture or not. More... | |
CPT (LwoSurface) _surface | |
const std::string & | get_name () const |
Returns the name of the surface. More... | |
const std::string & | get_uv_name () const |
Returns the name of the set of UV's that are associated with this surface, if has_named_uvs() is true. More... | |
bool | has_named_uvs () const |
Returns true if the surface is set up to reference UV's stored on the vertices, by name (as opposed to generated UV's, which is the more common Lightwave case). More... | |
Public Attributes | |
bool | _backface |
CLwoSurfaceBlock * | _block |
bool | _checked_material |
bool | _checked_texture |
LColor | _color |
LwoToEggConverter * | _converter |
PN_stdfloat | _diffuse |
LColor | _diffuse_color |
PT_EggMaterial | _egg_material |
PT_EggTexture | _egg_texture |
int | _flags |
PN_stdfloat | _gloss |
PN_stdfloat | _luminosity |
PN_stdfloat | _reflection |
LRGBColor | _rgb |
PN_stdfloat | _smooth_angle |
PN_stdfloat | _specular |
PN_stdfloat | _translucency |
PN_stdfloat | _transparency |
This class is a wrapper around LwoSurface and stores additional information useful during the conversion-to-egg process.
Definition at line 39 of file cLwoSurface.h.
void CLwoSurface::apply_properties | ( | EggPrimitive * | egg_prim, |
vector_PT_EggVertex & | egg_vertices, | ||
PN_stdfloat & | smooth_angle | ||
) |
Applies the color, texture, etc.
described by the surface to the indicated egg primitive.
If the surface defines a smoothing angle, smooth_angle may be updated to reflect it if the angle is greater than that specified.
Definition at line 162 of file cLwoSurface.cxx.
References apply_properties(), check_material(), check_texture(), LwoToEggConverter::get_surface(), EggPrimitive::set_bface_flag, EggPrimitive::set_material, and EggPrimitive::set_texture().
Referenced by apply_properties().
bool CLwoSurface::check_material | ( | ) |
Checks whether the surface demands a material or not.
Returns true if so, false otherwise.
Definition at line 282 of file cLwoSurface.cxx.
References get_name().
Referenced by apply_properties().
bool CLwoSurface::check_texture | ( | ) |
Checks whether the surface demands a texture or not.
Returns true if so, false otherwise.
If the surface demands a texture, this also sets up _egg_texture and _compute_uvs as appropriate for the texture.
Definition at line 205 of file cLwoSurface.cxx.
References LwoToEggConverter::get_clip().
Referenced by apply_properties().
|
inline |
Returns the name of the surface.
Each surface in a given Lightwave file should have a unique name.
Definition at line 19 of file cLwoSurface.I.
Referenced by check_material().
|
inline |
Returns the name of the set of UV's that are associated with this surface, if has_named_uvs() is true.
Definition at line 40 of file cLwoSurface.I.
|
inline |
Returns true if the surface is set up to reference UV's stored on the vertices, by name (as opposed to generated UV's, which is the more common Lightwave case).
In this case, get_uv_name() can be called to return the name of the UV's.
Definition at line 30 of file cLwoSurface.I.