Panda3D
|
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. | |
bool | check_material () |
Checks whether the surface demands a material or not. | |
bool | check_texture () |
Checks whether the surface demands a texture or not. | |
CPT (LwoSurface) _surface | |
const std::string & | get_name () const |
Returns the name of the surface. | |
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. | |
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). | |
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.
enum CLwoSurface::Flags |
Definition at line 56 of file cLwoSurface.h.
CLwoSurface::CLwoSurface | ( | LwoToEggConverter * | converter, |
const LwoSurface * | surface ) |
Definition at line 33 of file cLwoSurface.cxx.
CLwoSurface::~CLwoSurface | ( | ) |
Definition at line 147 of file cLwoSurface.cxx.
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 161 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 281 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 204 of file cLwoSurface.cxx.
References SomethingToEggConverter::convert_model_path(), LwoToEggConverter::get_clip(), and CLwoClip::is_still_image().
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 18 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 39 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 29 of file cLwoSurface.I.
bool CLwoSurface::_backface |
Definition at line 79 of file cLwoSurface.h.
CLwoSurfaceBlock* CLwoSurface::_block |
Definition at line 93 of file cLwoSurface.h.
bool CLwoSurface::_checked_material |
Definition at line 87 of file cLwoSurface.h.
bool CLwoSurface::_checked_texture |
Definition at line 90 of file cLwoSurface.h.
LColor CLwoSurface::_color |
Definition at line 81 of file cLwoSurface.h.
LwoToEggConverter* CLwoSurface::_converter |
Definition at line 84 of file cLwoSurface.h.
PN_stdfloat CLwoSurface::_diffuse |
Definition at line 71 of file cLwoSurface.h.
LColor CLwoSurface::_diffuse_color |
Definition at line 82 of file cLwoSurface.h.
PT_EggMaterial CLwoSurface::_egg_material |
Definition at line 88 of file cLwoSurface.h.
PT_EggTexture CLwoSurface::_egg_texture |
Definition at line 91 of file cLwoSurface.h.
int CLwoSurface::_flags |
Definition at line 69 of file cLwoSurface.h.
PN_stdfloat CLwoSurface::_gloss |
Definition at line 76 of file cLwoSurface.h.
PN_stdfloat CLwoSurface::_luminosity |
Definition at line 72 of file cLwoSurface.h.
PN_stdfloat CLwoSurface::_reflection |
Definition at line 74 of file cLwoSurface.h.
LRGBColor CLwoSurface::_rgb |
Definition at line 70 of file cLwoSurface.h.
PN_stdfloat CLwoSurface::_smooth_angle |
Definition at line 78 of file cLwoSurface.h.
PN_stdfloat CLwoSurface::_specular |
Definition at line 73 of file cLwoSurface.h.
PN_stdfloat CLwoSurface::_translucency |
Definition at line 77 of file cLwoSurface.h.
PN_stdfloat CLwoSurface::_transparency |
Definition at line 75 of file cLwoSurface.h.