Related Scripting Object: Texture
Specific Shader object which is a member of the Texture Shaders family (siTextureShaderFamily). More...
#include <xsi_texture.h>
Inheritance diagram for Texture:

Public Member Functions |
|
| Texture () | |
| ~Texture () | |
| Texture (const CRef &in_ref) | |
| Texture (const Texture &in_obj) | |
| bool | IsA (siClassID in_ClassID) const |
| siClassID | GetClassID () const |
| Texture & | operator= (const Texture &in_obj) |
| Texture & | operator= (const CRef &in_ref) |
| CStatus | GetTransformValues (LONG in_flags, CDoubleArray &out_aUVWValues) |
| ImageClip2 | GetImageClip () const |
using namespace XSI; Application app; Model root = app.GetActiveSceneRoot(); X3DObject myCube; root.AddGeometry( L"Cube",L"MeshSurface",L"" ,myCube ); Material myMaterial; myCube.AddMaterial(L"Phong",false,L"",myMaterial); // Adding an image CValueArray args(4L); CValue outArg; args[0] = CValue( CString(L"Image") ); args[1] = CValue(myCube.GetRef()); args[2] = CValue((short)1); args[3] = CValue(false); app.ExecuteCommand( L"BlendInPresets", args, outArg ); // Adding a texture support args[0] = myCube.GetRef(); args[1] = (LONG)siTxtPlanarXY; args[2] = (LONG)siTxtDefaultSpherical; args[3] = CString(L"Texture_Support"); app.ExecuteCommand( L"CreateTextureSupport", args, outArg ); Texture myTexture= myMaterial.GetCurrentTexture(); app.LogMessage( L"The texture: " + myTexture.GetFullName() );
| Texture | ( | ) |
Default constructor.
| ~Texture | ( | ) |
Default destructor.
Constructor.
| in_ref | constant reference object. |
Copy constructor.
| in_obj | constant class object. |
| bool IsA | ( | siClassID | in_ClassID | ) | const [virtual] |
Returns true if a given class type is compatible with this API class.
| in_ClassID | class type. |
Reimplemented from Shader.
| siClassID GetClassID | ( | ) | const [virtual] |
Returns the type of the API class.
Reimplemented from Shader.
Creates an object from another object. The newly created object is set to empty if the input object is not compatible.
| in_obj | constant class object. |
Creates an object from a reference object. The newly created object is set to empty if the input reference object is not compatible.
| in_ref | constant class object. |
Reimplemented from Shader.
| CStatus GetTransformValues | ( | LONG | in_flags, | |
| CDoubleArray & | out_aUVWValues | |||
| ) |
Calculates the UVW values. The values are read from cluster properties, and the following texture objects are used in the calculation:
You can specify the texture transformation effects you want to apply using bit flags. Note that some texture transformation effects will only be approximate, such as in the case of creating texture repeats where this method cannot resample the surface to create the additional sample points required.
| in_flags | bit flags to specify which transformations to apply to the UVW cluster property content. The bit flags values are the ones located in the siTextureEffectsComputation enum. |
| out_aUVWValues | array containing the UVW. This array is in the same order as the cluster property. |
CStatus::Fail failure.
| ImageClip2 GetImageClip | ( | ) | const |
Returns the image clip bound to this texture.