Panda3D
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Friends | List of all members
MayaShaderColorDef Class Reference

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 Types

enum  BlendType {
  BT_unspecified , BT_modulate , BT_decal , BT_blend ,
  BT_replace , BT_add , BT_blend_color_scale , BT_modulate_glow ,
  BT_modulate_gloss , BT_normal , BT_normal_height , BT_gloss ,
  BT_glow , BT_height , BT_selector
}
 
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.
 
std::string get_panda_uvset_name ()
 Maya's default uvset name is "map1".
 
bool has_projection () const
 Returns true if the shader has a projection in effect.
 
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.
 
bool reset_maya_texture (const Filename &texture)
 Changes the texture filename stored in the Maya file for this particular shader.
 
std::string strip_prefix (std::string full_name)
 
void write (std::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
 
std::string _texture_name
 
LVector2 _translate_frame
 
double _u_angle
 
std::string _uvset_name
 
double _v_angle
 
bool _wrap_u
 
bool _wrap_v
 

Friends

class MayaShader
 

Detailed Description

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 34 of file mayaShaderColorDef.h.

Member Enumeration Documentation

◆ BlendType

enum MayaShaderColorDef::BlendType

Definition at line 49 of file mayaShaderColorDef.h.

◆ ProjectionType

enum MayaShaderColorDef::ProjectionType

Definition at line 67 of file mayaShaderColorDef.h.

Constructor & Destructor Documentation

◆ MayaShaderColorDef() [1/2]

MayaShaderColorDef::MayaShaderColorDef ( )

Definition at line 38 of file mayaShaderColorDef.cxx.

◆ MayaShaderColorDef() [2/2]

MayaShaderColorDef::MayaShaderColorDef ( MayaShaderColorDef & copy)

Definition at line 86 of file mayaShaderColorDef.cxx.

◆ ~MayaShaderColorDef()

MayaShaderColorDef::~MayaShaderColorDef ( )

Definition at line 132 of file mayaShaderColorDef.cxx.

Member Function Documentation

◆ compute_texture_matrix()

LMatrix3d MayaShaderColorDef::compute_texture_matrix ( ) const

Returns a texture matrix corresponding to the texture transforms indicated by the shader.

Definition at line 143 of file mayaShaderColorDef.cxx.

◆ get_panda_uvset_name()

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 234 of file mayaShaderColorDef.cxx.

◆ has_projection()

bool MayaShaderColorDef::has_projection ( ) const

Returns true if the shader has a projection in effect.

Definition at line 161 of file mayaShaderColorDef.cxx.

◆ project_uv()

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 173 of file mayaShaderColorDef.cxx.

◆ reset_maya_texture()

bool MayaShaderColorDef::reset_maya_texture ( const Filename & texture)

Changes the texture filename stored in the Maya file for this particular shader.

Definition at line 209 of file mayaShaderColorDef.cxx.

References set_string_attribute(), and Filename::to_os_generic().

◆ write()

void MayaShaderColorDef::write ( std::ostream & out) const

Definition at line 182 of file mayaShaderColorDef.cxx.

Friends And Related Symbol Documentation

◆ MayaShader

friend class MayaShader
friend

Definition at line 125 of file mayaShaderColorDef.h.

Member Data Documentation

◆ _blend_type

BlendType MayaShaderColorDef::_blend_type

Definition at line 79 of file mayaShaderColorDef.h.

◆ _color_gain

LColor MayaShaderColorDef::_color_gain

Definition at line 87 of file mayaShaderColorDef.h.

◆ _coverage

LVector2 MayaShaderColorDef::_coverage

Definition at line 89 of file mayaShaderColorDef.h.

◆ _flat_color

LColord MayaShaderColorDef::_flat_color

Definition at line 142 of file mayaShaderColorDef.h.

◆ _has_alpha_channel

bool MayaShaderColorDef::_has_alpha_channel

Definition at line 143 of file mayaShaderColorDef.h.

◆ _has_flat_color

bool MayaShaderColorDef::_has_flat_color

Definition at line 141 of file mayaShaderColorDef.h.

◆ _has_texture

bool MayaShaderColorDef::_has_texture

Definition at line 140 of file mayaShaderColorDef.h.

◆ _interpolate

bool MayaShaderColorDef::_interpolate

Definition at line 146 of file mayaShaderColorDef.h.

◆ _is_alpha

bool MayaShaderColorDef::_is_alpha

Definition at line 102 of file mayaShaderColorDef.h.

◆ _keep_alpha

bool MayaShaderColorDef::_keep_alpha

Definition at line 145 of file mayaShaderColorDef.h.

◆ _keep_color

bool MayaShaderColorDef::_keep_color

Definition at line 144 of file mayaShaderColorDef.h.

◆ _mirror

bool MayaShaderColorDef::_mirror

Definition at line 93 of file mayaShaderColorDef.h.

◆ _offset

LVector2 MayaShaderColorDef::_offset

Definition at line 99 of file mayaShaderColorDef.h.

◆ _opposite

MayaShaderColorDef* MayaShaderColorDef::_opposite

Definition at line 105 of file mayaShaderColorDef.h.

◆ _projection_matrix

LMatrix4d MayaShaderColorDef::_projection_matrix

Definition at line 81 of file mayaShaderColorDef.h.

◆ _projection_type

ProjectionType MayaShaderColorDef::_projection_type

Definition at line 80 of file mayaShaderColorDef.h.

◆ _repeat_uv

LVector2 MayaShaderColorDef::_repeat_uv

Definition at line 98 of file mayaShaderColorDef.h.

◆ _rotate_frame

double MayaShaderColorDef::_rotate_frame

Definition at line 91 of file mayaShaderColorDef.h.

◆ _rotate_uv

double MayaShaderColorDef::_rotate_uv

Definition at line 100 of file mayaShaderColorDef.h.

◆ _stagger

bool MayaShaderColorDef::_stagger

Definition at line 94 of file mayaShaderColorDef.h.

◆ _texture_filename

Filename MayaShaderColorDef::_texture_filename

Definition at line 85 of file mayaShaderColorDef.h.

◆ _texture_name

std::string MayaShaderColorDef::_texture_name

Definition at line 86 of file mayaShaderColorDef.h.

◆ _translate_frame

LVector2 MayaShaderColorDef::_translate_frame

Definition at line 90 of file mayaShaderColorDef.h.

◆ _u_angle

double MayaShaderColorDef::_u_angle

Definition at line 82 of file mayaShaderColorDef.h.

◆ _uvset_name

std::string MayaShaderColorDef::_uvset_name

Definition at line 104 of file mayaShaderColorDef.h.

◆ _v_angle

double MayaShaderColorDef::_v_angle

Definition at line 83 of file mayaShaderColorDef.h.

◆ _wrap_u

bool MayaShaderColorDef::_wrap_u

Definition at line 95 of file mayaShaderColorDef.h.

◆ _wrap_v

bool MayaShaderColorDef::_wrap_v

Definition at line 96 of file mayaShaderColorDef.h.


The documentation for this class was generated from the following files: