|
Open CASCADE Technology
6.7.1
|
This class allows the management of a 2D texture defined from a plane equation
Use the SetXXX() methods for positioning the texture as you want.
More...
#include <Graphic3d_Texture2Dplane.hxx>

Public Member Functions | |
| Graphic3d_Texture2Dplane (const TCollection_AsciiString &theFileName) | |
| Creates a texture from a file More... | |
| Graphic3d_Texture2Dplane (const Graphic3d_NameOfTexture2D theNOT) | |
| Creates a texture from a predefined texture name set. More... | |
| Graphic3d_Texture2Dplane (const Image_PixMap_Handle &thePixMap) | |
| Creates a texture from the pixmap. More... | |
| void | SetPlaneS (const Standard_ShortReal A, const Standard_ShortReal B, const Standard_ShortReal C, const Standard_ShortReal D) |
Defines the texture projection plane for texture coordinate S <br> default is <1.0, 0.0, 0.0, 0.0> | |
| void | SetPlaneT (const Standard_ShortReal A, const Standard_ShortReal B, const Standard_ShortReal C, const Standard_ShortReal D) |
Defines the texture projection plane for texture coordinate T <br> default is <0.0, 1.0, 0.0, 0.0> | |
| void | SetPlane (const Graphic3d_NameOfTexturePlane thePlane) |
Defines the texture projection plane for both S and T texture coordinate <br> default is NOTP_XY meaning: | |
| void | SetScaleS (const Standard_ShortReal theVal) |
Defines the texture scale for the S texture coordinate <br> much easier than recomputing the S plane equation | |
| void | SetScaleT (const Standard_ShortReal theVal) |
Defines the texture scale for the T texture coordinate <br> much easier than recompution the T plane equation | |
| void | SetTranslateS (const Standard_ShortReal theVal) |
Defines the texture translation for the S texture coordinate <br> you can obtain the same effect by modifying the S plane | |
| void | SetTranslateT (const Standard_ShortReal theVal) |
Defines the texture translation for the T texture coordinate <br> you can obtain the same effect by modifying the T plane | |
| void | SetRotation (const Standard_ShortReal theVal) |
Sets the rotation angle of the whole texture. <br> the same result might be achieved by recomputing the | |
| Graphic3d_NameOfTexturePlane | Plane () const |
Returns the current texture plane name or NOTP_UNKNOWN <br> when the plane is user defined. | |
| void | PlaneS (Standard_ShortReal &A, Standard_ShortReal &B, Standard_ShortReal &C, Standard_ShortReal &D) const |
| Returns the current texture plane S equation More... | |
| void | PlaneT (Standard_ShortReal &A, Standard_ShortReal &B, Standard_ShortReal &C, Standard_ShortReal &D) const |
| Returns the current texture plane T equation More... | |
| void | TranslateS (Standard_ShortReal &theVal) const |
| Returns the current texture S translation value More... | |
| void | TranslateT (Standard_ShortReal &theVal) const |
| Returns the current texture T translation value More... | |
| void | ScaleS (Standard_ShortReal &theVal) const |
| Returns the current texture S scale value More... | |
| void | ScaleT (Standard_ShortReal &theVal) const |
| Returns the current texture T scale value More... | |
| void | Rotation (Standard_ShortReal &theVal) const |
| Returns the current texture rotation angle More... | |
Public Member Functions inherited from Graphic3d_Texture2D | |
| Graphic3d_NameOfTexture2D | Name () const |
| Returns the name of the predefined textures or NOT_2D_UNKNOWN when the name is given as a filename. More... | |
Public Member Functions inherited from Graphic3d_TextureMap | |
| void | EnableSmooth () |
| enable texture smoothing More... | |
| Standard_Boolean | IsSmoothed () const |
| Returns TRUE if the texture is smoothed. More... | |
| void | DisableSmooth () |
| disable texture smoothing More... | |
| void | EnableModulate () |
| enable texture modulate mode. the image is modulate with the shading of the surface. More... | |
| void | DisableModulate () |
| disable texture modulate mode. the image is directly decal on the surface. More... | |
| Standard_Boolean | IsModulate () const |
| Returns TRUE if the texture is modulate. More... | |
| void | EnableRepeat () |
| use this methods if you want to enable texture repetition on your objects. More... | |
| void | DisableRepeat () |
| use this methods if you want to disable texture repetition on your objects. More... | |
| Standard_Boolean | IsRepeat () const |
| Returns TRUE if the texture repeat is enable. More... | |
| Graphic3d_LevelOfTextureAnisotropy | AnisoFilter () const |
| void | SetAnisoFilter (const Graphic3d_LevelOfTextureAnisotropy theLevel) |
Public Member Functions inherited from Graphic3d_TextureRoot | |
| void | Destroy () const |
| ~Graphic3d_TextureRoot () | |
| virtual Standard_Boolean | IsDone () const |
| Checks if a texture class is valid or not. More... | |
| const OSD_Path & | Path () const |
| Returns the full path of the defined texture. It could be empty path if GetImage() is overridden to load image not from file. More... | |
| Graphic3d_TypeOfTexture | Type () const |
| const TCollection_AsciiString & | GetId () const |
| This ID will be used to manage resource in graphic driver. . Default implementation generates unique ID although inheritors may re-initialize it. . Multiple Graphic3d_TextureRoot instancies with same ID will be treated as single texture with different parameters to optimize memory usage though this will be more natural to use same instance of Graphic3d_TextureRoot when possible. . Notice that inheritor may set this ID to empty string. In this case independent graphical resource will be created for each instance of Graphic3d_AspectFillArea3d where texture will be used. . More... | |
| virtual Image_PixMap_Handle | GetImage () const |
| This method will be called by graphic driver each time when texture resource should be created. Default constructors allow defining the texture source as path to texture image or directly as pixmap. If the source is defined as path, then the image will be dynamically loaded when this method is called (and no copy will be preserved in this class instance). Inheritors may dynamically generate the image. Notice, image data should be in Bottom-Up order (see Image_PixMap::IsTopDown())! More... | |
| const Handle_Graphic3d_TextureParams & | GetParams () const |
Public Member Functions inherited from MMgt_TShared | |
| virtual void | Delete () const |
| Memory deallocator for transient classes. More... | |
Public Member Functions inherited from Standard_Transient | |
| Standard_Transient () | |
| Empty constructor. More... | |
| Standard_Transient (const Standard_Transient &) | |
| Copy constructor – does nothing. More... | |
| Standard_Transient & | operator= (const Standard_Transient &) |
| Assignment operator, needed to avoid copying reference counter. More... | |
| virtual | ~Standard_Transient () |
| Destructor must be virtual. More... | |
| virtual void | ShallowDump (Standard_OStream &) const |
| virtual const Handle_Standard_Type & | DynamicType () const |
| Returns a type information object about this object. More... | |
| Standard_Boolean | IsInstance (const Handle_Standard_Type &theType) const |
| Returns a true value if this is an instance of Type. More... | |
| Standard_Boolean | IsInstance (const Standard_CString theTypeName) const |
| Returns a true value if this is an instance of TypeName. More... | |
| Standard_Boolean | IsKind (const Handle_Standard_Type &theType) const |
| Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
| Standard_Boolean | IsKind (const Standard_CString theTypeName) const |
| Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism. More... | |
| virtual Handle_Standard_Transient | This () const |
| Returns a Handle which references this object. Must never be called to objects created in stack. More... | |
| Standard_Integer | GetRefCount () const |
| Get the reference counter of this object. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from Graphic3d_Texture2D | |
| static Standard_Integer | NumberOfTextures () |
| Returns the number of predefined textures. More... | |
| static TCollection_AsciiString | TextureName (const Standard_Integer theRank) |
| Returns the name of the predefined texture of rank <aRank> More... | |
Static Public Member Functions inherited from Graphic3d_TextureRoot | |
| static TCollection_AsciiString | TexturesFolder () |
| The path to textures determined from CSF_MDTVTexturesDirectory or CASROOT environment variables. More... | |
Protected Member Functions inherited from Graphic3d_Texture2D | |
| Graphic3d_Texture2D (const TCollection_AsciiString &theFileName, const Graphic3d_TypeOfTexture theType) | |
| Graphic3d_Texture2D (const Graphic3d_NameOfTexture2D theName, const Graphic3d_TypeOfTexture theType) | |
| Graphic3d_Texture2D (const Image_PixMap_Handle &thePixMap, const Graphic3d_TypeOfTexture theType) | |
Protected Member Functions inherited from Graphic3d_TextureMap | |
| Graphic3d_TextureMap (const TCollection_AsciiString &theFileName, const Graphic3d_TypeOfTexture theType) | |
| Graphic3d_TextureMap (const Image_PixMap_Handle &thePixMap, const Graphic3d_TypeOfTexture theType) | |
Protected Member Functions inherited from Graphic3d_TextureRoot | |
| Graphic3d_TextureRoot (const TCollection_AsciiString &theFileName, const Graphic3d_TypeOfTexture theType) | |
Creates a texture from a file <br> Warning: Note that if <FileName> is NULL the texture must be realized | |
| Graphic3d_TextureRoot (const Image_PixMap_Handle &thePixmap, const Graphic3d_TypeOfTexture theType) | |
Creates a texture from pixmap. <br> Please note that the implementation expects the image data | |
Protected Attributes inherited from Graphic3d_TextureRoot | |
| Handle_Graphic3d_TextureParams | myParams |
| TCollection_AsciiString | myTexId |
| Image_PixMap_Handle | myPixMap |
| OSD_Path | myPath |
This class allows the management of a 2D texture defined from a plane equation
Use the SetXXX() methods for positioning the texture as you want.
| Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane | ( | const TCollection_AsciiString & | theFileName | ) |
Creates a texture from a file
| Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane | ( | const Graphic3d_NameOfTexture2D | theNOT | ) |
Creates a texture from a predefined texture name set.
| Graphic3d_Texture2Dplane::Graphic3d_Texture2Dplane | ( | const Image_PixMap_Handle & | thePixMap | ) |
Creates a texture from the pixmap.
| Graphic3d_NameOfTexturePlane Graphic3d_Texture2Dplane::Plane | ( | ) | const |
Returns the current texture plane name or NOTP_UNKNOWN <br>
when the plane is user defined.
| void Graphic3d_Texture2Dplane::PlaneS | ( | Standard_ShortReal & | A, |
| Standard_ShortReal & | B, | ||
| Standard_ShortReal & | C, | ||
| Standard_ShortReal & | D | ||
| ) | const |
Returns the current texture plane S equation
| void Graphic3d_Texture2Dplane::PlaneT | ( | Standard_ShortReal & | A, |
| Standard_ShortReal & | B, | ||
| Standard_ShortReal & | C, | ||
| Standard_ShortReal & | D | ||
| ) | const |
Returns the current texture plane T equation
| void Graphic3d_Texture2Dplane::Rotation | ( | Standard_ShortReal & | theVal | ) | const |
Returns the current texture rotation angle
| void Graphic3d_Texture2Dplane::ScaleS | ( | Standard_ShortReal & | theVal | ) | const |
Returns the current texture S scale value
| void Graphic3d_Texture2Dplane::ScaleT | ( | Standard_ShortReal & | theVal | ) | const |
Returns the current texture T scale value
| void Graphic3d_Texture2Dplane::SetPlane | ( | const Graphic3d_NameOfTexturePlane | thePlane | ) |
Defines the texture projection plane for both S and T texture coordinate <br>
default is NOTP_XY meaning:
<1.0, 0.0, 0.0, 0.0> for S
and <0.0, 1.0, 0.0, 0.0> for T
| void Graphic3d_Texture2Dplane::SetPlaneS | ( | const Standard_ShortReal | A, |
| const Standard_ShortReal | B, | ||
| const Standard_ShortReal | C, | ||
| const Standard_ShortReal | D | ||
| ) |
Defines the texture projection plane for texture coordinate S <br>
default is <1.0, 0.0, 0.0, 0.0>
| void Graphic3d_Texture2Dplane::SetPlaneT | ( | const Standard_ShortReal | A, |
| const Standard_ShortReal | B, | ||
| const Standard_ShortReal | C, | ||
| const Standard_ShortReal | D | ||
| ) |
Defines the texture projection plane for texture coordinate T <br>
default is <0.0, 1.0, 0.0, 0.0>
| void Graphic3d_Texture2Dplane::SetRotation | ( | const Standard_ShortReal | theVal | ) |
Sets the rotation angle of the whole texture. <br>
the same result might be achieved by recomputing the
S and T plane equation but it's not the easiest way...
the angle is expressed in degrees
default is 0.0
| void Graphic3d_Texture2Dplane::SetScaleS | ( | const Standard_ShortReal | theVal | ) |
Defines the texture scale for the S texture coordinate <br>
much easier than recomputing the S plane equation
but the result is the same
default to 1.0
| void Graphic3d_Texture2Dplane::SetScaleT | ( | const Standard_ShortReal | theVal | ) |
Defines the texture scale for the T texture coordinate <br>
much easier than recompution the T plane equation
but the result is the same
default to 1.0
| void Graphic3d_Texture2Dplane::SetTranslateS | ( | const Standard_ShortReal | theVal | ) |
Defines the texture translation for the S texture coordinate <br>
you can obtain the same effect by modifying the S plane
equation but its not easier.
default to 0.0
| void Graphic3d_Texture2Dplane::SetTranslateT | ( | const Standard_ShortReal | theVal | ) |
Defines the texture translation for the T texture coordinate <br>
you can obtain the same effect by modifying the T plane
equation but its not easier.
default to 0.0
| void Graphic3d_Texture2Dplane::TranslateS | ( | Standard_ShortReal & | theVal | ) | const |
Returns the current texture S translation value
| void Graphic3d_Texture2Dplane::TranslateT | ( | Standard_ShortReal & | theVal | ) | const |
Returns the current texture T translation value
1.8.5