Panda3D
|
Defines a texture map that may be applied to geometry. More...
#include <pandadoc.hpp>
Public Member Functions | |
__init__ (const EggTexture copy) | |
__init__ (str tref_name, const Filename filename) | |
bool | affectsPolygonAlpha () |
Returns true if this texture's environment type or combine mode allows the texture to have an effect on the polygon's alpha values, false otherwise. | |
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. | |
clearBorderColor () | |
clearColor () | |
clearLodBias () | |
Removes the specification of a maximum mipmap level from the texture. | |
clearMaxLod () | |
Removes the specification of a maximum mipmap level from the texture. | |
clearMinLod () | |
Removes the specification of a minimum mipmap level from the texture. | |
clearMultitexture () | |
Resets the multitexture flags set by multitexture_over(). | |
clearNumViews () | |
Removes the specification of the number of views for a 3-D multiview texture. | |
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. | |
clearUvName () | |
Removes the restriction to a particular named set of texture coordinates and restores the texture to using the default texture coordinates. | |
EggTexture::WrapMode | determineWrapU () |
Determines the appropriate wrap in the U direction. | |
EggTexture::WrapMode | determineWrapV () |
Determines the appropriate wrap in the V direction. | |
EggTexture::WrapMode | determineWrapW () |
Determines the appropriate wrap in the W direction. | |
int | getAlphaFileChannel () |
Returns the particular channel that has been specified for the alpha-file image, or 0 if no channel has been specified. | |
const Filename | getAlphaFilename () |
Returns the separate file assigned for the alpha channel. | |
const Filename | getAlphaFullpath () |
Returns the full pathname to the alpha file, if it is known; otherwise, returns the same thing as get_alpha_filename(). | |
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. | |
const LColor | getBorderColor () |
Returns the border color if one has been specified, or (0, 0, 0, 1) otherwise. | |
const LColor | getColor () |
Returns the blend color if one has been specified, or (0, 0, 0, 1) otherwise. | |
EggTexture::CombineMode | getCombineMode (EggTexture::CombineChannel channel) |
EggTexture::CombineOperand | getCombineOperand (EggTexture::CombineChannel channel, int n) |
EggTexture::CombineSource | getCombineSource (EggTexture::CombineChannel channel, int n) |
EggTexture::CompressionMode | getCompressionMode () |
EggTexture::EnvType | getEnvType () |
EggTexture::Format | getFormat () |
double | getLodBias () |
Returns the maximum mipmap level that has been specified for this texture. | |
EggTexture::FilterType | getMagfilter () |
double | getMaxLod () |
Returns the maximum mipmap level that has been specified for this texture. | |
EggTexture::FilterType | getMinfilter () |
double | getMinLod () |
Returns the minimum mipmap level that has been specified for this texture. | |
int | getMultitextureSort () |
Returns an integer that represents the depth to which this texture is layered on all other textures in the egg file. | |
bool | getMultiview () |
Returns the current setting of the multiview flag. | |
int | getNumViews () |
Returns the specified number of views specified for the 3-D multiview texture. | |
int | getPriority () |
Returns the multitexture importance value that has been specified for the texture, or 0 if no priority value has been specified. | |
EggTexture::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. | |
str | getStageName () |
Returns the stage name that has been specified for this texture, or the tref name if no texture stage has explicitly been specified. | |
EggTexture::TexGen | getTexGen () |
EggTexture::TextureType | getTextureType () |
str | getUvName () |
Returns the texcoord name that has been specified for this texture, or the empty string if no texcoord name has explicitly been specified. | |
EggTexture::WrapMode | getWrapMode () |
EggTexture::WrapMode | getWrapU () |
Returns the amount specified for U wrap. | |
EggTexture::WrapMode | getWrapV () |
Returns the amount specified for V wrap. | |
EggTexture::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 | 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 | hasLodBias () |
Returns true if a value for the maximum mipmap level has been specified for this texture, false otherwise. | |
bool | hasMaxLod () |
Returns true if a value for the maximum mipmap level has been specified for this texture, false otherwise. | |
bool | hasMinLod () |
Returns true if a value for the minimum mipmap level has been specified for this texture, false otherwise. | |
bool | hasNumViews () |
Returns true if the number of views has been specified for the 3-D multiview texture, false otherwise. | |
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 | hasUvName () |
Returns true if a texcoord name has been explicitly specified for this texture, false otherwise. | |
bool | isEquivalentTo (const EggTexture other, int eq) |
Returns true if the two textures are equivalent in all relevant properties (according to eq), false otherwise. | |
bool | multitextureOver (EggTexture other) |
Indicates that this texture should be layered on top of the other texture. | |
EggTexture | operator= (const EggTexture copy) |
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 (const Filename filename) | |
Specifies a separate file that will be loaded in with the 1- or 3-component texture and applied as the alpha channel. | |
setAlphaFullpath (const Filename fullpath) | |
Records the full pathname to the file, for the benefit of get_alpha_fullpath(). | |
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. | |
setBorderColor (const LColor border_color) | |
setColor (const LColor color) | |
setCombineMode (EggTexture::CombineChannel channel, EggTexture::CombineMode cm) | |
setCombineOperand (EggTexture::CombineChannel channel, int n, EggTexture::CombineOperand co) | |
setCombineSource (EggTexture::CombineChannel channel, int n, EggTexture::CombineSource cs) | |
setCompressionMode (EggTexture::CompressionMode mode) | |
setEnvType (EggTexture::EnvType type) | |
setFormat (EggTexture::Format format) | |
setLodBias (double lod_bias) | |
Sets the mipmap level bias that is added to the mipmap level to be sampled. | |
setMagfilter (EggTexture::FilterType type) | |
setMaxLod (double max_lod) | |
Sets the maximum mipmap level that may be sampled. | |
setMinfilter (EggTexture::FilterType type) | |
setMinLod (double min_lod) | |
Sets the minimum mipmap level that may be sampled. | |
setMultiview (bool multiview) | |
Sets the multiview flag. | |
setNumViews (int num_views) | |
When loading a 3-D multiview texture, this parameter is necessary to specify how many views will be expected. | |
setPriority (int priority) | |
Sets the importance of this texture with respect to other textures also applied on the same geometry. | |
setQualityLevel (EggTexture::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 (str stage_name) | |
Specifies the particular TextureStage this texture will be rendered on by name. | |
setTexGen (EggTexture::TexGen tex_gen) | |
setTextureType (EggTexture::TextureType texture_type) | |
setUvName (str uv_name) | |
Specifies the named set of texture coordinates that this texture will use when it is applied to geometry. | |
setWrapMode (EggTexture::WrapMode mode) | |
setWrapU (EggTexture::WrapMode mode) | |
setWrapV (EggTexture::WrapMode mode) | |
setWrapW (EggTexture::WrapMode mode) | |
bool | sortsLessThan (const EggTexture other, int eq) |
An ordering operator to compare two textures for sorting order. | |
write (Ostream out, int indent_level) | |
Writes the texture definition to the indicated output stream in Egg format. | |
![]() | |
str | getDefaultExtension () |
Returns the default extension for this filename type. | |
const Filename | getFilename () |
Returns a nonmodifiable reference to the filename. | |
const Filename | getFullpath () |
Returns the full pathname to the file, if it is known; otherwise, returns the same thing as get_filename(). | |
EggFilenameNode | operator= (const EggFilenameNode copy) |
setFilename (const Filename filename) | |
setFullpath (const Filename fullpath) | |
Records the full pathname to the file, for the benefit of get_fullpath(). | |
![]() | |
object | __reduce__ () |
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. | |
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. | |
flattenTransforms () | |
Removes any transform and instance records from this node in the scene graph and below. | |
int | getDepth () |
Returns the number of nodes above this node in the egg hierarchy. | |
const LMatrix4d | getNodeFrame () |
Returns the coordinate frame of the node itself. | |
const LMatrix4d | getNodeFrameInv () |
Returns the inverse of the matrix returned by get_node_frame(). | |
const LMatrix4d | getNodeFrameInvPtr () |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame_inv() matrix. | |
const LMatrix4d | getNodeFramePtr () |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_frame() matrix. | |
const LMatrix4d | 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. | |
const LMatrix4d | getNodeToVertexPtr () |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_node_to_vertex() matrix. | |
EggGroupNode | getParent () |
const LMatrix4d | getVertexFrame () |
Returns the coordinate frame of the vertices referenced by primitives at or under this node. | |
const LMatrix4d | getVertexFrameInv () |
Returns the inverse of the matrix returned by get_vertex_frame(). | |
const LMatrix4d | getVertexFrameInvPtr () |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame_inv() matrix. | |
const LMatrix4d | getVertexFramePtr () |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_frame() matrix. | |
const LMatrix4d | getVertexToNode () |
Returns the transformation matrix suitable for converting the vertices as read from the egg file into the coordinate space of the node. | |
const LMatrix4d | getVertexToNodePtr () |
Returns either a NULL pointer or a unique pointer shared by nodes with the same get_vertex_to_node() matrix. | |
bool | isAnimMatrix () |
Returns true if this node represents a table of animation transformation data, 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. | |
EggNode | operator= (const EggNode copy) |
bool | parseEgg (str 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 (VectorString strip_prefix) |
Rename by stripping out the prefix. | |
testUnderIntegrity () | |
transform (const LMatrix4d mat) | |
Applies the indicated transformation to the node and all of its descendants. | |
transformVerticesOnly (const LMatrix4d 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) | |
![]() | |
__init__ (const EggNamedObject copy) | |
__init__ (str name) | |
EggNamedObject | operator= (const EggNamedObject copy) |
output (Ostream out) | |
![]() | |
__init__ () | |
__init__ (const EggObject copy) | |
clearUserData () | |
Removes all user data pointers from the node. | |
clearUserData (TypeHandle type) | |
Removes the user data pointer of the indicated type. | |
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. | |
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. | |
EggObject | operator= (const EggObject copy) |
setUserData (EggUserData user_data) | |
Sets the user data associated with this object. | |
![]() | |
TypeHandle | getType () |
int | getTypeIndex () |
Returns the internal index number associated with this object's TypeHandle, a unique number for each different type. | |
bool | isExactType (TypeHandle handle) |
Returns true if the current object is the indicated type exactly. | |
bool | isOfType (TypeHandle handle) |
Returns true if the current object is or derives from the indicated type. | |
![]() | |
int | getRefCount () |
Returns the current reference count. | |
ref () | |
Explicitly increments the reference count. | |
bool | testRefCountIntegrity () |
Does some easy checks to make sure that the reference count isn't completely bogus. | |
bool | testRefCountNonzero () |
Does some easy checks to make sure that the reference count isn't zero, or completely bogus. | |
bool | unref () |
Explicitly decrements the reference count. | |
![]() | |
__init__ (const Namable) | |
__init__ (str initial_name) | |
clearName () | |
Resets the Namable's name to empty. | |
str | getName () |
bool | hasName () |
Returns true if the Namable has a nonempty name set, false if the name is empty. | |
output (Ostream out) | |
Outputs the Namable. | |
setName (str name) | |
![]() | |
__init__ () | |
__init__ (const EggRenderMode copy) | |
clearBin () | |
Removes the bin name that was set for this particular object. | |
clearDepthOffset () | |
Removes the depth-offset flag from this particular object. | |
clearDrawOrder () | |
Removes the draw-order flag from this particular object. | |
EggRenderMode::AlphaMode | getAlphaMode () |
Returns the alpha mode that was set, or AM_unspecified if nothing was set. | |
str | getBin () |
Returns the bin name that has been set for this particular object, if any. | |
int | getDepthOffset () |
Returns the "depth-offset" flag as set for this particular object. | |
EggRenderMode::DepthTestMode | getDepthTestMode () |
Returns the depth_test mode that was set, or DTM_unspecified if nothing was set. | |
EggRenderMode::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. | |
EggRenderMode::VisibilityMode | getVisibilityMode () |
Returns the visibility mode that was set, or VM_unspecified if nothing was set. | |
bool | hasBin () |
Returns true if a bin name has been set for this particular object. | |
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 | operator!= (const EggRenderMode other) |
bool | operator< (const EggRenderMode other) |
EggRenderMode | operator= (const EggRenderMode copy) |
bool | operator== (const EggRenderMode other) |
setAlphaMode (EggRenderMode::AlphaMode mode) | |
Specifies precisely how the transparency for this geometry should be achieved, or if it should be used. | |
setBin (str bin) | |
Sets the "bin" string for this particular object. | |
setDepthOffset (int bias) | |
Sets the "depth-offset" flag associated with this object. | |
setDepthTestMode (EggRenderMode::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 (EggRenderMode::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. | |
setVisibilityMode (EggRenderMode::VisibilityMode mode) | |
Specifies whether this geometry is to be considered normally visible, or hidden. | |
write (Ostream out, int indent_level) | |
Writes the attributes to the indicated output stream in Egg format. | |
![]() | |
__init__ () | |
__init__ (const EggTransform copy) | |
addMatrix3 (const LMatrix3d mat) | |
Appends an arbitrary 3x3 matrix to the current transform. | |
addMatrix4 (const LMatrix4d mat) | |
Appends an arbitrary 4x4 matrix to the current transform. | |
addRotate2d (double angle) | |
Appends a 2-d rotation to the current transform. | |
addRotate3d (const LQuaterniond quat) | |
Appends an arbitrary 3-d rotation to the current transform, expressed as a quaternion. | |
addRotate3d (double angle, const LVector3d 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 (const LVecBase2d scale) | |
Appends a possibly non-uniform scale to the current transform. | |
addScale3d (const LVecBase3d scale) | |
Appends a possibly non-uniform scale to the current transform. | |
addTranslate2d (const LVector2d translate) | |
Appends a 2-d translation operation to the current transform. | |
addTranslate3d (const LVector3d translate) | |
Appends a 3-d translation operation to the current transform. | |
addUniformScale (double scale) | |
Appends a uniform scale to the current transform. | |
clearTransform () | |
Resets the transform to empty, identity. | |
const LMatrix3d | getComponentMat3 (int n) |
Returns the 3x3 matrix associated with the nth component. | |
const LMatrix4d | 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. | |
EggTransform::ComponentType | getComponentType (int n) |
Returns the type of the nth component. | |
const LVecBase2d | getComponentVec2 (int n) |
Returns the 2-component vector associated with the nth component. | |
const LVecBase3d | getComponentVec3 (int n) |
Returns the 3-component vector associated with the nth component. | |
int | getNumComponents () |
Returns the number of components that make up the transform. | |
LMatrix3d | getTransform2d () |
Returns the overall transform as a 3x3 matrix. | |
const LMatrix4d | getTransform3d () |
Returns the overall transform as a 4x4 matrix. | |
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. | |
EggTransform | operator= (const EggTransform copy) |
setTransform2d (const LMatrix3d mat) | |
Sets the overall transform as a 3x3 matrix. | |
setTransform3d (const LMatrix4d mat) | |
Sets the overall transform as a 4x4 matrix. | |
bool | transformIsIdentity () |
Returns true if the described transform is identity, false otherwise. | |
write (Ostream out, int indent_level, str label) | |
Writes the transform to the indicated stream in Egg format. | |
Static Public Member Functions | |
static TypeHandle | getClassType () |
static EggTexture::CombineMode | stringCombineMode (str 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 EggTexture::CombineOperand | stringCombineOperand (str 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 EggTexture::CombineSource | stringCombineSource (str 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 EggTexture::CompressionMode | stringCompressionMode (str 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 EggTexture::EnvType | stringEnvType (str 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 EggTexture::FilterType | stringFilterType (str 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 EggTexture::Format | stringFormat (str 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 EggTexture::QualityLevel | stringQualityLevel (str 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 EggTexture::TexGen | stringTexGen (str 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 EggTexture::TextureType | stringTextureType (str 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 EggTexture::WrapMode | stringWrapMode (str string) |
Returns the WrapMode value associated with the given string representation, or WM_unspecified if the string does not match any known WrapMode value. | |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
![]() | |
static TypeHandle | getClassType () |
static EggRenderMode::AlphaMode | stringAlphaMode (str 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 EggRenderMode::DepthTestMode | stringDepthTestMode (str 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 EggRenderMode::DepthWriteMode | stringDepthWriteMode (str 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 EggRenderMode::VisibilityMode | stringVisibilityMode (str string) |
Returns the HiddenMode value associated with the given string representation, or VM_unspecified if the string does not match any known HiddenMode value. | |
Public Attributes | |
int | alpha_file_channel |
Returns the particular channel that has been specified for the alpha-file image, or 0 if no channel has been specified. | |
const Filename | alpha_filename |
Returns the separate file assigned for the alpha channel. | |
const Filename | alpha_fullpath |
Returns the full pathname to the alpha file, if it is known; otherwise, returns the same thing as get_alpha_filename(). | |
int | alpha_scale |
Returns the alpha_scale value that has been specified for the texture, or 1 if no alpha_scale value has been specified. | |
int | anisotropic_degree |
Returns the anisotropic filtering degree that has been specified for this texture, or 0 if nothing has been specified. | |
const LColor | border_color |
Returns the border color if one has been specified, or (0, 0, 0, 1) otherwise. | |
const LColor | color |
Returns the blend color if one has been specified, or (0, 0, 0, 1) otherwise. | |
EggTexture::CompressionMode | compression_mode |
EggTexture::EnvType | env_type |
EggTexture::Format | format |
double | lod_bias |
Returns the maximum mipmap level that has been specified for this texture. | |
EggTexture::FilterType | magfilter |
double | max_lod |
Returns the maximum mipmap level that has been specified for this texture. | |
double | min_lod |
Returns the minimum mipmap level that has been specified for this texture. | |
EggTexture::FilterType | minfilter |
int | multitexture_sort |
Returns an integer that represents the depth to which this texture is layered on all other textures in the egg file. | |
bool | multiview |
Returns the current setting of the multiview flag. | |
int | num_views |
Returns the specified number of views specified for the 3-D multiview texture. | |
int | priority |
Returns the multitexture importance value that has been specified for the texture, or 0 if no priority value has been specified. | |
EggTexture::QualityLevel | quality_level |
bool | read_mipmaps |
Returns the current setting of the read_mipmaps flag. | |
int | rgb_scale |
Returns the rgb_scale value that has been specified for the texture, or 1 if no rgb_scale value has been specified. | |
bool | saved_result |
Returns the current setting of the saved_result flag. | |
const String | stage_name |
Returns the stage name that has been specified for this texture, or the tref name if no texture stage has explicitly been specified. | |
EggTexture::TexGen | tex_gen |
EggTexture::TextureType | texture_type |
const String | uv_name |
Returns the texcoord name that has been specified for this texture, or the empty string if no texcoord name has explicitly been specified. | |
EggTexture::WrapMode | wrap_mode |
EggTexture::WrapMode | wrap_u |
Returns the amount specified for U wrap. | |
EggTexture::WrapMode | wrap_v |
Returns the amount specified for V wrap. | |
EggTexture::WrapMode | wrap_w |
Returns the amount specified for W wrap. | |
![]() | |
int | depth |
Returns the number of nodes above this node in the egg hierarchy. | |
EggGroupNode | parent |
![]() | |
TypeHandle | type |
Returns the TypeHandle representing this object's type. | |
![]() | |
int | ref_count |
The current reference count. | |
![]() | |
const String | name |
Defines a texture map that may be applied to geometry.
enum CombineChannel |
enum CombineIndex |
enum CombineMode |
enum CombineOperand |
enum CombineSource |
enum CompressionMode |
enum EnvType |
enum Equivalence |
enum FilterType |
enum Format |
enum QualityLevel |
enum TexGen |
enum TextureType |
enum WrapMode |
__init__ | ( | const EggTexture | copy | ) |
__init__ | ( | str | tref_name, |
const Filename | filename ) |
bool affectsPolygonAlpha | ( | ) |
Returns true if this texture's environment type or combine mode allows the texture to have an effect on the polygon's alpha values, false otherwise.
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.
clearBorderColor | ( | ) |
clearColor | ( | ) |
clearLodBias | ( | ) |
Removes the specification of a maximum mipmap level from the texture.
clearMaxLod | ( | ) |
Removes the specification of a maximum mipmap level from the texture.
clearMinLod | ( | ) |
Removes the specification of a minimum mipmap level from the texture.
clearMultitexture | ( | ) |
Resets the multitexture flags set by multitexture_over().
After this call, get_multitexture() will return false, and get_multitexture_sort() will return 0.
clearNumViews | ( | ) |
Removes the specification of the number of views for a 3-D multiview texture.
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.
clearUvName | ( | ) |
Removes the restriction to a particular named set of texture coordinates and restores the texture to using the default texture coordinates.
EggTexture::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.
EggTexture::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.
EggTexture::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.
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().
const Filename 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().
const Filename 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.
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.
const LColor getBorderColor | ( | ) |
Returns the border color if one has been specified, or (0, 0, 0, 1) otherwise.
|
static |
const LColor getColor | ( | ) |
Returns the blend color if one has been specified, or (0, 0, 0, 1) otherwise.
EggTexture::CombineMode getCombineMode | ( | EggTexture::CombineChannel | channel | ) |
EggTexture::CombineOperand getCombineOperand | ( | EggTexture::CombineChannel | channel, |
int | n ) |
EggTexture::CombineSource getCombineSource | ( | EggTexture::CombineChannel | channel, |
int | n ) |
EggTexture::CompressionMode getCompressionMode | ( | ) |
EggTexture::EnvType getEnvType | ( | ) |
EggTexture::Format getFormat | ( | ) |
double getLodBias | ( | ) |
Returns the maximum mipmap level that has been specified for this texture.
EggTexture::FilterType getMagfilter | ( | ) |
double getMaxLod | ( | ) |
Returns the maximum mipmap level that has been specified for this texture.
EggTexture::FilterType getMinfilter | ( | ) |
double getMinLod | ( | ) |
Returns the minimum mipmap level that has been specified for this texture.
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.
bool getMultiview | ( | ) |
Returns the current setting of the multiview flag.
See set_multiview().
int getNumViews | ( | ) |
Returns the specified number of views specified for the 3-D multiview texture.
See set_num_views().
int getPriority | ( | ) |
Returns the multitexture importance value that has been specified for the texture, or 0 if no priority value has been specified.
EggTexture::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().
str getStageName | ( | ) |
Returns the stage name that has been specified for this texture, or the tref name if no texture stage has explicitly been specified.
EggTexture::TexGen getTexGen | ( | ) |
EggTexture::TextureType getTextureType | ( | ) |
str getUvName | ( | ) |
Returns the texcoord name that has been specified for this texture, or the empty string if no texcoord name has explicitly been specified.
EggTexture::WrapMode getWrapMode | ( | ) |
EggTexture::WrapMode getWrapU | ( | ) |
Returns the amount specified for U wrap.
This may be unspecified, even if there is an overall wrap value.
EggTexture::WrapMode getWrapV | ( | ) |
Returns the amount specified for V wrap.
This may be unspecified, even if there is an overall wrap value.
EggTexture::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 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 hasLodBias | ( | ) |
Returns true if a value for the maximum mipmap level has been specified for this texture, false otherwise.
bool hasMaxLod | ( | ) |
Returns true if a value for the maximum mipmap level has been specified for this texture, false otherwise.
bool hasMinLod | ( | ) |
Returns true if a value for the minimum mipmap level has been specified for this texture, false otherwise.
bool hasNumViews | ( | ) |
Returns true if the number of views has been specified for the 3-D multiview texture, false otherwise.
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 hasUvName | ( | ) |
Returns true if a texcoord name has been explicitly specified for this texture, false otherwise.
bool isEquivalentTo | ( | const EggTexture | 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 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).
EggTexture operator= | ( | const EggTexture | copy | ) |
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 | ( | const Filename | 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 | ( | const Filename | fullpath | ) |
Records the full pathname to the file, for the benefit of get_alpha_fullpath().
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.
setBorderColor | ( | const LColor | border_color | ) |
setColor | ( | const LColor | color | ) |
setCombineMode | ( | EggTexture::CombineChannel | channel, |
EggTexture::CombineMode | cm ) |
setCombineOperand | ( | EggTexture::CombineChannel | channel, |
int | n, | ||
EggTexture::CombineOperand | co ) |
setCombineSource | ( | EggTexture::CombineChannel | channel, |
int | n, | ||
EggTexture::CombineSource | cs ) |
setCompressionMode | ( | EggTexture::CompressionMode | mode | ) |
setEnvType | ( | EggTexture::EnvType | type | ) |
setFormat | ( | EggTexture::Format | format | ) |
setLodBias | ( | double | lod_bias | ) |
Sets the mipmap level bias that is added to the mipmap level to be sampled.
setMagfilter | ( | EggTexture::FilterType | type | ) |
setMaxLod | ( | double | max_lod | ) |
Sets the maximum mipmap level that may be sampled.
setMinfilter | ( | EggTexture::FilterType | type | ) |
setMinLod | ( | double | min_lod | ) |
Sets the minimum mipmap level that may be sampled.
setMultiview | ( | bool | multiview | ) |
Sets the multiview flag.
If multiview is true, the filename should contain a hash mark ('#'), which will be filled in with the view number; and a multiview texture will be defined with a series of images, one for each view.
A multiview texture is most often used for stereo textures, but other uses are also possible, such as for texture animation.
setNumViews | ( | int | num_views | ) |
When loading a 3-D multiview texture, this parameter is necessary to specify how many views will be expected.
The z size is determined implicitly from the number of images loaded.
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 | ( | EggTexture::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 | ( | str | 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 | ( | EggTexture::TexGen | tex_gen | ) |
setTextureType | ( | EggTexture::TextureType | texture_type | ) |
setUvName | ( | str | 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.
setWrapMode | ( | EggTexture::WrapMode | mode | ) |
setWrapU | ( | EggTexture::WrapMode | mode | ) |
setWrapV | ( | EggTexture::WrapMode | mode | ) |
setWrapW | ( | EggTexture::WrapMode | mode | ) |
bool sortsLessThan | ( | const EggTexture | 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().
|
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 |
Returns the CombineOperand value associated with the given string representation, or CO_unspecified if the string does not match any known CombineOperand value.
|
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 |
Returns the CompressionMode value associated with the given string representation, or CM_default if the string does not match any known CompressionMode value.
|
static |
Returns the EnvType value associated with the given string representation, or ET_unspecified if the string does not match any known EnvType value.
|
static |
Returns the FilterType value associated with the given string representation, or FT_unspecified if the string does not match any known FilterType value.
|
static |
Returns the Format value associated with the given string representation, or F_unspecified if the string does not match any known Format value.
|
static |
Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value.
|
static |
Returns the TexGen value associated with the given string representation, or ET_unspecified if the string does not match any known TexGen value.
|
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 |
Returns the WrapMode value associated with the given string representation, or WM_unspecified if the string does not match any known WrapMode value.
write | ( | Ostream | out, |
int | indent_level ) |
Writes the texture definition to the indicated output stream in Egg format.
int alpha_file_channel |
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().
const Filename alpha_filename |
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().
const Filename alpha_fullpath |
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.
int alpha_scale |
Returns the alpha_scale value that has been specified for the texture, or 1 if no alpha_scale value has been specified.
int anisotropic_degree |
Returns the anisotropic filtering degree that has been specified for this texture, or 0 if nothing has been specified.
const LColor border_color |
Returns the border color if one has been specified, or (0, 0, 0, 1) otherwise.
const LColor color |
Returns the blend color if one has been specified, or (0, 0, 0, 1) otherwise.
EggTexture::CompressionMode compression_mode |
EggTexture::EnvType env_type |
EggTexture::Format format |
double lod_bias |
Returns the maximum mipmap level that has been specified for this texture.
EggTexture::FilterType magfilter |
double max_lod |
Returns the maximum mipmap level that has been specified for this texture.
double min_lod |
Returns the minimum mipmap level that has been specified for this texture.
EggTexture::FilterType minfilter |
int multitexture_sort |
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.
bool multiview |
Returns the current setting of the multiview flag.
See set_multiview().
int num_views |
Returns the specified number of views specified for the 3-D multiview texture.
See set_num_views().
int priority |
Returns the multitexture importance value that has been specified for the texture, or 0 if no priority value has been specified.
EggTexture::QualityLevel quality_level |
bool read_mipmaps |
Returns the current setting of the read_mipmaps flag.
See set_read_mipmaps().
int rgb_scale |
Returns the rgb_scale value that has been specified for the texture, or 1 if no rgb_scale value has been specified.
bool saved_result |
Returns the current setting of the saved_result flag.
See set_saved_result().
const String stage_name |
Returns the stage name that has been specified for this texture, or the tref name if no texture stage has explicitly been specified.
EggTexture::TexGen tex_gen |
EggTexture::TextureType texture_type |
const String uv_name |
Returns the texcoord name that has been specified for this texture, or the empty string if no texcoord name has explicitly been specified.
EggTexture::WrapMode wrap_mode |
EggTexture::WrapMode wrap_u |
Returns the amount specified for U wrap.
This may be unspecified, even if there is an overall wrap value.
EggTexture::WrapMode wrap_v |
Returns the amount specified for V wrap.
This may be unspecified, even if there is an overall wrap value.
EggTexture::WrapMode wrap_w |
Returns the amount specified for W wrap.
This may be unspecified, even if there is an overall wrap value.