#include <mayaShaderColorDef.h>
Public Types | |
enum | ProjectionType { PT_off, PT_planar, PT_spherical, PT_cylindrical, PT_ball, PT_cubic, PT_triplanar, PT_concentric, PT_perspective } |
Public Member Functions | |
MayaShaderColorDef () | |
~MayaShaderColorDef () | |
LMatrix3d | compute_texture_matrix () const |
Returns a texture matrix corresponding to the texture transforms indicated by the shader. | |
bool | has_projection () const |
Returns true if the shader has a projection in effect. | |
TexCoordd | project_uv (const LPoint3d &pos, const LPoint3d &ref_point) const |
If the shader has a projection (has_projection() returns true), this computes the appropriate UV corresponding to the indicated 3-d point. | |
bool | reset_maya_texture (const Filename &texture) |
Changes the texture filename stored in the Maya file for this particular shader. | |
void | write (ostream &out) const |
Public Attributes | |
bool | _has_texture |
Filename | _texture |
RGBColorf | _color_gain |
bool | _has_flat_color |
Colord | _flat_color |
ProjectionType | _projection_type |
LMatrix4d | _projection_matrix |
double | _u_angle |
double | _v_angle |
LVector2f | _coverage |
LVector2f | _translate_frame |
double | _rotate_frame |
bool | _mirror |
bool | _stagger |
bool | _wrap_u |
bool | _wrap_v |
LVector2f | _repeat_uv |
LVector2f | _offset |
double | _rotate_uv |
Private Member Functions | |
void | read_surface_color (MObject color) |
Determines the surface color specified by the shader. | |
void | set_projection_type (const string &type) |
Sets up the shader to apply UV's according to the indicated projection type. | |
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. | |
Private Attributes | |
LPoint2d(MayaShaderColorDef::* | _map_uvs )(const LPoint3d &pos, const LPoint3d ¢roid) const |
MObject * | _color_object |
Friends | |
class | MayaShader |
Definition at line 43 of file mayaShaderColorDef.h.
|
Definition at line 55 of file mayaShaderColorDef.h. |
|
Definition at line 45 of file mayaShaderColorDef.cxx. References NULL. |
|
Definition at line 80 of file mayaShaderColorDef.cxx. References _coverage, _offset, _repeat_uv, _rotate_frame, and _translate_frame. |
|
Returns a texture matrix corresponding to the texture transforms indicated by the shader.
Definition at line 97 of file mayaShaderColorDef.cxx. References _projection_type, and PT_off. Referenced by MayaToEggConverter::set_shader_attributes(). |
|
Returns true if the shader has a projection in effect.
Definition at line 120 of file mayaShaderColorDef.cxx. References _map_uvs, and _projection_matrix. |
|
Computes a UV based on the given point in space, using a cylindrical projection.
Definition at line 430 of file mayaShaderColorDef.cxx. |
|
Computes a UV based on the given point in space, using a planar projection.
Definition at line 360 of file mayaShaderColorDef.cxx. References _v_angle. |
|
Computes a UV based on the given point in space, using a spherical projection.
Definition at line 377 of file mayaShaderColorDef.cxx. References _u_angle, nassertr, and rad_2_deg(). |
|
If the shader has a projection (has_projection() returns true), this computes the appropriate UV corresponding to the indicated 3-d point. Seams that might be introduced on polygons that cross quadrants are closed up by ensuring the point is in the same quadrant as the indicated reference point. Definition at line 143 of file mayaShaderColorDef.cxx. References _color_gain. |
|
Determines the surface color specified by the shader. This includes texturing and other advanced shader properties. Definition at line 220 of file mayaShaderColorDef.cxx. References size_t. Referenced by MayaShader::get_rgba(). |
|
Changes the texture filename stored in the Maya file for this particular shader.
Definition at line 188 of file mayaShaderColorDef.cxx. References _color_gain. |
|
Sets up the shader to apply UV's according to the indicated projection type.
Definition at line 312 of file mayaShaderColorDef.cxx. |
|
Definition at line 157 of file mayaShaderColorDef.cxx. References _color_object, _has_texture, _texture, NULL, and set_string_attribute(). |
|
Definition at line 105 of file mayaShaderColorDef.h. |
|
Definition at line 69 of file mayaShaderColorDef.h. Referenced by project_uv(), and reset_maya_texture(). |
|
Definition at line 103 of file mayaShaderColorDef.h. Referenced by write(). |
|
Definition at line 79 of file mayaShaderColorDef.h. Referenced by ~MayaShaderColorDef(). |
|
Definition at line 72 of file mayaShaderColorDef.h. Referenced by MayaShader::write(). |
|
Definition at line 71 of file mayaShaderColorDef.h. Referenced by MayaShader::write(). |
|
Definition at line 67 of file mayaShaderColorDef.h. Referenced by write(). |
|
Referenced by has_projection(). |
|
Definition at line 83 of file mayaShaderColorDef.h. |
|
Definition at line 89 of file mayaShaderColorDef.h. Referenced by ~MayaShaderColorDef(). |
|
Definition at line 75 of file mayaShaderColorDef.h. Referenced by has_projection(). |
|
Definition at line 74 of file mayaShaderColorDef.h. Referenced by compute_texture_matrix(). |
|
Definition at line 88 of file mayaShaderColorDef.h. Referenced by ~MayaShaderColorDef(). |
|
Definition at line 81 of file mayaShaderColorDef.h. Referenced by ~MayaShaderColorDef(). |
|
Definition at line 90 of file mayaShaderColorDef.h. |
|
Definition at line 84 of file mayaShaderColorDef.h. |
|
Definition at line 68 of file mayaShaderColorDef.h. Referenced by write(). |
|
Definition at line 80 of file mayaShaderColorDef.h. Referenced by ~MayaShaderColorDef(). |
|
Definition at line 76 of file mayaShaderColorDef.h. Referenced by map_spherical(). |
|
Definition at line 77 of file mayaShaderColorDef.h. Referenced by map_planar(). |
|
Definition at line 85 of file mayaShaderColorDef.h. Referenced by MayaToEggConverter::set_shader_attributes(). |
|
Definition at line 86 of file mayaShaderColorDef.h. Referenced by MayaToEggConverter::set_shader_attributes(). |