Panda3D

shaderInput.I

00001 // Filename: shaderInput.I
00002 // Created by: jyelon (01Sep05)
00003 //
00004 ////////////////////////////////////////////////////////////////////
00005 //
00006 // PANDA 3D SOFTWARE
00007 // Copyright (c) Carnegie Mellon University.  All rights reserved.
00008 //
00009 // All use of this software is subject to the terms of the revised BSD
00010 // license.  You should have received a copy of this license along
00011 // with this source code in a file named "LICENSE."
00012 //
00013 ////////////////////////////////////////////////////////////////////
00014 
00015 ////////////////////////////////////////////////////////////////////
00016 //     Function: ShaderInput::Destructor
00017 //       Access: Public
00018 //  Description: 
00019 ////////////////////////////////////////////////////////////////////
00020 INLINE ShaderInput::
00021 ~ShaderInput()
00022 {
00023 }
00024 
00025 ////////////////////////////////////////////////////////////////////
00026 //     Function: ShaderInput::Constructor
00027 //       Access: Published
00028 //  Description: 
00029 ////////////////////////////////////////////////////////////////////
00030 INLINE ShaderInput::
00031 ShaderInput(InternalName *name, int priority) :
00032   _name(name),
00033   _type(M_invalid),
00034   _priority(priority),
00035   _stored_texture(NULL),
00036   _stored_nodepath(NodePath()),
00037   _stored_vector(LVector4f(0,0,0,1))
00038 {
00039 }
00040 
00041 ////////////////////////////////////////////////////////////////////
00042 //     Function: ShaderInput::Constructor
00043 //       Access: Published
00044 //  Description: 
00045 ////////////////////////////////////////////////////////////////////
00046 INLINE ShaderInput::
00047 ShaderInput(InternalName *name, Texture *tex, int priority) :
00048   _name(name),
00049   _type(M_texture),
00050   _priority(priority),
00051   _stored_texture(tex),
00052   _stored_nodepath(NodePath()),
00053   _stored_vector(LVector4f(0,0,0,1))
00054 {
00055 }
00056 
00057 ////////////////////////////////////////////////////////////////////
00058 //     Function: ShaderInput::Constructor
00059 //       Access: Published
00060 //  Description: 
00061 ////////////////////////////////////////////////////////////////////
00062 INLINE ShaderInput::
00063 ShaderInput(InternalName *name, const NodePath &np, int priority) :
00064   _name(name),
00065   _type(M_nodepath),
00066   _priority(priority),
00067   _stored_texture(NULL),
00068   _stored_nodepath(np),
00069   _stored_vector(LVector4f(0,0,0,1))
00070 {
00071 }
00072 
00073 ////////////////////////////////////////////////////////////////////
00074 //     Function: ShaderInput::Constructor
00075 //       Access: Published
00076 //  Description: 
00077 ////////////////////////////////////////////////////////////////////
00078 INLINE ShaderInput::
00079 ShaderInput(InternalName *name, const LVector4f &vec, int priority) :
00080   _name(name),
00081   _type(M_vector),
00082   _priority(priority),
00083   _stored_texture(NULL),
00084   _stored_nodepath(NodePath()),
00085   _stored_vector(vec)
00086 {
00087 }
00088 
00089 ////////////////////////////////////////////////////////////////////
00090 //     Function: ShaderInput::get_name
00091 //       Access: Published
00092 //  Description: 
00093 ////////////////////////////////////////////////////////////////////
00094 INLINE InternalName *ShaderInput::
00095 get_name() const {
00096   return _name;
00097 }
00098 
00099 ////////////////////////////////////////////////////////////////////
00100 //     Function: ShaderInput::get_value_type
00101 //       Access: Published
00102 //  Description: 
00103 ////////////////////////////////////////////////////////////////////
00104 INLINE int ShaderInput::
00105 get_value_type() const {
00106   return _type;
00107 }
00108 
00109 ////////////////////////////////////////////////////////////////////
00110 //     Function: ShaderInput::get_priority
00111 //       Access: Published
00112 //  Description: 
00113 ////////////////////////////////////////////////////////////////////
00114 INLINE int ShaderInput::
00115 get_priority() const {
00116   return _priority;
00117 }
00118 
00119 ////////////////////////////////////////////////////////////////////
00120 //     Function: ShaderInput::get_texture
00121 //       Access: Published
00122 //  Description: 
00123 ////////////////////////////////////////////////////////////////////
00124 INLINE Texture *ShaderInput::
00125 get_texture() const {
00126   return _stored_texture;
00127 }
00128 
00129 ////////////////////////////////////////////////////////////////////
00130 //     Function: ShaderInput::get_nodepath
00131 //       Access: Published
00132 //  Description: 
00133 ////////////////////////////////////////////////////////////////////
00134 INLINE const NodePath &ShaderInput::
00135 get_nodepath() const {
00136   return _stored_nodepath;
00137 }
00138 
00139 ////////////////////////////////////////////////////////////////////
00140 //     Function: ShaderInput::get_vector
00141 //       Access: Published
00142 //  Description: 
00143 ////////////////////////////////////////////////////////////////////
00144 INLINE const LVector4f &ShaderInput::
00145 get_vector() const {
00146   return _stored_vector;
00147 }
00148 
 All Classes Functions Variables Enumerations