EffectTexture.h
1 //##################################################################################################
2 //
3 // Ceetron Desktop Components
4 // Component: Geometry
5 //
6 // --------------------------------------------------------------------------------------------
7 // Copyright (C) 2013, Ceetron AS
8 // This is UNPUBLISHED PROPRIETARY SOURCE CODE of Ceetron AS. The contents of this file may
9 // not be disclosed to third parties, copied or duplicated in any form, in whole or in part,
10 // without the prior written permission of Ceetron AS.
11 //##################################################################################################
12 
13 #pragma once
14 
15 #include "CeeCore/Color4f.h"
16 #include "CeeGeometry/Base.h"
17 #include "CeeGeometry/Effect.h"
18 
19 namespace cee {
20 class Image;
21 
22 namespace geo {
23 
24 
25 //==================================================================================================
26 //
27 //
28 //
29 //==================================================================================================
30 class CEE_GEO_EXPORT EffectTexture : public Effect
31 {
32 public:
35  {
39  MIRRORED_REPEAT
40  };
41 
44  {
50  LINEAR_MIPMAP_LINEAR
51  };
52 
53 public:
54  EffectTexture();
55  EffectTexture(const Image* textureImage);
56  virtual ~EffectTexture();
57 
58  virtual Type type() const;
59  virtual PtrRef<Effect> clone();
60 
61  static PtrRef<EffectTexture> createResultMapping(const Image* textureImage);
62 
63  const Image* image() const;
64  void setImage(const Image* textureImage);
65 
66  SamplerWrapMode samplerWrapMode() const;
67  void setSamplerWrapMode(SamplerWrapMode wrapMode);
68 
69  SamplerFilter samplerMinifyingFilter() const;
70  void setSamplerMinifyingFilter(SamplerFilter filterType);
71 
72  SamplerFilter samplerMagnificationFilter() const;
73  void setSamplerMagnificationFilter(SamplerFilter filterType);
74 
75  Color4f borderColor() const;
76  void setBorderColor(const Color4f& color);
77 
78  float ambientIntensity() const;
79  void setAmbientIntensity(float intensity);
80 
81  float specularIntensity() const;
82  void setSpecularIntensity(float intensity);
83 
84 private:
85  CEE_PRIVATE_IMPL(EffectTexture);
86  CEE_PRIVATE_F(GeometryModel);
87  CEE_PRIVATE_F(PartSettings);
88  CEE_PRIVATE_F(PartClassification);
89  CEE_PRIVATE_F(CvfPartIndexedPolylines);
90  CEE_PRIVATE_F(CvfPartPoints);
91  CEE_BASE_F(CvfPartTrianglesBase);
92  CEE_DISALLOW_COPY_AND_ASSIGN(EffectTexture);
93 };
94 
95 } // namespace geo
96 } // namespace cee
Stores an RGBA image with 8 bits per pixel.
Definition: Image.h:25
Part settings represents how to draw a part and it&#39;s associated part data.
Definition: PartSettings.h:29
SamplerFilter
Specifies the minifying and magnification filtering used when doing the texture mapping.
Definition: EffectTexture.h:43
Namespace cee contains all functionality and structures under the Core component. ...
Definition: AppComponent.cpp:26
Class for storing an RGBA color.
Definition: Color4f.h:25
Selects nearest MipMap level and performs linear filtering.
Definition: EffectTexture.h:48
Linear filtering on the base MipMap level. (Default magnification filter in OpenGL). Texture will look blurry when zoomed into.
Definition: EffectTexture.h:46
Effect describing the texture to be used when drawing the associated part data.
Definition: EffectTexture.h:30
The integer part of the coordinate will be ignored and a repeating pattern is formed.
Definition: EffectTexture.h:36
Smart pointer class used for handling reference counted objects (that derive from Object)...
Definition: PtrRef.h:26
SamplerWrapMode
Specifies what should happen to texture coordinates that are outside the 0 to 1 range.
Definition: EffectTexture.h:34
Selects nearest MipMap level and performs nearest neighbor filtering.
Definition: EffectTexture.h:47
Nearest neighbor filtering on the base MipMap level. Texture will look blocky when zoom into...
Definition: EffectTexture.h:45
Perform linear interpolation between MipMap levels and perform nearest neighbor filtering. (Default minifying filter in OpenGL).
Definition: EffectTexture.h:49
The texture coordinates will be clamped into the range 0 to 1.
Definition: EffectTexture.h:37
GeometryModel is a subclass of Model that can handle a large number of parts efficiently.
Definition: GeometryModel.h:36
Type
Enumerator for each of the available effect types.
Definition: Effect.h:32
Base class for an effect describing how to draw a part and it&#39;s associated part data.
Definition: Effect.h:28
The coordinates that fall outside the 0 to 1 range will be given the borderColor().
Definition: EffectTexture.h:38