A3DL::Texture Class Reference
[libmetaobject_a3dl]
#include <vos/metaobjects/a3dl/texture.hh>
Inheritance diagram for A3DL::Texture:

Detailed Description
Represents a texture layer in a 3D object's Material.
Definition at line 44 of file texture.hh.
Public Member Functions
- Texture (VOS::VobjectBase *superobject)
- virtual ~Texture ()
- virtual const std::string getVOSType ()
- virtual VUtil::vRef< VOS::Property > getImage ()
- virtual void setImage (VOS::Property *p)
- virtual void setImageToFile (const std::string &filename, const std::string &datatype)
- virtual void setImageData (const std::string &data, const std::string &datatype)
- virtual void setBlendMode (Material::BlendMode mode)
- virtual Material::BlendMode getBlendMode ()
- virtual VUtil::vRef< VOS::Property > getBlendModeObj ()
- virtual void setBlendModeObj (VOS::Property *p)
- virtual void setAlpha (double a)
- virtual double getAlpha ()
- virtual VUtil::vRef< VOS::Property > getAlphaObj ()
- virtual void setAlphaObj (VOS::Property *obj)
- virtual void setShaded (bool s)
- virtual bool getShaded ()
- virtual VUtil::vRef< VOS::Property > getShadedObj ()
- virtual void setShadedObj (VOS::Property *obj)
- virtual void setTransparentKeycolor (float r, float g, float b)
- virtual void getTransparentKeycolor (float &r, float &g, float &b)
- virtual void setUVScaleAndShift (float uscale, float vscale, float ushift, float vshift)
- virtual void getUVScaleAndShift (float &uscale, float &vscale, float &ushift, float &vshift)
Static Public Member Functions
- static MetaObject * new_Texture (VOS::VobjectBase *superobject, const std::string &type)
Constructor & Destructor Documentation
| A3DL::Texture::Texture | ( | VOS::VobjectBase * | superobject | ) |
| virtual A3DL::Texture::~Texture | ( | ) | [virtual] |
Member Function Documentation
| virtual double A3DL::Texture::getAlpha | ( | ) | [virtual] |
Get alpha transparency.
Will be between 0 (fully transparent) and 1 (no transparency)
| virtual VUtil::vRef<VOS::Property> A3DL::Texture::getAlphaObj | ( | ) | [virtual] |
Get alpha property.
| virtual Material::BlendMode A3DL::Texture::getBlendMode | ( | ) | [virtual] |
Get special blend mode.
These blend modes determine how the background affects the object's material.
- Exceptions:
-
Vobject::NoSuchObjectError if there is no "a3dl:blend-mode" property.
| virtual VUtil::vRef<VOS::Property> A3DL::Texture::getBlendModeObj | ( | ) | [virtual] |
Get blend mode property object.
| virtual VUtil::vRef<VOS::Property> A3DL::Texture::getImage | ( | ) | [virtual] |
| virtual bool A3DL::Texture::getShaded | ( | ) | [virtual] |
Get whether this layer should have shading or not.
| virtual VUtil::vRef<VOS::Property> A3DL::Texture::getShadedObj | ( | ) | [virtual] |
Get shaded property object
- Exceptions:
-
Vobject::NoSuchObjectError if there is no "a3dl:shaded" object.
| virtual void A3DL::Texture::getTransparentKeycolor | ( | float & | r, | |
| float & | g, | |||
| float & | b | |||
| ) | [virtual] |
Get the color in the texture that is rendered as transparent If there is no property, sets (r, g, b) to (0, 0, 0).
- Todo:
- Throw NoSuchObjectError if there is no object-- need to disable keycolor if the texture image has an alpha channel.
| virtual void A3DL::Texture::getUVScaleAndShift | ( | float & | uscale, | |
| float & | vscale, | |||
| float & | ushift, | |||
| float & | vshift | |||
| ) | [virtual] |
| virtual const std::string A3DL::Texture::getVOSType | ( | ) | [virtual] |
- Returns:
- the specific VOS type name that represents the VOS interface this object is supplying. This should always be overridden by the subclass.
Reimplemented from VOS::MetaObject.
| static MetaObject* A3DL::Texture::new_Texture | ( | VOS::VobjectBase * | superobject, | |
| const std::string & | type | |||
| ) | [static] |
| virtual void A3DL::Texture::setAlpha | ( | double | a | ) | [virtual] |
Set alpha transparency of the texture.
- Parameters:
-
a A value between 0 (fully transparency) and 1 (no transparency). Some renderers may round to certain values (e.g. 1.0, 0.75, 0.5, 0.25, 0.0) If a is > 1, 1 will be used. If a < 0, 0 will be used.
| virtual void A3DL::Texture::setAlphaObj | ( | VOS::Property * | obj | ) | [virtual] |
Set alpha property object.
| virtual void A3DL::Texture::setBlendMode | ( | Material::BlendMode | mode | ) | [virtual] |
Set special blend mode.
These blend modes determine how the background affects the object's material.
| virtual void A3DL::Texture::setBlendModeObj | ( | VOS::Property * | p | ) | [virtual] |
Set blend mode property object.
| virtual void A3DL::Texture::setImage | ( | VOS::Property * | p | ) | [virtual] |
| virtual void A3DL::Texture::setImageData | ( | const std::string & | data, | |
| const std::string & | datatype | |||
| ) | [virtual] |
Set image data.
| virtual void A3DL::Texture::setImageToFile | ( | const std::string & | filename, | |
| const std::string & | datatype | |||
| ) | [virtual] |
Set a file backend for the image for this texture (using FileProperty).
- See also:
- FileProperty
- Exceptions:
-
FileAccessError if there is an error opening the file
| virtual void A3DL::Texture::setShaded | ( | bool | s | ) | [virtual] |
Set whether this layer should have shading.
| virtual void A3DL::Texture::setShadedObj | ( | VOS::Property * | obj | ) | [virtual] |
Set shaded property object.
| virtual void A3DL::Texture::setTransparentKeycolor | ( | float | r, | |
| float | g, | |||
| float | b | |||
| ) | [virtual] |
Set a color in the texture to be rendered transparent.
| virtual void A3DL::Texture::setUVScaleAndShift | ( | float | uscale, | |
| float | vscale, | |||
| float | ushift, | |||
| float | vshift | |||
| ) | [virtual] |
The documentation for this class was generated from the following file:
- /home/tetron/hack/vos/libs/vos/metaobjects/a3dl/texture.hh