LightWrap++
AC++wrapperfortheLightWave3DSDK
lwpp::TextureLayer Class Reference

#include <texture.h>

+ Inheritance diagram for lwpp::TextureLayer:
+ Collaboration diagram for lwpp::TextureLayer:

List of all members.

Public Member Functions

 TextureLayer (LWTLayerID _id=0)
virtual bool available () const
 Check if the global is available.
LWChanGroupID getChannelGroup (void)
 Returns the group associated with the LWTLayerID.
virtual LWTextureFuncs * getGlobal ()
 Get the pointer to the global.
LWTLayerID getID () const
LWTextureID getTextureID ()
 Gets the Texture ID containing this layer.
int getType ()
 Gets the type of the Layer.
bool isValid () const
bool nextLayer ()
double noise (double pos[3])
 Provides access to a noise function.
LWTextureFuncs * operator-> ()
 Get the pointer to the global.
void setType (int type)
 Set the type of the Layer.
Setting Parameters

Changing paramaters for a TextureLayer

template<typename T >
int setParam (int tag, T &data)
 Sets a parameter on a Layer.
int setParam (int tag, int data)
 Sets a parameter on a Layer.
int setParam (int tag, double data)
 Sets a parameter on a Layer.
int setParam (int tag, double data[])
 Sets a parameter on a Layer.
int setPosition (double position[3])
 Sets the position of a Layer.
int setRotation (double rotation[3])
 Sets the rotation angles of a Layer.
int setSize (double size[3])
 Sets the size of a Layer.
int setFalloff (double falloff[3])
 Sets the falloff of a Layer. It is an amout per unit of distance.
int setProjection (int projection)
 Sets the Projection of an Image Layer.
int setAxis (int axis)
 Sets the Axis of projection of the Layer.
int setWidthWrap (double widthwrap)
 Sets the Width Wrap amount of the Layer.
int setHeightWrap (double heightwrap)
 Sets the Height Wrap amount of the Layer.
int setCoordSystem (int coordsys)
 Sets the Coordinate System amount of the Layer.
int setImageID (LWImageID imageID)
 Sets the Image ID for a Image Layer.
int setVMapID (LWID vmapID)
 Sets the VMAP used for example on a UV Map Texture or Weight Map texture.
int setReferenceItem (LWItemID refObjID)
 Sets the ID of the Reference Object used to drive origin, rotation and size of the Texture.
int setLayerOpacity (double layerOpacity)
 Sets the Layer opacity.
int setAntialiasing (bool antialiasing)
 Turns on the antialiasing of the Layer.
int setAAThreshold (double aaThreshold)
 sets the Texture Antialias Threshold.
int setPixelBlending (bool pixelblending)
 Turns on the Pixel Blending.
int setWidthWrapBehavior (int widthwrap)
 Sets the Width Wrap behavior of the Layer.
int setHeightWrapBehavior (int heightwrap)
 Sets the Height Wrap behavior of the Layer.
bool activate ()
 Activates the Texture.
bool deActivate ()
 DeActivates the Texture.
bool invert ()
 Inverts the texture.
int setBlendingMode (int blendmode)
 Sets the blending mode of the layer.
int setInputParameterIndex (int inputparameterindex)
 Sets the Input Parameter index.
int setAuvName (char *auvName)
 Sets the Anim UV Name.
int setAuvUser (char *auvUser)
 Sets the Anim UV User.
int setAuvArrayByteCount (int *auvArrByteCount)
 Sets the Anim UV Plugin Options Array Byte Count.
int setAuvPluginOpts (char *auvplugopts)
 Sets the Anim UV Plugin Options Array.
Getting Paramaters

Retrieving parameters of a texture layer

int getParam (int tag, void *data)
 Gets a parameter from a Layer.
template<typename T >
getParam (int tag)
 Gets a parameter from a Layer.
int getPosition (double position[3])
 Gets the position of a Layer.
int getRotation (double rotation[3])
 Gets the rotation of a Layer.
int getSize (double size[3])
 Gets the size of a Layer.
int getFalloff (double falloff[3])
 Gets the falloff of a Layer. It is an amout per unit of distance.
int getProjection (int *projection)
 Gets the Projection of an Image Layer.
int getAxis (int *axis)
 Gets the Axis of projection of the Layer.
double getWidthWrap ()
 Gets the Width Wrap amount of the Layer.
double getHeightWrap ()
 Gets the Height Wrap amount of the Layer.
int getCoordSystem (int *coordsys)
 Gets the Coordinate System amount of the Layer.
