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

Grid primitive that renders a two-sided grid (sides have different colors) More...

#include <Primitive.h>

Inheritance diagram for icl::geom::TwoSidedGridPrimitive:
icl::geom::Primitive

Public Member Functions

int getIdx (int x, int y) const
 
 TwoSidedGridPrimitive (int w, int h, const Vec *vertices, const Vec *normals=0, const GeomColor &frontColor=GeomColor(0, 100, 255, 255), const GeomColor &backColor=GeomColor(255, 0, 100, 255), const GeomColor &lineColor=GeomColor(0, 255, 100, 255), bool drawLines=false, bool drawQuads=true)
 
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...
 
const VecgetPos (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 Attributes

int w
 
int h
 
const Vecvertices
 
const Vecnormals
 
GeomColor front
 
GeomColor back
 
GeomColor lines
 
bool drawLines
 
bool drawQuads
 
- Public Attributes inherited from icl::geom::Primitive
Type type
 the primitive type More...
 
GeomColor color
 the color of this primitive 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

Grid primitive that renders a two-sided grid (sides have different colors)

Constructor & Destructor Documentation

◆ TwoSidedGridPrimitive()

icl::geom::TwoSidedGridPrimitive::TwoSidedGridPrimitive ( int  w,
int  h,
const Vec vertices,
const Vec normals = 0,
const GeomColor frontColor = GeomColor(0,100,255,255),
const GeomColor backColor = GeomColor(255,0,100,255),
const GeomColor lineColor = GeomColor(0,255,100,255),
bool  drawLines = false,
bool  drawQuads = true 
)
inline

Member Function Documentation

◆ copy()

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

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

Implements icl::geom::Primitive.

◆ getIdx()

int icl::geom::TwoSidedGridPrimitive::getIdx ( int  x,
int  y 
) const
inline

◆ getPos()

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

◆ render()

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

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

Implements icl::geom::Primitive.

Member Data Documentation

◆ back

GeomColor icl::geom::TwoSidedGridPrimitive::back

◆ drawLines

bool icl::geom::TwoSidedGridPrimitive::drawLines

◆ drawQuads

bool icl::geom::TwoSidedGridPrimitive::drawQuads

◆ front

GeomColor icl::geom::TwoSidedGridPrimitive::front

◆ h

int icl::geom::TwoSidedGridPrimitive::h

◆ lines

GeomColor icl::geom::TwoSidedGridPrimitive::lines

◆ normals

const Vec * icl::geom::TwoSidedGridPrimitive::normals

◆ vertices

const Vec* icl::geom::TwoSidedGridPrimitive::vertices

◆ w

int icl::geom::TwoSidedGridPrimitive::w

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