Panda3D
|
This defines the various attributes that Maya may associate with the "color" channel for a particular shader (as well as on the "transparency" channel). More...
#include "mayaShaderColorDef.h"
Public Member Functions | |
MayaShaderColorDef (MayaShaderColorDef &) | |
LMatrix3d | compute_texture_matrix () const |
Returns a texture matrix corresponding to the texture transforms indicated by the shader. More... | |
string | get_panda_uvset_name () |
Maya's default uvset name is "map1". More... | |
bool | has_projection () const |
Returns true if the shader has a projection in effect. More... | |
LTexCoordd | 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. More... | |
bool | reset_maya_texture (const Filename &texture) |
Changes the texture filename stored in the Maya file for this particular shader. More... | |
string | strip_prefix (string full_name) |
void | write (ostream &out) const |
Public Attributes | |
BlendType | _blend_type |
LColor | _color_gain |
LVector2 | _coverage |
LColord | _flat_color |
bool | _has_alpha_channel |
bool | _has_flat_color |
bool | _has_texture |
bool | _interpolate |
bool | _is_alpha |
bool | _keep_alpha |
bool | _keep_color |
bool | _mirror |
LVector2 | _offset |
MayaShaderColorDef * | _opposite |
LMatrix4d | _projection_matrix |
ProjectionType | _projection_type |
LVector2 | _repeat_uv |
double | _rotate_frame |
double | _rotate_uv |
bool | _stagger |
Filename | _texture_filename |
string | _texture_name |
LVector2 | _translate_frame |
double | _u_angle |
string | _uvset_name |
double | _v_angle |
bool | _wrap_u |
bool | _wrap_v |
Friends | |
class | MayaShader |
This defines the various attributes that Maya may associate with the "color" channel for a particular shader (as well as on the "transparency" channel).
Definition at line 38 of file mayaShaderColorDef.h.
LMatrix3d MayaShaderColorDef::compute_texture_matrix | ( | ) | const |
Returns a texture matrix corresponding to the texture transforms indicated by the shader.
Definition at line 150 of file mayaShaderColorDef.cxx.
References has_projection(), LMatrix3d::rotate_mat(), LMatrix3d::scale_mat(), and LMatrix3d::translate_mat().
Referenced by MayaToEggConverter::clear().
string MayaShaderColorDef::get_panda_uvset_name | ( | ) |
Maya's default uvset name is "map1".
Panda's default uvset name is "default". Otherwise, leaves uvset name untranslated.
Definition at line 253 of file mayaShaderColorDef.cxx.
References Filename::from_os_specific(), LMatrix4d::ident_mat(), Filename::is_directory(), and LVecBase2d::length().
Referenced by MayaToEggConverter::clear(), and reset_maya_texture().
bool MayaShaderColorDef::has_projection | ( | ) | const |
Returns true if the shader has a projection in effect.
Definition at line 170 of file mayaShaderColorDef.cxx.
References project_uv().
Referenced by MayaToEggConverter::clear(), and compute_texture_matrix().
LTexCoordd MayaShaderColorDef::project_uv | ( | const LPoint3d & | pos, |
const LPoint3d & | centroid | ||
) | const |
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 185 of file mayaShaderColorDef.cxx.
References reset_maya_texture(), and LPoint2d::zero().
Referenced by MayaToEggConverter::clear(), and has_projection().
bool MayaShaderColorDef::reset_maya_texture | ( | const Filename & | texture | ) |
Changes the texture filename stored in the Maya file for this particular shader.
Definition at line 225 of file mayaShaderColorDef.cxx.
References get_panda_uvset_name(), and Filename::to_os_generic().
Referenced by project_uv().