int getImageID (LWImageID *imageID)
 Gets the Image ID for a Image Layer.
int getVMapID (LWID *vmapID)
 Gets the VMAP used for example on a UV Map Texture or Weight Map texture.
int getReferenceItem (LWItemID *refObjID)
 Gets the ID of the Reference Object used to drive origin, rotation and size of the Texture.
int getLayerOpacity (double *layerOpacity)
 Gets the Layer opacity.
bool isAntialiased (void)
 Tells if the texture is antialias is enabled for the Texture.
int getAAThreshold (double *aaThreshold)
 Gets the Texture Antialias Threshold.
bool hasPixelBlending ()
 Check if the texture has Pixel Blending enabled for the Texture.
int getWidthWrapBehavior (int *widthwrap)
 Gets the Width Wrap behavior of the Layer.
int getHeightWrapBehavior (int *heightwrap)
 Gets the Height Wrap behavior of the Layer.
bool isActive ()
 Returns a boolean. true if the texture is active, false if not.
bool isInverted ()
 Returns a boolean. true if the texture is inverted, false if not.
int blendingmode (int *blendmode)
 Returns the blending mode of the layer.
int inputParameterIndex (int *inputparameterindex)
 Returns Input Parameter index.
int auvName (char *auvName)
 Returns Anim UV Name.
int auvUser (char *auvUser)
 Returns Anim UV User.
int auvArrayByteCount (int *auvArrByteCount)
 Returns the Anim UV Plugin Options Array Byte Count.
int auvPluginOpts (char *auvplugopts)
 Returns the Anim UV Plugin Options Array.
void evaluateUV (int wAxis, int oAxis, double oPos[3], double wPos[3], double uv[2])
 Returns UV Coordinates.

Protected Member Functions

bool _acquireGlobal ()

Static Protected Attributes

static LWTextureFuncs * globPtr
 Pointer to the global functions.

Detailed Description

Wrapper for Texture Layers

Give access to the Texture engine to create Image, Gradient or Procedural Layers.


Constructor & Destructor Documentation

lwpp::TextureLayer::TextureLayer ( LWTLayerID  _id = 0)
inline

Member Function Documentation

bool lwpp::GlobalBase< LWTextureFuncs >::_acquireGlobal ( )
inlineprotectedinherited
bool lwpp::TextureLayer::activate ( )
inline

Activates the Texture.

int lwpp::TextureLayer::auvArrayByteCount ( int *  auvArrByteCount)
inline

Returns the Anim UV Plugin Options Array Byte Count.

Parameters:
auvArrByteCountis an int pointer where to store the array byte count of the AnimUV plugin.
int lwpp::TextureLayer::auvName ( char *  auvName)
inline

Returns Anim UV Name.

Parameters:
auvNameis an char pointer where to store the name of the AnimUV.
int lwpp::TextureLayer::auvPluginOpts ( char *  auvplugopts)
inline

Returns the Anim UV Plugin Options Array.

Parameters:
auvplugoptsis an char pointer where to store the plugin options array of the AnimUV.
int lwpp::TextureLayer::auvUser ( char *  auvUser)
inline

Returns Anim UV User.

Parameters:
auvUseris an char pointer where to store the user of the AnimUV.
virtual bool lwpp::GlobalBase< LWTextureFuncs >::available ( ) const
inlinevirtualinherited

Check if the global is available.

int lwpp::TextureLayer::blendingmode ( int *  blendmode)
inline

Returns the blending mode of the layer.

Parameters:
blendmodeis an int pointer where to store the blending mode. It can return TXBLN_NORMAL, TXBLN_SUBTRACT, TXBLN_DIFFERENCE, TXBLN_MULTIPLY, TXBLN_DIVIDE, TXBLN_ALPHA, TXBLN_DISPLACE, TXBLN_ADD
bool lwpp::TextureLayer::deActivate ( )
inline

DeActivates the Texture.

void lwpp::TextureLayer::evaluateUV ( int  wAxis,
int  oAxis,
double  oPos[3],
double  wPos[3],
double  uv[2] 
)
inline

Returns UV Coordinates.

Returns UV Coordinates for a given position for Layers that use one of the implicit imaage mapping projections like planar, cubic, cylindrical, or spherical). If the texture uses an explicit UV mapping, the UV coordinates an be obtained directly from the vertex map through mesh info or MeshEditOp functions.

