#include <cLwoSurface.h>
Public Types | |
enum | Flags { F_rgb = 0x0001, F_diffuse = 0x0002, F_luminosity = 0x0004, F_specular = 0x0008, F_reflection = 0x0010, F_transparency = 0x0020, F_gloss = 0x0040, F_translucency = 0x0080, F_smooth_angle = 0x0100, F_backface = 0x0200 } |
Public Member Functions | |
CLwoSurface (LwoToEggConverter *converter, const LwoSurface *surface) | |
~CLwoSurface () | |
const string & | get_name () const |
Returns the name of the surface. | |
void | apply_properties (EggPrimitive *egg_prim, vector_PT_EggVertex &egg_vertices, float &smooth_angle) |
Applies the color, texture, etc. | |
bool | check_texture () |
Checks whether the surface demands a texture or not. | |
bool | check_material () |
Checks whether the surface demands a material or not. | |
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). | |
const 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. | |
Public Attributes | |
int | _flags |
RGBColorf | _rgb |
float | _diffuse |
float | _luminosity |
float | _specular |
float | _reflection |
float | _transparency |
float | _gloss |
float | _translucency |
float | _smooth_angle |
bool | _backface |
Colorf | _color |
Colorf | _diffuse_color |
LwoToEggConverter * | _converter |
ConstPointerTo< LwoSurface > | _surface |
bool | _checked_material |
PT_EggMaterial | _egg_material |
bool | _checked_texture |
PT_EggTexture | _egg_texture |
CLwoSurfaceBlock * | _block |
Private Member Functions | |
void | generate_uvs (vector_PT_EggVertex &egg_vertices) |
Computes all the UV's for the polygon's vertices, according to the _projection_mode defined in the block. | |
LPoint2d | map_planar (const LPoint3d &pos, const LPoint3d ¢roid) const |
Computes a UV based on the given point in space, using a planar projection. | |
LPoint2d | map_spherical (const LPoint3d &pos, const LPoint3d ¢roid) const |
Computes a UV based on the given point in space, using a spherical projection. | |
LPoint2d | map_cylindrical (const LPoint3d &pos, const LPoint3d ¢roid) const |
Computes a UV based on the given point in space, using a cylindrical projection. | |
LPoint2d | map_cubic (const LPoint3d &pos, const LPoint3d ¢roid) const |
Computes a UV based on the given point in space, using a cubic projection. | |
Private Attributes | |
LPoint2d(CLwoSurface::* | _map_uvs )(const LPoint3d &pos, const LPoint3d ¢roid) const |
Definition at line 54 of file cLwoSurface.h.
|
Definition at line 71 of file cLwoSurface.h. |
|
Definition at line 46 of file cLwoSurface.cxx. References NULL. |
|
Definition at line 164 of file cLwoSurface.cxx. References _converter, _diffuse_color, _surface, apply_properties(), check_material(), check_texture(), LwoToEggConverter::get_surface(), NULL, and EggPrimitive::set_color(). |
|
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 189 of file cLwoSurface.cxx. References _egg_material, and EggPrimitive::set_material(). Referenced by ~CLwoSurface(). |
|
Checks whether the surface demands a material or not. Returns true if so, false otherwise. Definition at line 328 of file cLwoSurface.cxx. References _color, _egg_material, _flags, _luminosity, Colorf, and F_luminosity. Referenced by ~CLwoSurface(). |
|
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 244 of file cLwoSurface.cxx. Referenced by ~CLwoSurface(). |
|
Computes all the UV's for the polygon's vertices, according to the _projection_mode defined in the block.
Definition at line 393 of file cLwoSurface.cxx. |
|
Returns the name of the surface. Each surface in a given Lightwave file should have a unique name. Definition at line 34 of file cLwoSurface.I. References _block, CLwoSurfaceBlock::_projection_mode, INLINE, LwoSurfaceBlockProjection::M_uv, and NULL. |
|
Returns the name of the set of UV's that are associated with this surface, if has_named_uvs() is true.
Definition at line 73 of file cLwoSurface.I. Referenced by CLwoPolygons::make_faces(). |
|
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 55 of file cLwoSurface.I. References _block. |
|
Computes a UV based on the given point in space, using a cubic projection.
Definition at line 547 of file cLwoSurface.cxx. |
|
Computes a UV based on the given point in space, using a cylindrical projection.
Definition at line 507 of file cLwoSurface.cxx. |
|
Computes a UV based on the given point in space, using a planar projection.
Definition at line 432 of file cLwoSurface.cxx. |
|
Computes a UV based on the given point in space, using a spherical projection.
Definition at line 452 of file cLwoSurface.cxx. |
|
Definition at line 94 of file cLwoSurface.h. |
|
Definition at line 108 of file cLwoSurface.h. Referenced by CLwoSurfaceBlock::CLwoSurfaceBlock(), get_name(), and has_named_uvs(). |
|
Definition at line 102 of file cLwoSurface.h. |
|
Definition at line 105 of file cLwoSurface.h. |
|
Definition at line 96 of file cLwoSurface.h. Referenced by check_material(). |
|
Definition at line 99 of file cLwoSurface.h. Referenced by ~CLwoSurface(). |
|
Definition at line 86 of file cLwoSurface.h. |
|
Definition at line 97 of file cLwoSurface.h. Referenced by ~CLwoSurface(). |
|
Definition at line 103 of file cLwoSurface.h. Referenced by apply_properties(), and check_material(). |
|
Definition at line 106 of file cLwoSurface.h. |
|
Definition at line 84 of file cLwoSurface.h. Referenced by check_material(). |
|
Definition at line 91 of file cLwoSurface.h. |
|
Definition at line 87 of file cLwoSurface.h. Referenced by check_material(). |
|
|
|
Definition at line 89 of file cLwoSurface.h. |
|
Definition at line 85 of file cLwoSurface.h. |
|
Definition at line 93 of file cLwoSurface.h. |
|
Definition at line 88 of file cLwoSurface.h. |
|
Definition at line 100 of file cLwoSurface.h. Referenced by ~CLwoSurface(). |
|
Definition at line 92 of file cLwoSurface.h. |
|
Definition at line 90 of file cLwoSurface.h. |