Image Component Library (ICL)
Public Member Functions | Public Attributes | List of all members
icl::geom::GenericTexturePrimitive Struct Reference

Texture Primitive for rendering textures with arbitrary texture coordinates. More...

#include <Primitive.h>

Inheritance diagram for icl::geom::GenericTexturePrimitive:
icl::geom::Primitive icl::geom::AlphaFuncProperty

Public Member Functions

ICLGeom_API GenericTexturePrimitive (const core::ImgBase *image, int numPoints, const float *xs, const float *ys, const float *zs, int xyzStride, const utils::Point32f *texCoords, const float *nxs=0, const float *nys=0, const float *nzs=0, int nxyzStride=1, bool createTextureOnce=true)
 Generic version, where the given values are copied deeply into the internal buffers for rendering. More...
 
ICLGeom_API GenericTexturePrimitive (const core::ImgBase *image, int numPoints, const int *vertexIndices, const utils::Point32f *texCoords, const int *normalIndices=0, bool createTextureOnce=true)
 less generic Constructor, that uses index-pointers for referencing vertices and normals of the parent SceneObject More...
 
virtual ICLGeom_API void render (const Primitive::RenderContext &ctx)
 virtual render method, which is called by the parent scene object More...
 
virtual Primitivecopy () const
 deep copy method More...
 
- 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 ()
 

Public Attributes

utils::SmartPtr< qt::GLImgtexture
 
const core::ImgBaseimage
 
std::vector< Vecps
 
std::vector< utils::Point32ftexCoords
 
std::vector< Vecnormals
 
std::vector< int > vertexIndices
 if these are given (size > 0), ps and normals are not used! More...
 
std::vector< int > normalIndices
 
- 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...
 

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...
 

Detailed Description

Texture Primitive for rendering textures with arbitrary texture coordinates.

Constructor & Destructor Documentation

◆ GenericTexturePrimitive() [1/2]

ICLGeom_API icl::geom::GenericTexturePrimitive::GenericTexturePrimitive ( const core::ImgBase image,
int  numPoints,
const float *  xs,
const float *  ys,
const float *  zs,
int  xyzStride,
const utils::Point32f texCoords,
const float *  nxs = 0,
const float *  nys = 0,
const float *  nzs = 0,
int  nxyzStride = 1,
bool  createTextureOnce = true 
)

Generic version, where the given values are copied deeply into the internal buffers for rendering.

◆ GenericTexturePrimitive() [2/2]

ICLGeom_API icl::geom::GenericTexturePrimitive::GenericTexturePrimitive ( const core::ImgBase image,
int  numPoints,
const int *  vertexIndices,
const utils::Point32f texCoords,
const int *  normalIndices = 0,
bool  createTextureOnce = true 
)

less generic Constructor, that uses index-pointers for referencing vertices and normals of the parent SceneObject

Member Function Documentation

◆ copy()

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

deep copy method

Implements icl::geom::Primitive.

◆ render()

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

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

Implements icl::geom::Primitive.

Member Data Documentation

◆ image

const core::ImgBase* icl::geom::GenericTexturePrimitive::image

◆ normalIndices

std::vector<int> icl::geom::GenericTexturePrimitive::normalIndices

◆ normals

std::vector<Vec> icl::geom::GenericTexturePrimitive::normals

◆ ps

std::vector<Vec> icl::geom::GenericTexturePrimitive::ps

◆ texCoords

std::vector<utils::Point32f> icl::geom::GenericTexturePrimitive::texCoords

◆ texture

utils::SmartPtr<qt::GLImg> icl::geom::GenericTexturePrimitive::texture

◆ vertexIndices

std::vector<int> icl::geom::GenericTexturePrimitive::vertexIndices

if these are given (size > 0), ps and normals are not used!


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