|
Tissue Forge C++ 0.2.1
Interactive, particle-based physics, chemistry and biology modeling and simulation environment
|


Public Types | |
| enum | : UnsignedInt { ColorOutput = Magnum::Shaders::Generic3D::ColorOutput , ObjectIdOutput = Magnum::Shaders::Generic3D::ObjectIdOutput } |
| enum class | Flag : UnsignedShort { AmbientTexture = 1 << 0 , DiffuseTexture = 1 << 1 , SpecularTexture = 1 << 2 , NormalTexture = 1 << 4 , AlphaMask = 1 << 3 , VertexColor = 1 << 5 , Bitangent = 1 << 11 , TextureTransformation = 1 << 6 , ObjectId = 1 << 7 , InstancedObjectId = (1 << 8)|ObjectId , InstancedTransformation = 1 << 9 , InstancedTextureOffset = (1 << 10)|TextureTransformation } |
| Flag. More... | |
| typedef Magnum::Shaders::Generic3D::Position | Position |
| Vertex position. | |
| typedef Magnum::Shaders::Generic3D::Normal | Normal |
| Normal direction. | |
| typedef Magnum::Shaders::Generic3D::Tangent | Tangent |
| Tangent direction. | |
| typedef Magnum::Shaders::Generic3D::Tangent4 | Tangent4 |
| Tangent direction with a bitangent sign. | |
| typedef Magnum::Shaders::Generic3D::Bitangent | Bitangent |
| Bitangent direction. | |
| typedef Magnum::Shaders::Generic3D::TextureCoordinates | TextureCoordinates |
| 2D texture coordinates | |
| typedef Magnum::Shaders::Generic3D::Color3 | Color3 |
| Three-component vertex color. | |
| typedef Magnum::Shaders::Generic3D::Color4 | Color4 |
| Four-component vertex color. | |
| typedef Magnum::Shaders::Generic3D::ObjectId | ObjectId |
| (Instanced) object ID | |
| typedef Magnum::Shaders::Generic3D::TransformationMatrix | TransformationMatrix |
| (Instanced) transformation matrix | |
| typedef Magnum::Shaders::Generic3D::NormalMatrix | NormalMatrix |
| (Instanced) normal matrix | |
| typedef Magnum::Shaders::Generic3D::TextureOffset | TextureOffset |
| (Instanced) texture offset | |
| typedef Containers::EnumSet< Flag > | Flags |
| Flags. | |
Public Member Functions | |
| Phong (Flags flags={}, unsigned lightCount=1, unsigned clipPlaneCount=0) | |
| Constructor. | |
| Phong (NoCreateT) noexcept | |
| Construct without creating the underlying OpenGL object. | |
| Phong (const Phong &)=delete | |
| Copying is not allowed. | |
| Phong (Phong &&) noexcept=default | |
| Move constructor. | |
| Phong & | operator= (const Phong &)=delete |
| Copying is not allowed. | |
| Phong & | operator= (Phong &&) noexcept=default |
| Move assignment. | |
| Flags | flags () const |
| Flags. | |
| UnsignedInt | lightCount () const |
| Light count. | |
| Phong & | setAmbientColor (const Magnum::Color4 &color) |
| Set ambient color. | |
| Phong & | bindAmbientTexture (GL::Texture2D &texture) |
| Bind an ambient texture. | |
| Phong & | setDiffuseColor (const Magnum::Color4 &color) |
| Set diffuse color. | |
| Phong & | bindDiffuseTexture (GL::Texture2D &texture) |
| Bind a diffuse texture. | |
| Phong & | setNormalTextureScale (Float scale) |
| Set normal texture scale. | |
| Phong & | bindNormalTexture (GL::Texture2D &texture) |
| Bind a normal texture. | |
| Phong & | setSpecularColor (const Magnum::Color4 &color) |
| Set specular color. | |
| Phong & | bindSpecularTexture (GL::Texture2D &texture) |
| Bind a specular texture. | |
| Phong & | bindTextures (GL::Texture2D *ambient, GL::Texture2D *diffuse, GL::Texture2D *specular, GL::Texture2D *normal) |
| Bind textures. | |
| Phong & | setShininess (Float shininess) |
| Set shininess. | |
| Phong & | setAlphaMask (Float mask) |
| Set alpha mask value. | |
| Phong & | setObjectId (UnsignedInt id) |
| Set object ID. | |
| Phong & | setTransformationMatrix (const Matrix4 &matrix) |
| Set transformation matrix. | |
| Phong & | setNormalMatrix (const Matrix3x3 &matrix) |
| Set normal matrix. | |
| Phong & | setProjectionMatrix (const Matrix4 &matrix) |
| Set projection matrix. | |
| Phong & | setTextureMatrix (const Matrix3 &matrix) |
| Set texture coordinate transformation matrix. | |
| Phong & | setLightPositions (Containers::ArrayView< const Vector4 > positions) |
| Set light positions. | |
| Phong & | setLightPositions (std::initializer_list< Vector4 > positions) |
| Phong & | setLightPosition (UnsignedInt id, const Vector4 &position) |
| Set position for given light. | |
| Phong & | setclipPlaneEquation (UnsignedInt id, const Vector4 &position) |
| Set clip plane equation for given clip plane. | |
| Phong & | setLightColors (Containers::ArrayView< const Magnum::Color3 > colors) |
| Set light colors. | |
| Phong & | setLightColors (std::initializer_list< Magnum::Color3 > colors) |
| Phong & | setLightColor (UnsignedInt id, const Magnum::Color3 &color) |
| Set position for given light. | |
| Phong & | setLightSpecularColors (Containers::ArrayView< const Magnum::Color3 > colors) |
| Set light specular colors. | |
| Phong & | setLightSpecularColors (std::initializer_list< Magnum::Color3 > colors) |
| Phong & | setLightSpecularColor (UnsignedInt id, const Magnum::Color3 &color) |
| Set position for given light. | |
| Phong & | setLightRanges (Containers::ArrayView< const Float > ranges) |
| Set light attenuation ranges. | |
| Phong & | setLightRanges (std::initializer_list< Float > ranges) |
| Phong & | setLightRange (UnsignedInt id, Float range) |
| Set attenuation range for given light. | |
| unsigned | clipPlaneCount () const |
| anonymous enum : UnsignedInt |
|
strong |
Flag.
| Enumerator | |
|---|---|
| AmbientTexture | Multiply ambient color with a texture. |
| DiffuseTexture | Multiply diffuse color with a texture. |
| SpecularTexture | Multiply specular color with a texture. |
| NormalTexture | Modify normals according to a texture. |
| AlphaMask | Enable alpha masking. |
| VertexColor | Multiply diffuse color with a vertex color. |
| Bitangent | Use the separate Bitangent attribute for retrieving vertex bitangents. |
| TextureTransformation | Enable texture coordinate transformation. |
| ObjectId | Enable object ID output. |
| InstancedObjectId | Instanced object ID. |
| InstancedTransformation | Instanced transformation. |
| InstancedTextureOffset | Instanced texture offset. |
|
explicit |
Constructor.
| flags | Flags |
| lightCount | Count of light sources |
| Phong & TissueForge::shaders::Phong::bindAmbientTexture | ( | GL::Texture2D & | texture | ) |
Bind an ambient texture.
| Phong & TissueForge::shaders::Phong::bindDiffuseTexture | ( | GL::Texture2D & | texture | ) |
Bind a diffuse texture.
| Phong & TissueForge::shaders::Phong::bindNormalTexture | ( | GL::Texture2D & | texture | ) |
Bind a normal texture.
| Phong & TissueForge::shaders::Phong::bindSpecularTexture | ( | GL::Texture2D & | texture | ) |
Bind a specular texture.
| Phong & TissueForge::shaders::Phong::bindTextures | ( | GL::Texture2D * | ambient, |
| GL::Texture2D * | diffuse, | ||
| GL::Texture2D * | specular, | ||
| GL::Texture2D * | normal ) |
Bind textures.
| Phong & TissueForge::shaders::Phong::setAlphaMask | ( | Float | mask | ) |
Set alpha mask value.
| Phong & TissueForge::shaders::Phong::setAmbientColor | ( | const Magnum::Color4 & | color | ) |
Set ambient color.
| Phong & TissueForge::shaders::Phong::setclipPlaneEquation | ( | UnsignedInt | id, |
| const Vector4 & | position ) |
Set clip plane equation for given clip plane.
| Phong & TissueForge::shaders::Phong::setDiffuseColor | ( | const Magnum::Color4 & | color | ) |
Set diffuse color.
| Phong & TissueForge::shaders::Phong::setLightColor | ( | UnsignedInt | id, |
| const Magnum::Color3 & | color ) |
Set position for given light.
| Phong & TissueForge::shaders::Phong::setLightColors | ( | Containers::ArrayView< const Magnum::Color3 > | colors | ) |
Set light colors.
| Phong & TissueForge::shaders::Phong::setLightPosition | ( | UnsignedInt | id, |
| const Vector4 & | position ) |
Set position for given light.
| Phong & TissueForge::shaders::Phong::setLightPositions | ( | Containers::ArrayView< const Vector4 > | positions | ) |
Set light positions.
| Phong & TissueForge::shaders::Phong::setLightRange | ( | UnsignedInt | id, |
| Float | range ) |
Set attenuation range for given light.
| Phong & TissueForge::shaders::Phong::setLightRanges | ( | Containers::ArrayView< const Float > | ranges | ) |
Set light attenuation ranges.
| Phong & TissueForge::shaders::Phong::setLightSpecularColor | ( | UnsignedInt | id, |
| const Magnum::Color3 & | color ) |
Set position for given light.
| Phong & TissueForge::shaders::Phong::setLightSpecularColors | ( | Containers::ArrayView< const Magnum::Color3 > | colors | ) |
Set light specular colors.
| Phong & TissueForge::shaders::Phong::setNormalMatrix | ( | const Matrix3x3 & | matrix | ) |
Set normal matrix.
| Phong & TissueForge::shaders::Phong::setNormalTextureScale | ( | Float | scale | ) |
Set normal texture scale.
| Phong & TissueForge::shaders::Phong::setObjectId | ( | UnsignedInt | id | ) |
Set object ID.
| Phong & TissueForge::shaders::Phong::setProjectionMatrix | ( | const Matrix4 & | matrix | ) |
Set projection matrix.
| Phong & TissueForge::shaders::Phong::setShininess | ( | Float | shininess | ) |
Set shininess.
| Phong & TissueForge::shaders::Phong::setSpecularColor | ( | const Magnum::Color4 & | color | ) |
Set specular color.
| Phong & TissueForge::shaders::Phong::setTextureMatrix | ( | const Matrix3 & | matrix | ) |
Set texture coordinate transformation matrix.
| Phong & TissueForge::shaders::Phong::setTransformationMatrix | ( | const Matrix4 & | matrix | ) |
Set transformation matrix.