Parameters:
wAxisis an int pointer where to store the dominant axis in WORLD coordinates for a cubic mapping. X = 0, Y = 1, Z=2 This is usually chosen as the polygon normal component that's largest in absolute value. For projections other than cubic, these arguments are ignored.
oAxisis an int pointer where to store the dominant axis in OBJECT coordinates for a cubic mapping. X = 0, Y = 1, Z=2 This is usually chosen as the polygon normal component that's largest in absolute value. For projections other than cubic, these arguments are ignored.
oPosis an double pointer to an array that specify the position for which the UV should be returned in OBJECT coordinates for a cubic mapping.
wPosis an double pointer to an array that specify the position for which the UV should be returned in WORLD coordinates for a cubic mapping.
uvis an double pointer to an array where to store the UV Coordinates.
int lwpp::TextureLayer::getAAThreshold ( double *  aaThreshold)
inline

Gets the Texture Antialias Threshold.

The values of the texture will be antialiased only if adjacent values they are greater thant this threshold.

Parameters:
aaThresholdis an double pointer where to store the Texture Antialias Threshold.
int lwpp::TextureLayer::getAxis ( int *  axis)
inline

Gets the Axis of projection of the Layer.

Parameters:
axisis an int pointer where to store the axis. The values can store are ???????????????
LWChanGroupID lwpp::TextureLayer::getChannelGroup ( void  )
inline

Returns the group associated with the LWTLayerID.

int lwpp::TextureLayer::getCoordSystem ( int *  coordsys)
inline

Gets the Coordinate System amount of the Layer.

Parameters:
coordsysis an int pointer where to store the Coordinate System. 0 for Object Coordinates. 1 for World Coordinates.
int lwpp::TextureLayer::getFalloff ( double  falloff[3])
inline

Gets the falloff of a Layer. It is an amout per unit of distance.

Parameters:
falloffIs the double[3] where to store the falloff.
virtual LWTextureFuncs * lwpp::GlobalBase< LWTextureFuncs >::getGlobal ( )
inlinevirtualinherited

Get the pointer to the global.

double lwpp::TextureLayer::getHeightWrap ( )
inline

Gets the Height Wrap amount of the Layer.

int lwpp::TextureLayer::getHeightWrapBehavior ( int *  heightwrap)
inline

Gets the Height Wrap behavior of the Layer.

Parameters:
heightwrapis pointer to the height wrap behaviour. It can return TXRPT_RESET, TXRPT_REPEAT, TXRPT_MIRROR, TXRPT_EDGE
LWTLayerID lwpp::TextureLayer::getID ( void  ) const
inline
int lwpp::TextureLayer::getImageID ( LWImageID *  imageID)
inline

Gets the Image ID for a Image Layer.

Parameters:
imageIDis an LWImageID pointer where to store the Image ID.
int lwpp::TextureLayer::getLayerOpacity ( double *  layerOpacity)
inline

Gets the Layer opacity.

Parameters:
layerOpacityis an double pointer where to store the Layer opacity.
int lwpp::TextureLayer::getParam ( int  tag,
void *  data 
)
inline

Gets a parameter from a Layer.

Parameters:
tagIs the parameter of the Layer.
dataIs the data to get from the parameter.
template<typename T >
T lwpp::TextureLayer::getParam ( int  tag)
inline

Gets a parameter from a Layer.

Parameters:
tagIs the parameter of the Layer.
dataIs the data to get from the parameter.
int lwpp::TextureLayer::getPosition ( double  position[3])
inline

Gets the position of a Layer.

Parameters:
positionIs the double[3] where to store the position.
int lwpp::TextureLayer::getProjection ( int *  projection)
inline

Gets the Projection of an Image Layer.

Parameters:
projectionis an int pointer where to store the projection. The values can store are TXPRJ_PLANAR, TXPRJ_CYLINDRICAL, TXPRJ_SPHERICAL, TXPRJ_CUBIC, TXPRJ_FRONT, TXPRJ_UVMAP
int lwpp::TextureLayer::getReferenceItem ( LWItemID *  refObjID)
inline

Gets the ID of the Reference Object used to drive origin, rotation and size of the Texture.

Parameters:
refObjIDis an LWItemID pointer where to store the Item ID.
int lwpp::TextureLayer::getRotation ( double  rotation[3])
inline

Gets the rotation of a Layer.

Parameters:
rotationIs the double[3] where to store the rotation.
int lwpp::TextureLayer::getSize ( double  size[3])
inline

Gets the size of a Layer.

Parameters:
sizeIs the double[3] where to store the size.
LWTextureID lwpp::TextureLayer::getTextureID ( )
inline

Gets the Texture ID containing this layer.

int lwpp::TextureLayer::getType ( )
inline

Gets the type of the Layer.

