Image Component Library (ICL)
Public Member Functions | Protected Attributes | Friends | List of all members
icl::geom::TextureGridPrimitive Class Reference

Special texture Primitive for single textures spread over a regular grid of vertices. More...

#include <Primitive.h>

Inheritance diagram for icl::geom::TextureGridPrimitive:
icl::geom::Primitive icl::geom::AlphaFuncProperty icl::geom::TwoSidedTextureGridPrimitive

Public Member Functions

 TextureGridPrimitive (int w, int h, const core::ImgBase *image, const icl32f *px, const icl32f *py, const icl32f *pz, const icl32f *pnx=0, const icl32f *pny=0, const icl32f *pnz=0, int stride=1, bool createTextureOnce=true, core::scalemode sm=core::interpolateLIN)
 
virtual ICLGeom_API void render (const Primitive::RenderContext &ctx)
 virtual render method, which is called by the parent scene object More...
 
virtual Primitivecopy () const
 must be implemented in order to obtain a deep and independent copy More...
 
ICLGeom_API void getAABB (utils::Range32f aabb[3])
 
Vec getPos (int x, int y) const
 
- Public Member Functions inherited from icl::geom::Primitive
 Primitive (Type type=nothing, const GeomColor &color=GeomColor(255, 255, 255, 255))
 Default constructor. More...
 
virtual ~Primitive ()
 virtual, but empty destructor More...
 
- Public Member Functions inherited from icl::geom::AlphaFuncProperty
ICLGeom_API AlphaFuncProperty ()
 base constructor setting up to GL_GREATER 0.1 More...
 
 AlphaFuncProperty (int alphaFunc, float alphaValue)
 
void setAlphaFunc (int func, float value)
 used for setting up the alpha func, that is used to render this texture primitive More...
 
ICLGeom_API void restoreAlphaDefaults ()
 

Protected Attributes

int w
 
int h
 
qt::GLImg texture
 
const icl32fpx
 
const icl32fpy
 
const icl32fpz
 
const icl32fpnx
 
const icl32fpny
 
const icl32fpnz
 
int stride
 
const core::ImgBaseimage
 

Friends

class SceneObject
 

Additional Inherited Members

- Public Types inherited from icl::geom::Primitive
enum  Type {
  vertex = 1<<0, line = 1<<1, triangle = 1<<2, quad = 1<<3,
  polygon = 1<<4, texture = 1<<5, text = 1<<6, nothing = 1<<7,
  custom = 1<<20, PRIMITIVE_TYPE_COUNT = 8, all = (1<<PRIMITIVE_TYPE_COUNT)-1, faces = triangle | quad | polygon | texture | text
}
 primitive type for dynamic handling of different primitives More...
 
- Public Attributes inherited from icl::geom::Primitive
Type type
 the primitive type More...
 
GeomColor color
 the color of this primitive More...
 
- Public Attributes inherited from icl::geom::AlphaFuncProperty
int alphaFunc
 < used for glAlphaFunc call glAlphaFunc((GLenum)alphaFunc,alphaValue) More...
 
float alphaValue
 < used for glAlphaFunc call glAlphaFunc((GLenum)alphaFunc,alphaValue) More...
 

Detailed Description

Special texture Primitive for single textures spread over a regular grid of vertices.

For more details look at ICLQt's icl::GLImg::drawToGrid method

Constructor & Destructor Documentation

◆ TextureGridPrimitive()

icl::geom::TextureGridPrimitive::TextureGridPrimitive ( int  w,
int  h,
const core::ImgBase image,
const icl32f px,
const icl32f py,
const icl32f pz,
const icl32f pnx = 0,
const icl32f pny = 0,
const icl32f pnz = 0,
int  stride = 1,
bool  createTextureOnce = true,
core::scalemode  sm = core::interpolateLIN 
)
inline

Member Function Documentation

◆ copy()

virtual Primitive* icl::geom::TextureGridPrimitive::copy ( ) const
inlinevirtual

must be implemented in order to obtain a deep and independent copy

Implements icl::geom::Primitive.

◆ getAABB()

ICLGeom_API void icl::geom::TextureGridPrimitive::getAABB ( utils::Range32f  aabb[3])

◆ getPos()

Vec icl::geom::TextureGridPrimitive::getPos ( int  x,
int  y 
) const
inline

◆ render()

virtual ICLGeom_API void icl::geom::TextureGridPrimitive::render ( const Primitive::RenderContext ctx)
virtual

virtual render method, which is called by the parent scene object

Implements icl::geom::Primitive.

Reimplemented in icl::geom::TwoSidedTextureGridPrimitive.

Friends And Related Function Documentation

◆ SceneObject

friend class SceneObject
friend

Member Data Documentation

◆ h

int icl::geom::TextureGridPrimitive::h
protected

◆ image

const core::ImgBase* icl::geom::TextureGridPrimitive::image
protected

◆ pnx

const icl32f * icl::geom::TextureGridPrimitive::pnx
protected

◆ pny

const icl32f * icl::geom::TextureGridPrimitive::pny
protected

◆ pnz

const icl32f * icl::geom::TextureGridPrimitive::pnz
protected

◆ px

const icl32f* icl::geom::TextureGridPrimitive::px
protected

◆ py

const icl32f * icl::geom::TextureGridPrimitive::py
protected

◆ pz

const icl32f * icl::geom::TextureGridPrimitive::pz
protected

◆ stride

int icl::geom::TextureGridPrimitive::stride
protected

◆ texture

qt::GLImg icl::geom::TextureGridPrimitive::texture
protected

◆ w

int icl::geom::TextureGridPrimitive::w
protected

The documentation for this class was generated from the following file: