Panda3D
|
Defines a texture map that may be applied to geometry. More...
Public Types | |
enum | AlphaMode { AMUnspecified = 0, AMOff = 1, AMOn = 2, AMBlend = 3, AMBlendNoOcclude = 4, AMMs = 5, AMMsMask = 6, AMBinary = 7, AMDual = 8 } |
enum | CombineChannel { CCRgb = 0, CCAlpha = 1, CCNumChannels = 2 } |
enum | CombineIndex { CINumIndices = 3 } |
enum | CombineMode { CMUnspecified = 0, CMReplace = 1, CMModulate = 2, CMAdd = 3, CMAddSigned = 4, CMInterpolate = 5, CMSubtract = 6, CMDot3Rgb = 7, CMDot3Rgba = 8 } |
enum | CombineOperand { COUnspecified = 0, COSrcColor = 1, COOneMinusSrcColor = 2, COSrcAlpha = 3, COOneMinusSrcAlpha = 4 } |
enum | CombineSource { CSUnspecified = 0, CSTexture = 1, CSConstant = 2, CSPrimaryColor = 3, CSPrevious = 4, CSConstantColorScale = 5, CSLastSavedResult = 6 } |
enum | ComponentType { CTInvalid = 0, CTTranslate2d = 1, CTTranslate3d = 2, CTRotate2d = 3, CTRotx = 4, CTRoty = 5, CTRotz = 6, CTRotate3d = 7, CTScale2d = 8, CTScale3d = 9, CTUniformScale = 10, CTMatrix3 = 11, CTMatrix4 = 12 } |
enum | CompressionMode { CMDefault = 0, CMOff = 1, CMOn = 2, CMFxt1 = 3, CMDxt1 = 4, CMDxt2 = 5, CMDxt3 = 6, CMDxt4 = 7, CMDxt5 = 8 } |
enum | DepthTestMode { DTMUnspecified = 0, DTMOff = 1, DTMOn = 2 } |
enum | DepthWriteMode { DWMUnspecified = 0, DWMOff = 1, DWMOn = 2 } |
enum | EnvType { ETUnspecified = 0, ETModulate = 1, ETDecal = 2, ETBlend = 3, ETReplace = 4, ETAdd = 5, ETBlendColorScale = 6, ETModulateGlow = 7, ETModulateGloss = 8, ETNormal = 9, ETNormalHeight = 10, ETGlow = 11, ETGloss = 12, ETHeight = 13, ETSelector = 14 } |
enum | Equivalence { EBasename = 1, EExtension = 2, EDirname = 4, ECompleteFilename = 7, ETransform = 8, EAttributes = 16, ETrefName = 32 } |
enum | FilterType { FTUnspecified = 0, FTNearest = 1, FTLinear = 2, FTNearestMipmapNearest = 3, FTLinearMipmapNearest = 4, FTNearestMipmapLinear = 5, FTLinearMipmapLinear = 6 } |
enum | Format { FUnspecified = 0, FRgba = 1, FRgbm = 2, FRgba12 = 3, FRgba8 = 4, FRgba4 = 5, FRgba5 = 6, FRgb = 7, FRgb12 = 8, FRgb8 = 9, FRgb5 = 10, FRgb332 = 11, FRed = 12, FGreen = 13, FBlue = 14, FAlpha = 15, FLuminance = 16, FLuminanceAlpha = 17, FLuminanceAlphamask = 18 } |
enum | QualityLevel { QLUnspecified = 0, QLDefault = 1, QLFastest = 2, QLNormal = 3, QLBest = 4 } |
enum | TexGen { TGUnspecified = 0, TGEyeSphereMap = 1, TGWorldCubeMap = 2, TGEyeCubeMap = 3, TGWorldNormal = 4, TGEyeNormal = 5, TGWorldPosition = 6, TGEyePosition = 7, TGPointSprite = 8 } |
enum | TextureType { TTUnspecified = 0, TT1dTexture = 1, TT2dTexture = 2, TT3dTexture = 3, TTCubeMap = 4 } |
enum | VisibilityMode { VMUnspecified = 0, VMHidden = 1, VMNormal = 2 } |
enum | WrapMode { WMUnspecified = 0, WMClamp = 1, WMRepeat = 2, WMMirror = 3, WMMirrorOnce = 4, WMBorderColor = 5 } |
Public Member Functions | |
EggTexture (EggTexture const copy) | |
EggTexture (string tref_name, Filename const filename) | |
addMatrix3 (Mat3D const mat) | |
Appends an arbitrary 3x3 matrix to the current transform. | |
addMatrix4 (Mat4D const mat) | |
Appends an arbitrary 4x4 matrix to the current transform. | |
addRotate2d (double angle) | |
Appends a 2-d rotation to the current transform. | |
addRotate3d (QuatD const quat) | |
Appends an arbitrary 3-d rotation to the current transform, expressed as a quaternion. | |
addRotate3d (double angle, Vec3D const axis) | |
Appends a 3-d rotation about an arbitrary axis to the current transform. | |
addRotx (double angle) | |
Appends a rotation about the X axis to the current transform. | |
addRoty (double angle) | |
Appends a rotation about the Y axis to the current transform. | |
addRotz (double angle) | |
Appends a rotation about the Z axis to the current transform. | |
addScale2d (VBase2D const scale) | |
Appends a possibly non-uniform scale to the current transform. | |
addScale3d (VBase3D const scale) | |
Appends a possibly non-uniform scale to the current transform. | |
addTranslate2d (Vec2D const translate) | |
Appends a 2-d translation operation to the current transform. | |
addTranslate3d (Vec3D const translate) | |
Appends a 3-d translation operation to the current transform. | |
addUniformScale (double scale) | |
Appends a uniform scale to the current transform. | |
bool | affectsPolygonAlpha () |
Returns true if this texture's environment type or combine mode allows the texture to have an affect on the polygon's alpha values, false otherwise. | |
applyTexmats () | |
Applies the texture matrices to the UV's of the vertices that reference them, and then removes the texture matrices from the textures themselves. | |
clearAlphaFileChannel () | |
Removes the specification of a particular channel to use from the alpha-file image. | |
clearAlphaFilename () | |
clearAlphaScale () | |
Removes the alpha_scale from the texture and restores it to the default value of 1. | |
clearAnisotropicDegree () | |
Removes the specification of anisotropic filtering from the texture. | |
clearBin () | |
Removes the bin name that was set for this particular object. | |
clearBorderColor () | |
clearColor () | |
clearDepthOffset () | |
Removes the depth-offset flag from this particular object. | |
clearDrawOrder () | |
Removes the draw-order flag from this particular object. | |
clearMultitexture () | |
Resets the multitexture flags set by multitexture_over(). | |
clearPriority () | |
Removes the specification of multitexture priority from the texture. | |
clearRgbScale () | |
Removes the rgb_scale from the texture and restores it to the default value of 1. | |
clearStageName () | |
Removes the named TextureStage specification. | |
clearTransform () | |
Resets the transform to empty, identity. | |
clearUserData () | |
Removes *all* user data pointers from the node. | |
clearUserData (TypeHandle type) | |
Removes the user data pointer of the indicated type. | |
clearUvName () | |
Removes the restriction to a particular named set of texture coordinates and restores the texture to using the default texture coordinates. | |
EggRenderMode | determineAlphaMode () |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has an alpha_mode other than AM_unspecified. | |
EggRenderMode | determineBin () |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a bin specified. | |
bool | determineDecal () |
Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "decal" flag set. | |
EggRenderMode | determineDepthOffset () |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_offset specified. | |
EggRenderMode | determineDepthTestMode () |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_test_mode other than DTM_unspecified. | |
EggRenderMode | determineDepthWriteMode () |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_write_mode other than DWM_unspecified. | |
EggRenderMode | determineDrawOrder () |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a draw_order specified. | |
bool | determineIndexed () |
Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "indexed" scalar set. | |
EggRenderMode | determineVisibilityMode () |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a visibility_mode other than VM_unspecified. | |
WrapMode | determineWrapU () |
Determines the appropriate wrap in the U direction. | |
WrapMode | determineWrapV () |
Determines the appropriate wrap in the V direction. | |
WrapMode | determineWrapW () |
Determines the appropriate wrap in the W direction. | |
flattenTransforms () | |
Removes any transform and instance records from this node in the scene graph and below. | |
int | getAlphaFileChannel () |
Returns the particular channel that has been specified for the alpha-file image, or 0 if no channel has been specified. | |
Filename const | getAlphaFilename () |
Returns the separate file assigned for the alpha channel. | |
Filename const | getAlphaFullpath () |
Returns the full pathname to the alpha file, if it is known; otherwise, returns the same thing as get_alpha_filename(). | |
AlphaMode | getAlphaMode () |
Returns the alpha mode that was set, or AM_unspecified if nothing was set. | |
int | getAlphaScale () |
Returns the alpha_scale value that has been specified for the texture, or 1 if no alpha_scale value has been specified. | |
int | getAnisotropicDegree () |
Returns the anisotropic filtering degree that has been specified for this texture, or 0 if nothing has been specified. | |
string | getBin () |
Returns the bin name that has been set for this particular object, if any. | |
VBase4 const | getBorderColor () |
Returns the border color if one has been specified, or (0, 0, 0, 1) otherwise. | |
VBase4 const | getColor () |
Returns the blend color if one has been specified, or (0, 0, 0, 1) otherwise. | |
CombineMode | getCombineMode (CombineChannel channel) |
CombineOperand | getCombineOperand (CombineChannel channel, int n) |
CombineSource | getCombineSource (CombineChannel channel, int n) |
Mat3D const | getComponentMat3 (int n) |
Returns the 3x3 matrix associated with the nth component. | |
Mat4D const | getComponentMat4 (int n) |
Returns the 4x4 matrix associated with the nth component. | |
double | getComponentNumber (int n) |
Returns the solitary number associated with the nth component. | |
ComponentType | getComponentType (int n) |
Returns the type of the nth component. | |
VBase2D const | getComponentVec2 (int n) |
Returns the 2-component vector associated with the nth component. | |
VBase3D const | getComponentVec3 (int n) |
Returns the 3-component vector associated with the nth component. | |
CompressionMode | getCompressionMode () |
string | getDefaultExtension () |
Returns the default extension for this filename type. | |
int | getDepth () |
Returns the number of nodes above this node in the egg hierarchy. | |
int | getDepthOffset () |
Returns the "depth-offset" flag as set for this particular object. | |
DepthTestMode | getDepthTestMode () |
Returns the depth_test mode that was set, or DTM_unspecified if nothing was set. | |
DepthWriteMode | getDepthWriteMode () |
Returns the depth_write mode that was set, or DWM_unspecified if nothing was set. | |
int | getDrawOrder () |
Returns the "draw-order" flag as set for this particular object. | |
EnvType | getEnvType () |
Filename const | getFilename () |
Returns a nonmodifiable reference to the filename. | |
Format | getFormat () |
Filename const | getFullpath () |
Returns the full pathname to the file, if it is known; otherwise, returns the same thing as get_filename(). | |
FilterType | getMagfilter () |
FilterType | getMinfilter () |
int | getMultitextureSort () |
Returns an integer that represents the depth to which this texture is layered on all other textures in the egg file. | |
Mat4D const | getNodeFrame () |
Returns the coordinate frame of the node itself. | |
Mat4D const | getNodeFrameInv () |
Returns the inverse of the matrix returned by get_node_frame(). | |
Mat4D const | getNodeFrameInvPtr () |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame_inv() matrix. | |
Mat4D const | getNodeFramePtr () |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame() matrix. | |
Mat4D const | getNodeToVertex () |
Returns the transformation matrix suitable for converting vertices in the coordinate space of the node to the appropriate coordinate space for storing in the egg file. | |
Mat4D const | getNodeToVertexPtr () |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_to_vertex() matrix. | |
int | getNumComponents () |
Returns the number of components that make up the transform. | |
EggGroupNode | getParent () |
int | getPriority () |
Returns the multitexture importance value that has been specified for the texture, or 0 if no priority value has been specified. | |
QualityLevel | getQualityLevel () |
bool | getReadMipmaps () |
Returns the current setting of the read_mipmaps flag. | |
int | getRgbScale () |
Returns the rgb_scale value that has been specified for the texture, or 1 if no rgb_scale value has been specified. | |
bool | getSavedResult () |
Returns the current setting of the saved_result flag. | |
string | getStageName () |
Returns the stage name that has been specified for this texture, or the tref name if no texture stage has explicitly been specified. | |
TexGen | getTexGen () |
TextureType | getTextureType () |
Mat3D | getTransform2d () |
Returns the overall transform as a 3x3 matrix. | |
Mat4D const | getTransform3d () |
Returns the overall transform as a 4x4 matrix. | |
EggUserData | getUserData () |
Returns the user data pointer most recently stored on this object, or NULL if nothing was previously stored. | |
EggUserData | getUserData (TypeHandle type) |
Returns the user data pointer of the indicated type, if it exists, or NULL if it does not. | |
string | getUvName () |
Returns the texcoord name that has been specified for this texture, or the empty string if no texcoord name has explicitly been specified. | |
Mat4D const | getVertexFrame () |
Returns the coordinate frame of the vertices referenced by primitives at or under this node. | |
Mat4D const | getVertexFrameInv () |
Returns the inverse of the matrix returned by get_vertex_frame(). | |
Mat4D const | getVertexFrameInvPtr () |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame_inv() matrix. | |
Mat4D const | getVertexFramePtr () |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame() matrix. | |
Mat4D const | getVertexToNode () |
Returns the transformation matrix suitable for converting the vertices as read from the egg file into the coordinate space of the node. | |
Mat4D const | getVertexToNodePtr () |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_to_node() matrix. | |
VisibilityMode | getVisibilityMode () |
Returns the visibility mode that was set, or VM_unspecified if nothing was set. | |
WrapMode | getWrapMode () |
WrapMode | getWrapU () |
Returns the amount specified for U wrap. | |
WrapMode | getWrapV () |
Returns the amount specified for V wrap. | |
WrapMode | getWrapW () |
Returns the amount specified for W wrap. | |
bool | hasAlphaChannel (int num_components) |
Given the number of color components (channels) in the image file as actually read from the disk, return true if this texture seems to have an alpha channel or not. | |
bool | hasAlphaFileChannel () |
Returns true if a particular channel has been specified for the alpha-file image, false otherwise. | |
bool | hasAlphaFilename () |
Returns true if a separate file for the alpha component has been applied, false otherwise. | |
bool | hasAlphaScale () |
Returns true if an alpha_scale has been specified for the texture, false otherwise. | |
bool | hasAnisotropicDegree () |
Returns true if a value for the anisotropic filtering degree has been specified for this texture, false otherwise. | |
bool | hasBin () |
Returns true if a bin name has been set for this particular object. | |
bool | hasBorderColor () |
Returns true if a border color has been specified for the texture. | |
bool | hasColor () |
Returns true if a blend color has been specified for the texture. | |
bool | hasDepthOffset () |
Returns true if the depth-offset flag has been set for this particular object. | |
bool | hasDrawOrder () |
Returns true if the draw-order flag has been set for this particular object. | |
bool | hasPriority () |
Returns true if a priority value for multitexture importance has been specified for the texture, false otherwise. | |
bool | hasRgbScale () |
Returns true if an rgb_scale has been specified for the texture, false otherwise. | |
bool | hasStageName () |
Returns true if a stage name has been explicitly specified for this texture, false otherwise. | |
bool | hasTransform () |
Returns true if the transform is nonempty, false if it is empty (no transform components have been added). | |
bool | hasTransform2d () |
Returns true if the transform is specified as a 2-d transform, e.g. | |
bool | hasTransform3d () |
Returns true if the transform is specified as a 3-d transform, e.g. | |
bool | hasUserData () |
Returns true if a generic user data pointer has recently been set and not yet cleared, false otherwise. | |
bool | hasUserData (TypeHandle type) |
Returns true if the user data pointer of the indicated type has been set, false otherwise. | |
bool | hasUvName () |
Returns true if a texcoord name has been explicitly specified for this texture, false otherwise. | |
bool | isAnimMatrix () |
Returns true if this node represents a table of animation transformation data, false otherwise. | |
bool | isEquivalentTo (EggTexture const other, int eq) |
Returns true if the two textures are equivalent in all relevant properties (according to eq), false otherwise. | |
bool | isJoint () |
Returns true if this particular node represents a <Joint> entry or not. | |
bool | isLocalCoord () |
Returns true if this node's vertices are not in the global coordinate space. | |
bool | isUnderInstance () |
Returns true if there is an <Instance> node somewhere in the egg tree at or above this node, false otherwise. | |
bool | isUnderTransform () |
Returns true if there is a <Transform> entry somewhere in the egg tree at or above this node, false otherwise. | |
bool | multitextureOver (EggTexture other) |
Indicates that this texture should be layered on top of the other texture. | |
bool | operator!= (EggRenderMode const other) |
bool | operator< (EggRenderMode const other) |
EggTexture | operator= (EggTexture const copy) |
bool | operator== (EggRenderMode const other) |
output (ostream out) | |
bool | parseEgg (string egg_syntax) |
Parses the egg syntax given in the indicate string as if it had been read from the egg file within this object's definition. | |
int | renameNode (vectorbasic_stringchar strip_prefix) |
Rename by stripping out the prefix. | |
setAlphaFileChannel (int alpha_file_channel) | |
If a separate alpha-file is specified, this indicates which channel number should be extracted from this file to derive the alpha channel for the final image. | |
setAlphaFilename (Filename const filename) | |
Specifies a separate file that will be loaded in with the 1- or 3-component texture and applied as the alpha channel. | |
setAlphaFullpath (Filename const fullpath) | |
Records the full pathname to the file, for the benefit of get_alpha_fullpath(). | |
setAlphaMode (AlphaMode mode) | |
Specifies precisely how the transparency for this geometry should be achieved, or if it should be used. | |
setAlphaScale (int alpha_scale) | |
Sets an additional factor that will scale the alpha component after the texture has been applied. | |
setAnisotropicDegree (int anisotropic_degree) | |
Sets the degree of anisotropic filtering for this texture. | |
setBin (string bin) | |
Sets the "bin" string for this particular object. | |
setBorderColor (VBase4 const border_color) | |
setColor (VBase4 const color) | |
setCombineMode (CombineChannel channel, CombineMode cm) | |
setCombineOperand (CombineChannel channel, int n, CombineOperand co) | |
setCombineSource (CombineChannel channel, int n, CombineSource cs) | |
setCompressionMode (CompressionMode mode) | |
setDepthOffset (int bias) | |
Sets the "depth-offset" flag associated with this object. | |
setDepthTestMode (DepthTestMode mode) | |
Specifies whether this geometry should be tested against the depth buffer when it is drawn (assuming the rendering backend provides a depth buffer). | |
setDepthWriteMode (DepthWriteMode mode) | |
Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides a depth buffer) when rendering this geometry. | |
setDrawOrder (int order) | |
Sets the "draw-order" flag associated with this object. | |
setEnvType (EnvType type) | |
setFilename (Filename const filename) | |
setFormat (Format format) | |
setFullpath (Filename const fullpath) | |
Records the full pathname to the file, for the benefit of get_fullpath(). | |
setMagfilter (FilterType type) | |
setMinfilter (FilterType type) | |
setPriority (int priority) | |
Sets the importance of this texture with respect to other textures also applied on the same geometry. | |
setQualityLevel (QualityLevel quality_level) | |
setReadMipmaps (bool read_mipmaps) | |
Sets the read_mipmaps flag. | |
setRgbScale (int rgb_scale) | |
Sets an additional factor that will scale all three r, g, b components after the texture has been applied. | |
setSavedResult (bool saved_result) | |
Sets the saved_result flag. | |
setStageName (string stage_name) | |
Specifies the particular TextureStage this texture will be rendered on by name. | |
setTexGen (TexGen tex_gen) | |
setTextureType (TextureType texture_type) | |
setTransform2d (Mat3D const mat) | |
Sets the overall transform as a 3x3 matrix. | |
setTransform3d (Mat4D const mat) | |
Sets the overall transform as a 4x4 matrix. | |
setUserData (EggUserData user_data) | |
Sets the user data associated with this object. | |
setUvName (string uv_name) | |
Specifies the named set of texture coordinates that this texture will use when it is applied to geometry. | |
setVisibilityMode (VisibilityMode mode) | |
Specifies whether this geometry is to be considered normally visible, or hidden. | |
setWrapMode (WrapMode mode) | |
setWrapU (WrapMode mode) | |
setWrapV (WrapMode mode) | |
setWrapW (WrapMode mode) | |
bool | sortsLessThan (EggTexture const other, int eq) |
An ordering operator to compare two textures for sorting order. | |
testUnderIntegrity () | |
Recursively checks the integrity of the _under_flags, _parent, and _depth members of this node and all of its ancestors. | |
transform (Mat4D const mat) | |
Applies the indicated transformation to the node and all of its descendants. | |
bool | transformIsIdentity () |
Returns true if the described transform is identity, false otherwise. | |
transformVerticesOnly (Mat4D const mat) | |
Applies the indicated transformation only to vertices that appear in global space within vertex pools at this node and below. | |
write (ostream out, int indent_level) | |
Writes the texture definition to the indicated output stream in Egg format. | |
write (ostream out, int indent_level, string label) | |
Writes the transform to the indicated stream in Egg format. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
static AlphaMode | stringAlphaMode (string string) |
Returns the AlphaMode value associated with the given string representation, or AM_unspecified if the string does not match any known AlphaMode value. | |
static CombineMode | stringCombineMode (string string) |
Returns the CombineMode value associated with the given string representation, or CM_unspecified if the string does not match any known CombineMode value. | |
static CombineOperand | stringCombineOperand (string string) |
Returns the CombineOperand value associated with the given string representation, or CO_unspecified if the string does not match any known CombineOperand value. | |
static CombineSource | stringCombineSource (string string) |
Returns the CombineSource value associated with the given string representation, or CS_unspecified if the string does not match any known CombineSource value. | |
static CompressionMode | stringCompressionMode (string string) |
Returns the CompressionMode value associated with the given string representation, or CM_default if the string does not match any known CompressionMode value. | |
static DepthTestMode | stringDepthTestMode (string string) |
Returns the DepthTestMode value associated with the given string representation, or DTM_unspecified if the string does not match any known DepthTestMode value. | |
static DepthWriteMode | stringDepthWriteMode (string string) |
Returns the DepthWriteMode value associated with the given string representation, or DWM_unspecified if the string does not match any known DepthWriteMode value. | |
static EnvType | stringEnvType (string string) |
Returns the EnvType value associated with the given string representation, or ET_unspecified if the string does not match any known EnvType value. | |
static FilterType | stringFilterType (string string) |
Returns the FilterType value associated with the given string representation, or FT_unspecified if the string does not match any known FilterType value. | |
static Format | stringFormat (string string) |
Returns the Format value associated with the given string representation, or F_unspecified if the string does not match any known Format value. | |
static QualityLevel | stringQualityLevel (string string) |
Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value. | |
static TexGen | stringTexGen (string string) |
Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value. | |
static TextureType | stringTextureType (string string) |
Returns the Texture_ype value associated with the given string representation, or TT_unspecified if the string does not match any known TextureType value. | |
static VisibilityMode | stringVisibilityMode (string string) |
Returns the HiddenMode value associated with the given string representation, or VM_unspecified if the string does not match any known HiddenMode value. | |
static WrapMode | stringWrapMode (string string) |
Returns the WrapMode value associated with the given string representation, or WM_unspecified if the string does not match any known WrapMode value. |
Defines a texture map that may be applied to geometry.
enum AlphaMode [inherited] |
enum CombineChannel |
enum CombineIndex |
enum CombineMode |
enum CombineOperand |
enum CombineSource |
enum ComponentType [inherited] |
enum CompressionMode |
enum DepthTestMode [inherited] |
enum DepthWriteMode [inherited] |
enum EnvType |
enum Equivalence |
enum FilterType |
enum Format |
enum QualityLevel |
enum TexGen |
enum TextureType |
enum VisibilityMode [inherited] |
enum WrapMode |
EggTexture | ( | EggTexture const | copy | ) |
EggTexture | ( | string | tref_name, |
Filename const | filename | ||
) |
addMatrix3 | ( | Mat3D const | mat | ) | [inherited] |
Appends an arbitrary 3x3 matrix to the current transform.
addMatrix4 | ( | Mat4D const | mat | ) | [inherited] |
Appends an arbitrary 4x4 matrix to the current transform.
addRotate2d | ( | double | angle | ) | [inherited] |
Appends a 2-d rotation to the current transform.
The rotation angle is specified in degrees counterclockwise about the origin.
addRotate3d | ( | QuatD const | quat | ) | [inherited] |
Appends an arbitrary 3-d rotation to the current transform, expressed as a quaternion.
This is converted to axis-angle notation for the egg file.
addRotate3d | ( | double | angle, |
Vec3D const | axis | ||
) | [inherited] |
Appends a 3-d rotation about an arbitrary axis to the current transform.
The rotation angle is specified in degrees counterclockwise about the axis.
addRotx | ( | double | angle | ) | [inherited] |
Appends a rotation about the X axis to the current transform.
The rotation angle is specified in degrees counterclockwise about the axis.
addRoty | ( | double | angle | ) | [inherited] |
Appends a rotation about the Y axis to the current transform.
The rotation angle is specified in degrees counterclockwise about the axis.
addRotz | ( | double | angle | ) | [inherited] |
Appends a rotation about the Z axis to the current transform.
The rotation angle is specified in degrees counterclockwise about the axis.
addScale2d | ( | VBase2D const | scale | ) | [inherited] |
Appends a possibly non-uniform scale to the current transform.
addScale3d | ( | VBase3D const | scale | ) | [inherited] |
Appends a possibly non-uniform scale to the current transform.
addTranslate2d | ( | Vec2D const | translate | ) | [inherited] |
Appends a 2-d translation operation to the current transform.
addTranslate3d | ( | Vec3D const | translate | ) | [inherited] |
Appends a 3-d translation operation to the current transform.
addUniformScale | ( | double | scale | ) | [inherited] |
Appends a uniform scale to the current transform.
bool affectsPolygonAlpha | ( | ) |
Returns true if this texture's environment type or combine mode allows the texture to have an affect on the polygon's alpha values, false otherwise.
applyTexmats | ( | ) | [inherited] |
Applies the texture matrices to the UV's of the vertices that reference them, and then removes the texture matrices from the textures themselves.
clearAlphaFileChannel | ( | ) |
Removes the specification of a particular channel to use from the alpha-file image.
clearAlphaFilename | ( | ) |
clearAlphaScale | ( | ) |
Removes the alpha_scale from the texture and restores it to the default value of 1.
clearAnisotropicDegree | ( | ) |
Removes the specification of anisotropic filtering from the texture.
clearBin | ( | ) | [inherited] |
Removes the bin name that was set for this particular object.
See set_bin().
clearBorderColor | ( | ) |
clearColor | ( | ) |
clearDepthOffset | ( | ) | [inherited] |
Removes the depth-offset flag from this particular object.
See set_depth_offset().
clearDrawOrder | ( | ) | [inherited] |
Removes the draw-order flag from this particular object.
See set_draw_order().
clearMultitexture | ( | ) |
Resets the multitexture flags set by multitexture_over().
After this call, get_multitexture() will return false, and get_multitexture_sort() will return 0.
clearPriority | ( | ) |
Removes the specification of multitexture priority from the texture.
The default priority value is 0.
clearRgbScale | ( | ) |
Removes the rgb_scale from the texture and restores it to the default value of 1.
clearStageName | ( | ) |
Removes the named TextureStage specification.
clearTransform | ( | ) | [inherited] |
Resets the transform to empty, identity.
clearUserData | ( | ) | [inherited] |
Removes *all* user data pointers from the node.
clearUserData | ( | TypeHandle | type | ) | [inherited] |
Removes the user data pointer of the indicated type.
clearUvName | ( | ) |
Removes the restriction to a particular named set of texture coordinates and restores the texture to using the default texture coordinates.
EggRenderMode determineAlphaMode | ( | ) | [inherited] |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has an alpha_mode other than AM_unspecified.
Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.
Reimplemented in EggGroup, and EggPrimitive.
EggRenderMode determineBin | ( | ) | [inherited] |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a bin specified.
Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.
Reimplemented in EggGroup, and EggPrimitive.
bool determineDecal | ( | ) | [inherited] |
Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "decal" flag set.
Returns the value of the decal flag if it is found, or false if it is not.
In other words, returns true if the "decal" flag is in effect for the indicated node, false otherwise.
Reimplemented in EggGroup.
EggRenderMode determineDepthOffset | ( | ) | [inherited] |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_offset specified.
Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.
Reimplemented in EggGroup, and EggPrimitive.
EggRenderMode determineDepthTestMode | ( | ) | [inherited] |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_test_mode other than DTM_unspecified.
Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.
Reimplemented in EggGroup, and EggPrimitive.
EggRenderMode determineDepthWriteMode | ( | ) | [inherited] |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a depth_write_mode other than DWM_unspecified.
Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.
Reimplemented in EggGroup, and EggPrimitive.
EggRenderMode determineDrawOrder | ( | ) | [inherited] |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a draw_order specified.
Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.
Reimplemented in EggGroup, and EggPrimitive.
bool determineIndexed | ( | ) | [inherited] |
Walks back up the hierarchy, looking for an EggGroup at this level or above that has the "indexed" scalar set.
Returns the value of the indexed scalar if it is found, or false if it is not.
In other words, returns true if the "indexed" flag is in effect for the indicated node, false otherwise.
Reimplemented in EggGroup.
EggRenderMode determineVisibilityMode | ( | ) | [inherited] |
Walks back up the hierarchy, looking for an EggGroup or EggPrimitive or some such object at this level or above this node that has a visibility_mode other than VM_unspecified.
Returns a valid EggRenderMode pointer if one is found, or NULL otherwise.
Reimplemented in EggGroup, and EggPrimitive.
WrapMode determineWrapU | ( | ) |
Determines the appropriate wrap in the U direction.
This is different from get_wrap_u() in that if the U wrap is unspecified, it returns the overall wrap value.
WrapMode determineWrapV | ( | ) |
Determines the appropriate wrap in the V direction.
This is different from get_wrap_v() in that if the V wrap is unspecified, it returns the overall wrap value.
WrapMode determineWrapW | ( | ) |
Determines the appropriate wrap in the W direction.
This is different from get_wrap_w() in that if the W wrap is unspecified, it returns the overall wrap value.
flattenTransforms | ( | ) | [inherited] |
Removes any transform and instance records from this node in the scene graph and below.
If an instance node is encountered, removes the instance and applies the transform to its vertices, duplicating vertices if necessary.
Since this function may result in duplicated vertices, it may be a good idea to call remove_unused_vertices() after calling this.
int getAlphaFileChannel | ( | ) |
Returns the particular channel that has been specified for the alpha-file image, or 0 if no channel has been specified.
See set_alpha_file_channel().
Filename const getAlphaFilename | ( | ) |
Returns the separate file assigned for the alpha channel.
It is an error to call this unless has_alpha_filename() returns true. See set_alpha_filename().
Filename const getAlphaFullpath | ( | ) |
Returns the full pathname to the alpha file, if it is known; otherwise, returns the same thing as get_alpha_filename().
This function simply returns whatever was set by the last call to set_alpha_fullpath(). This string is not written to the egg file; its main purpose is to record the full path to the alpha filename if it is known, for egg structures that are generated in-memory and then immediately converted to a scene graph.
AlphaMode getAlphaMode | ( | ) | [inherited] |
Returns the alpha mode that was set, or AM_unspecified if nothing was set.
See set_alpha_mode().
int getAlphaScale | ( | ) |
Returns the alpha_scale value that has been specified for the texture, or 1 if no alpha_scale value has been specified.
int getAnisotropicDegree | ( | ) |
Returns the anisotropic filtering degree that has been specified for this texture, or 0 if nothing has been specified.
string getBin | ( | ) | [inherited] |
Returns the bin name that has been set for this particular object, if any.
See set_bin().
VBase4 const getBorderColor | ( | ) |
Returns the border color if one has been specified, or (0, 0, 0, 1) otherwise.
static TypeHandle getClassType | ( | ) | [static] |
Reimplemented from EggRenderMode.
VBase4 const getColor | ( | ) |
Returns the blend color if one has been specified, or (0, 0, 0, 1) otherwise.
CombineMode getCombineMode | ( | CombineChannel | channel | ) |
CombineOperand getCombineOperand | ( | CombineChannel | channel, |
int | n | ||
) |
CombineSource getCombineSource | ( | CombineChannel | channel, |
int | n | ||
) |
Mat3D const getComponentMat3 | ( | int | n | ) | [inherited] |
Returns the 3x3 matrix associated with the nth component.
It is an error to call this if the component type is not CT_matrix3.
Mat4D const getComponentMat4 | ( | int | n | ) | [inherited] |
Returns the 4x4 matrix associated with the nth component.
It is an error to call this if the component type is not CT_matrix4.
double getComponentNumber | ( | int | n | ) | [inherited] |
Returns the solitary number associated with the nth component.
In the case of a rotation, this is the angle in degrees to rotate; in the case of uniform scale, this is the amount of the scale. Other types do not use this property.
ComponentType getComponentType | ( | int | n | ) | [inherited] |
Returns the type of the nth component.
VBase2D const getComponentVec2 | ( | int | n | ) | [inherited] |
Returns the 2-component vector associated with the nth component.
This may be the translate vector, rotate axis, or non-uniform scale. It is an error to call this if the component type does not use a 2-d vector property.
VBase3D const getComponentVec3 | ( | int | n | ) | [inherited] |
Returns the 3-component vector associated with the nth component.
This may be the translate vector, rotate axis, or non-uniform scale. It is an error to call this if the component type does not use a 3-d vector property.
CompressionMode getCompressionMode | ( | ) |
string getDefaultExtension | ( | ) | [inherited] |
Returns the default extension for this filename type.
int getDepth | ( | ) | [inherited] |
Returns the number of nodes above this node in the egg hierarchy.
int getDepthOffset | ( | ) | [inherited] |
Returns the "depth-offset" flag as set for this particular object.
See set_depth_offset().
DepthTestMode getDepthTestMode | ( | ) | [inherited] |
Returns the depth_test mode that was set, or DTM_unspecified if nothing was set.
See set_depth_test_mode().
DepthWriteMode getDepthWriteMode | ( | ) | [inherited] |
Returns the depth_write mode that was set, or DWM_unspecified if nothing was set.
See set_depth_write_mode().
int getDrawOrder | ( | ) | [inherited] |
Returns the "draw-order" flag as set for this particular object.
See set_draw_order().
EnvType getEnvType | ( | ) |
Filename const getFilename | ( | ) | [inherited] |
Returns a nonmodifiable reference to the filename.
Format getFormat | ( | ) |
Filename const getFullpath | ( | ) | [inherited] |
Returns the full pathname to the file, if it is known; otherwise, returns the same thing as get_filename().
This function simply returns whatever was set by the last call to set_fullpath(). This string is not written to the egg file; its main purpose is to record the full path to a filename (for instance, a texture filename) if it is known, for egg structures that are generated in-memory and then immediately converted to a scene graph.
FilterType getMagfilter | ( | ) |
FilterType getMinfilter | ( | ) |
int getMultitextureSort | ( | ) |
Returns an integer that represents the depth to which this texture is layered on all other textures in the egg file.
In general, if texture A is layered over texture B, then sort(A) > sort(B). If texture A is never layered over any other texture, then sort(A) == 0. More than that is difficult to guarantee.
Mat4D const getNodeFrame | ( | ) | [inherited] |
Returns the coordinate frame of the node itself.
This is simply the net product of all transformations up to the root.
Mat4D const getNodeFrameInv | ( | ) | [inherited] |
Returns the inverse of the matrix returned by get_node_frame().
See get_node_frame().
Mat4D const getNodeFrameInvPtr | ( | ) | [inherited] |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame_inv() matrix.
Mat4D const getNodeFramePtr | ( | ) | [inherited] |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame() matrix.
Mat4D const getNodeToVertex | ( | ) | [inherited] |
Returns the transformation matrix suitable for converting vertices in the coordinate space of the node to the appropriate coordinate space for storing in the egg file.
This is the same thing as:
get_node_frame() * get_vertex_frame_inv()
Mat4D const getNodeToVertexPtr | ( | ) | [inherited] |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_to_vertex() matrix.
int getNumComponents | ( | ) | [inherited] |
Returns the number of components that make up the transform.
EggGroupNode getParent | ( | ) | [inherited] |
int getPriority | ( | ) |
Returns the multitexture importance value that has been specified for the texture, or 0 if no priority value has been specified.
QualityLevel getQualityLevel | ( | ) |
bool getReadMipmaps | ( | ) |
Returns the current setting of the read_mipmaps flag.
See set_read_mipmaps().
int getRgbScale | ( | ) |
Returns the rgb_scale value that has been specified for the texture, or 1 if no rgb_scale value has been specified.
bool getSavedResult | ( | ) |
Returns the current setting of the saved_result flag.
See set_saved_result().
string getStageName | ( | ) |
Returns the stage name that has been specified for this texture, or the tref name if no texture stage has explicitly been specified.
TexGen getTexGen | ( | ) |
TextureType getTextureType | ( | ) |
Mat3D getTransform2d | ( | ) | [inherited] |
Returns the overall transform as a 3x3 matrix.
It is an error to call this if has_transform3d() is true.
Mat4D const getTransform3d | ( | ) | [inherited] |
Returns the overall transform as a 4x4 matrix.
It is valid to call this even if has_transform2d() is true; in this case, the 3x3 transform will be expanded to a 4x4 matrix.
EggUserData getUserData | ( | ) | [inherited] |
Returns the user data pointer most recently stored on this object, or NULL if nothing was previously stored.
EggUserData getUserData | ( | TypeHandle | type | ) | [inherited] |
Returns the user data pointer of the indicated type, if it exists, or NULL if it does not.
string getUvName | ( | ) |
Returns the texcoord name that has been specified for this texture, or the empty string if no texcoord name has explicitly been specified.
Mat4D const getVertexFrame | ( | ) | [inherited] |
Returns the coordinate frame of the vertices referenced by primitives at or under this node.
This is not the same as get_node_frame().
Generally, vertices in an egg file are stored in the global coordinate space, regardless of the transforms defined at each node. Thus, get_vertex_frame() will usually return the identity transform (global coordinate space). However, primitives under an <Instance> entry reference their vertices in the coordinate system under effect at the time of the <Instance>. Thus, nodes under an <Instance> entry may return this non-identity matrix.
Specifically, this may return a non-identity matrix only if is_local_coord() is true.
Mat4D const getVertexFrameInv | ( | ) | [inherited] |
Returns the inverse of the matrix returned by get_vertex_frame().
See get_vertex_frame().
Mat4D const getVertexFrameInvPtr | ( | ) | [inherited] |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame_inv() matrix.
Mat4D const getVertexFramePtr | ( | ) | [inherited] |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame() matrix.
Mat4D const getVertexToNode | ( | ) | [inherited] |
Returns the transformation matrix suitable for converting the vertices as read from the egg file into the coordinate space of the node.
This is the same thing as:
get_vertex_frame() * get_node_frame_inv()
Mat4D const getVertexToNodePtr | ( | ) | [inherited] |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_to_node() matrix.
VisibilityMode getVisibilityMode | ( | ) | [inherited] |
Returns the visibility mode that was set, or VM_unspecified if nothing was set.
See set_visibility_mode().
WrapMode getWrapMode | ( | ) |
WrapMode getWrapU | ( | ) |
Returns the amount specified for U wrap.
This may be unspecified, even if there is an overall wrap value.
WrapMode getWrapV | ( | ) |
Returns the amount specified for V wrap.
This may be unspecified, even if there is an overall wrap value.
WrapMode getWrapW | ( | ) |
Returns the amount specified for W wrap.
This may be unspecified, even if there is an overall wrap value.
bool hasAlphaChannel | ( | int | num_components | ) |
Given the number of color components (channels) in the image file as actually read from the disk, return true if this texture seems to have an alpha channel or not.
This depends on the EggTexture's format as well as the number of channels.
bool hasAlphaFileChannel | ( | ) |
Returns true if a particular channel has been specified for the alpha-file image, false otherwise.
bool hasAlphaFilename | ( | ) |
Returns true if a separate file for the alpha component has been applied, false otherwise.
See set_alpha_filename().
bool hasAlphaScale | ( | ) |
Returns true if an alpha_scale has been specified for the texture, false otherwise.
bool hasAnisotropicDegree | ( | ) |
Returns true if a value for the anisotropic filtering degree has been specified for this texture, false otherwise.
bool hasBin | ( | ) | [inherited] |
Returns true if a bin name has been set for this particular object.
See set_bin().
bool hasBorderColor | ( | ) |
Returns true if a border color has been specified for the texture.
bool hasColor | ( | ) |
Returns true if a blend color has been specified for the texture.
bool hasDepthOffset | ( | ) | [inherited] |
Returns true if the depth-offset flag has been set for this particular object.
See set_depth_offset().
bool hasDrawOrder | ( | ) | [inherited] |
Returns true if the draw-order flag has been set for this particular object.
See set_draw_order().
bool hasPriority | ( | ) |
Returns true if a priority value for multitexture importance has been specified for the texture, false otherwise.
bool hasRgbScale | ( | ) |
Returns true if an rgb_scale has been specified for the texture, false otherwise.
bool hasStageName | ( | ) |
Returns true if a stage name has been explicitly specified for this texture, false otherwise.
bool hasTransform | ( | ) | [inherited] |
Returns true if the transform is nonempty, false if it is empty (no transform components have been added).
This is true for either a 2-d or a 3-d transform.
bool hasTransform2d | ( | ) | [inherited] |
Returns true if the transform is specified as a 2-d transform, e.g.
with a 3x3 matrix, or false if it is specified as a 3-d transform (with a 4x4 matrix), or not specified at all.
Normally, EggTextures have a 2-d matrix (but occasionally they use a 3-d matrix), and EggGroups always have a 3-d matrix.
bool hasTransform3d | ( | ) | [inherited] |
Returns true if the transform is specified as a 3-d transform, e.g.
with a 4x4 matrix, or false if it is specified as a 2-d transform (with a 2x2 matrix), or not specified at all.
Normally, EggTextures have a 3-d matrix (but occasionally they use a 3-d matrix), and EggGroups always have a 3-d matrix.
bool hasUserData | ( | ) | [inherited] |
Returns true if a generic user data pointer has recently been set and not yet cleared, false otherwise.
bool hasUserData | ( | TypeHandle | type | ) | [inherited] |
Returns true if the user data pointer of the indicated type has been set, false otherwise.
bool hasUvName | ( | ) |
Returns true if a texcoord name has been explicitly specified for this texture, false otherwise.
bool isAnimMatrix | ( | ) | [inherited] |
Returns true if this node represents a table of animation transformation data, false otherwise.
bool isEquivalentTo | ( | EggTexture const | other, |
int | eq | ||
) |
Returns true if the two textures are equivalent in all relevant properties (according to eq), false otherwise.
The Equivalence parameter, eq, should be set to the bitwise OR of the following properties, according to what you consider relevant:
EggTexture.E_basename: The basename part of the texture filename, without the directory prefix *or* the filename extension.
EggTexture.E_extension: The extension part of the texture filename.
EggTexture.E_dirname: The directory prefix of the texture filename.
EggTexture.E_complete_filename: The union of the above three; that is, the complete filename, with directory, basename, and extension.
EggTexture.E_transform: The texture matrix.
EggTexture.E_attributes: All remaining texture attributes (mode, mipmap, etc.) except TRef name.
EggTexture.E_tref_name: The TRef name.
bool isJoint | ( | ) | [inherited] |
Returns true if this particular node represents a <Joint> entry or not.
This is a handy thing to know since Joints are sorted to the end of their sibling list when writing an egg file. See EggGroupNode.write().
Reimplemented in EggGroup.
bool isLocalCoord | ( | ) | [inherited] |
Returns true if this node's vertices are not in the global coordinate space.
This will be the case if there was an <Instance> node under a transform at or above this node.
bool isUnderInstance | ( | ) | [inherited] |
Returns true if there is an <Instance> node somewhere in the egg tree at or above this node, false otherwise.
bool isUnderTransform | ( | ) | [inherited] |
Returns true if there is a <Transform> entry somewhere in the egg tree at or above this node, false otherwise.
bool multitextureOver | ( | EggTexture | other | ) |
Indicates that this texture should be layered on top of the other texture.
This will guarantee that this->get_multitexture_sort() > other->get_multitexture_sort(), at least until clear_multitexture() is called on either one.
The return value is true if successful, or false if there is a failure because the other texture was already layered on top of this one (or there is a three- or more-way cycle).
bool operator!= | ( | EggRenderMode const | other | ) | [inherited] |
bool operator< | ( | EggRenderMode const | other | ) | [inherited] |
EggTexture operator= | ( | EggTexture const | copy | ) |
bool operator== | ( | EggRenderMode const | other | ) | [inherited] |
output | ( | ostream | out | ) | [inherited] |
bool parseEgg | ( | string | egg_syntax | ) | [inherited] |
Parses the egg syntax given in the indicate string as if it had been read from the egg file within this object's definition.
Updates the object accordingly. Returns true if successful, false if there was some parse error or if the object does not support this functionality.
int renameNode | ( | vectorbasic_stringchar | strip_prefix | ) | [inherited] |
Rename by stripping out the prefix.
setAlphaFileChannel | ( | int | alpha_file_channel | ) |
If a separate alpha-file is specified, this indicates which channel number should be extracted from this file to derive the alpha channel for the final image.
The default is 0, which means the grayscale combination of r, g, b. Otherwise, this should be the 1-based channel number, for instance 1, 2, or 3 for r, g, or b, respectively, or 4 for the alpha channel of a four-component image.
setAlphaFilename | ( | Filename const | filename | ) |
Specifies a separate file that will be loaded in with the 1- or 3-component texture and applied as the alpha channel.
This is useful when loading textures from file formats that do not support alpha, for instance jpg.
setAlphaFullpath | ( | Filename const | fullpath | ) |
Records the full pathname to the file, for the benefit of get_alpha_fullpath().
setAlphaMode | ( | AlphaMode | mode | ) | [inherited] |
Specifies precisely how the transparency for this geometry should be achieved, or if it should be used.
The default, AM_unspecified, is to use transparency if the geometry has a color whose alpha value is non-1, or if it has a four-channel texture applied; otherwise, AM_on forces transparency on, and AM_off forces it off. The other flavors of transparency are specific ways to turn on transparency, which may or may not be supported by a particular rendering backend.
setAlphaScale | ( | int | alpha_scale | ) |
Sets an additional factor that will scale the alpha component after the texture has been applied.
This is used only when a combine mode is in effect.
The only legal values are 1, 2, or 4.
setAnisotropicDegree | ( | int | anisotropic_degree | ) |
Sets the degree of anisotropic filtering for this texture.
1 is off; higher levels indicate filtering in effect.
setBin | ( | string | bin | ) | [inherited] |
Sets the "bin" string for this particular object.
This names a particular bin in which the object should be rendered. The exact meaning of a bin is implementation defined, but generally a GeomBin matching each bin name must also be specifically added to the rendering engine (e.g. the CullTraverser) in use for this to work. See also set_draw_order().
setBorderColor | ( | VBase4 const | border_color | ) |
setColor | ( | VBase4 const | color | ) |
setCombineMode | ( | CombineChannel | channel, |
CombineMode | cm | ||
) |
setCombineOperand | ( | CombineChannel | channel, |
int | n, | ||
CombineOperand | co | ||
) |
setCombineSource | ( | CombineChannel | channel, |
int | n, | ||
CombineSource | cs | ||
) |
setCompressionMode | ( | CompressionMode | mode | ) |
setDepthOffset | ( | int | bias | ) | [inherited] |
Sets the "depth-offset" flag associated with this object.
This adds or subtracts an offset bias into the depth buffer. See also DepthOffsetAttrib and NodePath.set_depth_offset().
setDepthTestMode | ( | DepthTestMode | mode | ) | [inherited] |
Specifies whether this geometry should be tested against the depth buffer when it is drawn (assuming the rendering backend provides a depth buffer).
Note that this is different, and independent from, the depth_write mode.
setDepthWriteMode | ( | DepthWriteMode | mode | ) | [inherited] |
Specifies whether writes should be made to the depth buffer (assuming the rendering backend provides a depth buffer) when rendering this geometry.
setDrawOrder | ( | int | order | ) | [inherited] |
Sets the "draw-order" flag associated with this object.
This specifies a particular order in which objects of this type should be drawn, within the specified bin. If a bin is not explicitly specified, "fixed" is used. See also set_bin().
setEnvType | ( | EnvType | type | ) |
setFilename | ( | Filename const | filename | ) | [inherited] |
setFormat | ( | Format | format | ) |
setFullpath | ( | Filename const | fullpath | ) | [inherited] |
Records the full pathname to the file, for the benefit of get_fullpath().
setMagfilter | ( | FilterType | type | ) |
setMinfilter | ( | FilterType | type | ) |
setPriority | ( | int | priority | ) |
Sets the importance of this texture with respect to other textures also applied on the same geometry.
This is only meaningful in the presence of multitexturing.
setQualityLevel | ( | QualityLevel | quality_level | ) |
setReadMipmaps | ( | bool | read_mipmaps | ) |
Sets the read_mipmaps flag.
If read_mipmaps is true, the filename should contain a hash mark ('#'), which will be filled in with the mipmap level number; and the texture will be defined with a series of images, one for each mipmap level.
If the filename is of a type that already requires a hash mark, such as a cube map or a 3-d texture, then the filename should now require two hash marks, and the first one indicates the mipmap level number, while the second indicates the face number or 3-d level number.
setRgbScale | ( | int | rgb_scale | ) |
Sets an additional factor that will scale all three r, g, b components after the texture has been applied.
This is used only when a combine mode is in effect.
The only legal values are 1, 2, or 4.
setSavedResult | ( | bool | saved_result | ) |
Sets the saved_result flag.
When this is true, the output of this stage is not part of the normal pipeline--that is, it will not be supplied as the "previous" source for the next texture stage--but it will instead be supplied as the "last_saved_result" source for any future stages, until the next TextureStage with a saved_result set true is encountered.
This can be used to reuse the results of this texture stage as input to more than one stage later in the pipeline.
The last texture in the pipeline (the one with the highest sort value) should not have this flag set.
setStageName | ( | string | stage_name | ) |
Specifies the particular TextureStage this texture will be rendered on by name.
If this is omitted, the texture will be rendered on the default TextureStage, unless some other stage-specific property is specificied, in which case the texture will be rendered on a TextureStage with the same name as the tref. This is in support of multitexturing.
Each different TextureStage in the world must be uniquely named.
setTexGen | ( | TexGen | tex_gen | ) |
setTextureType | ( | TextureType | texture_type | ) |
setTransform2d | ( | Mat3D const | mat | ) | [inherited] |
Sets the overall transform as a 3x3 matrix.
This completely replaces whatever componentwise transform may have been defined.
setTransform3d | ( | Mat4D const | mat | ) | [inherited] |
Sets the overall transform as a 4x4 matrix.
This completely replaces whatever componentwise transform may have been defined.
setUserData | ( | EggUserData | user_data | ) | [inherited] |
Sets the user data associated with this object.
This may be any EggUserData-derived object. The egg library will do nothing with this pointer, except to hold its reference count and return the pointer on request.
The EggObject maintains multiple different EggUserData pointers, one for each unique type (as reported by get_type()). If you know that only one type of EggUserData object will be added in your application, you may use the query functions that accept no parameters, but it is recommended that in general you pass in the type of your particular user data, to allow multiple applications to coexist in the same egg data.
This pointer is also copied by the copy assignment operator and copy constructor.
setUvName | ( | string | uv_name | ) |
Specifies the named set of texture coordinates that this texture will use when it is applied to geometry.
Geometry may have multiple sets of texture coordinates defined, by name.
If this is not specified for a particular texture, the default set of texture coordinates will be used.
setVisibilityMode | ( | VisibilityMode | mode | ) | [inherited] |
Specifies whether this geometry is to be considered normally visible, or hidden.
If it is hidden, it is either not loaded into the scene graph at all, or loaded as a "stashed" node, according to the setting of egg-suppress-hidden.
setWrapMode | ( | WrapMode | mode | ) |
setWrapU | ( | WrapMode | mode | ) |
setWrapV | ( | WrapMode | mode | ) |
setWrapW | ( | WrapMode | mode | ) |
bool sortsLessThan | ( | EggTexture const | other, |
int | eq | ||
) |
An ordering operator to compare two textures for sorting order.
This imposes an arbitrary ordering useful to identify unique textures, according to the indicated Equivalence factor. See is_equivalent_to().
Returns the AlphaMode value associated with the given string representation, or AM_unspecified if the string does not match any known AlphaMode value.
static CombineMode stringCombineMode | ( | string | string | ) | [static] |
Returns the CombineMode value associated with the given string representation, or CM_unspecified if the string does not match any known CombineMode value.
static CombineOperand stringCombineOperand | ( | string | string | ) | [static] |
Returns the CombineOperand value associated with the given string representation, or CO_unspecified if the string does not match any known CombineOperand value.
static CombineSource stringCombineSource | ( | string | string | ) | [static] |
Returns the CombineSource value associated with the given string representation, or CS_unspecified if the string does not match any known CombineSource value.
static CompressionMode stringCompressionMode | ( | string | string | ) | [static] |
Returns the CompressionMode value associated with the given string representation, or CM_default if the string does not match any known CompressionMode value.
static DepthTestMode stringDepthTestMode | ( | string | string | ) | [static, inherited] |
Returns the DepthTestMode value associated with the given string representation, or DTM_unspecified if the string does not match any known DepthTestMode value.
static DepthWriteMode stringDepthWriteMode | ( | string | string | ) | [static, inherited] |
Returns the DepthWriteMode value associated with the given string representation, or DWM_unspecified if the string does not match any known DepthWriteMode value.
Returns the EnvType value associated with the given string representation, or ET_unspecified if the string does not match any known EnvType value.
static FilterType stringFilterType | ( | string | string | ) | [static] |
Returns the FilterType value associated with the given string representation, or FT_unspecified if the string does not match any known FilterType value.
Returns the Format value associated with the given string representation, or F_unspecified if the string does not match any known Format value.
static QualityLevel stringQualityLevel | ( | string | string | ) | [static] |
Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value.
Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value.
static TextureType stringTextureType | ( | string | string | ) | [static] |
Returns the Texture_ype value associated with the given string representation, or TT_unspecified if the string does not match any known TextureType value.
static VisibilityMode stringVisibilityMode | ( | string | string | ) | [static, inherited] |
Returns the HiddenMode value associated with the given string representation, or VM_unspecified if the string does not match any known HiddenMode value.
Returns the WrapMode value associated with the given string representation, or WM_unspecified if the string does not match any known WrapMode value.
testUnderIntegrity | ( | ) | [inherited] |
Recursively checks the integrity of the _under_flags, _parent, and _depth members of this node and all of its ancestors.
transform | ( | Mat4D const | mat | ) | [inherited] |
Applies the indicated transformation to the node and all of its descendants.
Reimplemented in EggVertexPool.
bool transformIsIdentity | ( | ) | [inherited] |
Returns true if the described transform is identity, false otherwise.
transformVerticesOnly | ( | Mat4D const | mat | ) | [inherited] |
Applies the indicated transformation only to vertices that appear in global space within vertex pools at this node and below.
Joints and other transforms are not affected, nor are local vertices.
write | ( | ostream | out, |
int | indent_level | ||
) |
Writes the texture definition to the indicated output stream in Egg format.
Reimplemented from EggRenderMode.
write | ( | ostream | out, |
int | indent_level, | ||
string | label | ||
) | [inherited] |
Writes the transform to the indicated stream in Egg format.