int lwpp::TextureLayer::getVMapID ( LWID *  vmapID)
inline

Gets the VMAP used for example on a UV Map Texture or Weight Map texture.

Parameters:
vmapIDis an VMapID pointer where to store the VMAP ID. It's value is the opaque pointer returned by the MeshEditOp pointVSet function or the mesh info pntVLookup function.
double lwpp::TextureLayer::getWidthWrap ( )
inline

Gets the Width Wrap amount of the Layer.

int lwpp::TextureLayer::getWidthWrapBehavior ( int *  widthwrap)
inline

Gets the Width Wrap behavior of the Layer.

Parameters:
widthwrapis pointer to store the width wrap. It can return TXRPT_RESET, TXRPT_REPEAT, TXRPT_MIRROR, TXRPT_EDGE
bool lwpp::TextureLayer::hasPixelBlending ( )
inline

Check if the texture has Pixel Blending enabled for the Texture.

int lwpp::TextureLayer::inputParameterIndex ( int *  inputparameterindex)
inline

Returns Input Parameter index.

Parameters:
inputparameterindexis an int pointer where to store the index of the Input Parameter. It's value must be between 0 and 15.
bool lwpp::TextureLayer::invert ( )
inline

Inverts the texture.

bool lwpp::TextureLayer::isActive ( )
inline

Returns a boolean. true if the texture is active, false if not.

bool lwpp::TextureLayer::isAntialiased ( void  )
inline

Tells if the texture is antialias is enabled for the Texture.

TODO: Check the ones that returns boolean

bool lwpp::TextureLayer::isInverted ( )
inline

Returns a boolean. true if the texture is inverted, false if not.

bool lwpp::TextureLayer::isValid ( void  ) const
inline
bool lwpp::TextureLayer::nextLayer ( )
inline
double lwpp::TextureLayer::noise ( double  pos[3])
inline

Provides access to a noise function.

Parameters:
posis an array pointer where to store the noise returned value.
LWTextureFuncs * lwpp::GlobalBase< LWTextureFuncs >::operator-> ( )
inlineinherited

Get the pointer to the global.

int lwpp::TextureLayer::setAAThreshold ( double  aaThreshold)
inline

sets the Texture Antialias Threshold.

The values of the texture will be antialiased only if adjacent values are greater thant this threshold.

Parameters:
aaThresholdis an double with the new Antialiasing threshold.
int lwpp::TextureLayer::setAntialiasing ( bool  antialiasing)
inline

Turns on the antialiasing of the Layer.

Parameters:
antialiasingis a bool value. True activates it, FALSE deactivates it.
int lwpp::TextureLayer::setAuvArrayByteCount ( int *  auvArrByteCount)
inline

Sets the Anim UV Plugin Options Array Byte Count.

Parameters:
auvArrByteCountis an int with the new byte count of the AnimUV.
int lwpp::TextureLayer::setAuvName ( char *  auvName)
inline

Sets the Anim UV Name.

Parameters:
auvNameis an char pointer with the new name of the AnimUV.
int lwpp::TextureLayer::setAuvPluginOpts ( char *  auvplugopts)
inline

Sets the Anim UV Plugin Options Array.

Parameters:
auvplugoptsis an char pointer with the new plugin options AnimUV.
int lwpp::TextureLayer::setAuvUser ( char *  auvUser)
inline

Sets the Anim UV User.

Parameters:
auvUseris an char pointer with the new user of the AnimUV.
int lwpp::TextureLayer::setAxis ( int  axis)
inline

Sets the Axis of projection of the Layer.

Parameters:
axisis an int with the new axis. The values can accept are ???????????????
int lwpp::TextureLayer::setBlendingMode ( int  blendmode)
inline

Sets the blending mode of the layer.

Parameters:
blendmodeis an int with the new blending mode. It can accept TXBLN_NORMAL, TXBLN_SUBTRACT, TXBLN_DIFFERENCE, TXBLN_MULTIPLY, TXBLN_DIVIDE, TXBLN_ALPHA, TXBLN_DISPLACE, TXBLN_ADD
int lwpp::TextureLayer::setCoordSystem ( int  coordsys)
inline

Sets the Coordinate System amount of the Layer.

Parameters:
coordsysis an int with the new Coordinate System. 0 for Object Coordinates. 1 for World Coordinates.
int lwpp::TextureLayer::setFalloff ( double  falloff[3])
inline

Sets the falloff of a Layer. It is an amout per unit of distance.

Parameters:
falloffIs the double[3] with the new fallof.
int lwpp::TextureLayer::setHeightWrap ( double  heightwrap)
inline

