uses
NameOfTextureEnv from Graphic3d,
- AsciiString from TCollection
+ AsciiString from TCollection,
+ PixMap_Handle from Image
raises
Create (theName : NameOfTextureEnv from Graphic3d) returns TextureEnv from Graphic3d;
---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;
---Purpose:
-- Returns the name of the predefined textures or NOT_ENV_UNKNOWN
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
// purpose :