mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-04-21 10:13:43 +03:00
0025931: Visualization - Possibility to initialize an environment texture by Image_PixMap instance
This commit is contained in:
parent
c4af16fbf3
commit
1a6751b196
@ -23,7 +23,8 @@ inherits TextureRoot from Graphic3d
|
|||||||
uses
|
uses
|
||||||
|
|
||||||
NameOfTextureEnv from Graphic3d,
|
NameOfTextureEnv from Graphic3d,
|
||||||
AsciiString from TCollection
|
AsciiString from TCollection,
|
||||||
|
PixMap_Handle from Image
|
||||||
|
|
||||||
raises
|
raises
|
||||||
|
|
||||||
@ -37,6 +38,9 @@ is
|
|||||||
Create (theName : NameOfTextureEnv from Graphic3d) returns TextureEnv from Graphic3d;
|
Create (theName : NameOfTextureEnv from Graphic3d) returns TextureEnv from Graphic3d;
|
||||||
---Purpose: Creates an environment texture from a predefined texture name set.
|
---Purpose: Creates an environment texture from a predefined texture name set.
|
||||||
|
|
||||||
|
Create (thePixMap : PixMap_Handle from Image) returns TextureEnv from Graphic3d;
|
||||||
|
---Purpose: Creates an environment texture from the pixmap.
|
||||||
|
|
||||||
Name (me) returns NameOfTextureEnv from Graphic3d;
|
Name (me) returns NameOfTextureEnv from Graphic3d;
|
||||||
---Purpose:
|
---Purpose:
|
||||||
-- Returns the name of the predefined textures or NOT_ENV_UNKNOWN
|
-- Returns the name of the predefined textures or NOT_ENV_UNKNOWN
|
||||||
|
@ -64,6 +64,20 @@ Graphic3d_TextureEnv::Graphic3d_TextureEnv (const Graphic3d_NameOfTextureEnv the
|
|||||||
Graphic3d_Vec4 (0.0f, 1.0f, 0.0f, 0.0f));
|
Graphic3d_Vec4 (0.0f, 1.0f, 0.0f, 0.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// =======================================================================
|
||||||
|
// function : Graphic3d_TextureEnv
|
||||||
|
// purpose :
|
||||||
|
// =======================================================================
|
||||||
|
Graphic3d_TextureEnv::Graphic3d_TextureEnv (const Handle(Image_PixMap)& thePixMap)
|
||||||
|
: Graphic3d_TextureRoot (thePixMap, Graphic3d_TOT_2D_MIPMAP),
|
||||||
|
myName (Graphic3d_NOT_ENV_UNKNOWN)
|
||||||
|
{
|
||||||
|
myParams->SetFilter (Graphic3d_TOTF_TRILINEAR);
|
||||||
|
myParams->SetGenMode (Graphic3d_TOTM_SPHERE,
|
||||||
|
Graphic3d_Vec4 (1.0f, 0.0f, 0.0f, 0.0f),
|
||||||
|
Graphic3d_Vec4 (0.0f, 1.0f, 0.0f, 0.0f));
|
||||||
|
}
|
||||||
|
|
||||||
// =======================================================================
|
// =======================================================================
|
||||||
// function : Name
|
// function : Name
|
||||||
// purpose :
|
// purpose :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user