Sets the Height Wrap amount of the Layer.

Parameters:
heightwrapis an double with the new width wrap.
int lwpp::TextureLayer::setHeightWrapBehavior ( int  heightwrap)
inline

Sets the Height Wrap behavior of the Layer.

Parameters:
heightwrapis an int pointer with the new height wrap behaviour. It accepts TXRPT_RESET, TXRPT_REPEAT, TXRPT_MIRROR, TXRPT_EDGE
int lwpp::TextureLayer::setImageID ( LWImageID  imageID)
inline

Sets the Image ID for a Image Layer.

Parameters:
imageIDis an LWImageID with the new Image ID.
int lwpp::TextureLayer::setInputParameterIndex ( int  inputparameterindex)
inline

Sets the Input Parameter index.

Parameters:
inputparameterindexis an int with the new index of the Input Parameter. It's value must be between 0 and 15.
int lwpp::TextureLayer::setLayerOpacity ( double  layerOpacity)
inline

Sets the Layer opacity.

Parameters:
layerOpacityis an double with the new Layer opacity.
template<typename T >
int lwpp::TextureLayer::setParam ( int  tag,
T &  data 
)
inline

Sets a parameter on a Layer.

Parameters:
tagIs the parameter of the Layer.
dataIs the data for the parameter.
int lwpp::TextureLayer::setParam ( int  tag,
int  data 
)
inline

Sets a parameter on a Layer.

Parameters:
tagIs the parameter of the Layer.
dataIs an integer value to set the parameter.
int lwpp::TextureLayer::setParam ( int  tag,
double  data 
)
inline

Sets a parameter on a Layer.

Parameters:
tagIs the parameter of the Layer.
dataIs a pointer double value to set the parameter.
int lwpp::TextureLayer::setParam ( int  tag,
double  data[] 
)
inline

Sets a parameter on a Layer.

Parameters:
tagIs the parameter of the Layer.
dataIs a double value to set the parameter.
int lwpp::TextureLayer::setPixelBlending ( bool  pixelblending)
inline

Turns on the Pixel Blending.

Parameters:
pixelblending
int lwpp::TextureLayer::setPosition ( double  position[3])
inline

Sets the position of a Layer.

Parameters:
positionIs the double[3] with the new position.
int lwpp::TextureLayer::setProjection ( int  projection)
inline

Sets the Projection of an Image Layer.

Parameters:
projectionis an int with the new projection. The values can accept are TXPRJ_PLANAR, TXPRJ_CYLINDRICAL, TXPRJ_SPHERICAL, TXPRJ_CUBIC, TXPRJ_FRONT, TXPRJ_UVMAP
int lwpp::TextureLayer::setReferenceItem ( LWItemID  refObjID)
inline

Sets the ID of the Reference Object used to drive origin, rotation and size of the Texture.

Parameters:
refObjIDis an LWItemID with the new Item ID.
int lwpp::TextureLayer::setRotation ( double  rotation[3])
inline

Sets the rotation angles of a Layer.

Parameters:
rotationa double[3] with the new rotation angles as hpb.
int lwpp::TextureLayer::setSize ( double  size[3])
inline

Sets the size of a Layer.

Parameters:
sizeIs the double[3] with the new size.
void lwpp::TextureLayer::setType ( int  type)
inline

Set the type of the Layer.

Parameters:
typeIs the type of Layer to create. Can be TLT_IMAGE (Image Layer), TLT_PROC (Procedural Layer), TLT_GRAD (Gradient Layer)
int lwpp::TextureLayer::setVMapID ( LWID  vmapID)
inline

Sets the VMAP used for example on a UV Map Texture or Weight Map texture.

Parameters:
vmapIDis an VMapID with the new VMAP ID. It's value is the opaque pointer returned by the MeshEditOp pointVSet function or the mesh info pntVLookup function.
int lwpp::TextureLayer::setWidthWrap ( double  widthwrap)
inline

Sets the Width Wrap amount of the Layer.

Parameters:
widthwrapis an double with the new width wrap.
int lwpp::TextureLayer::setWidthWrapBehavior ( int  widthwrap)
inline

Sets the Width Wrap behavior of the Layer.

Parameters:
widthwrapis an int pointer with the new width wrap behaviour. It accepts TXRPT_RESET, TXRPT_REPEAT, TXRPT_MIRROR, TXRPT_EDGE

Member Data Documentation

LWTextureFuncs * lwpp::GlobalBase< LWTextureFuncs >::globPtr
staticprotectedinherited

Pointer to the global functions.


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