Nix (Dev) 3.5.10
dev - 3.5.10 - 1af9301
Loading...
Searching...
No Matches
CGraphicsRect Class Reference

#include <CGraphicsRect.hpp>

Inheritance diagram for CGraphicsRect:
[legend]
Collaboration diagram for CGraphicsRect:
[legend]

Public Types

enum class  EDashedLineType { Continuous , Dashed4_2 }
 
enum class  EDetailLevel { Low , Normal , High , VeryHigh }
 
enum class  EDrawSolidType { Smooth , Solid , Wire }
 
enum class  ELight { General , Light0 }
 
enum class  ELightType { Ambient , Diffuse , Specular }
 
enum class  EMatrixModel { ModelView , Projection }
 

Public Member Functions

 CGraphicsRect ()
 
 CGraphicsRect (const CGraphicsRect &)=delete
 
 ~CGraphicsRect () override
 
CGraphicsRectoperator= (const CGraphicsRect &)=delete
 
 CGraphicsRect (IGraphics *graphics)
 
CLimitsgetLimits () const
 
bool getLimits (double *xMin, double *yMin, double *zMin, double *xMax, double *yMax, double *zMax) const
 
void scale (double sx, double sy, double sz) override
 

Static Public Attributes

static constexpr uint32_t BlockNull = UINT_MAX
 

Private Member Functions

void setBackGroundColor (iv::types::color rgb) override
 
void setClearColor () override
 
void initDevice () override
 
void initLight () override
 
void clear () override
 
void defineMaterial (const iv::ui::graphics::Material *material, const bool &isChanged) override
 
bool isDefinedMaterial (const std::string &materialName) override
 
void pushMaterial () override
 
void setMaterial (const std::string &layerName) override
 
void popMaterial () override
 
void setColorRGB (iv::types::color rgb) override
 
void setColorARGB (iv::types::color argb) override
 
void setLineWidth (float width) override
 
void setAlpha (float alpha) override
 
void resetAlpha () override
 
void setOnTexture (bool enableTexture) override
 
std::shared_ptr< iv::ui::graphics::ImageloadImage (const iv::ui::resources::ImageResource &resource) override
 
void appendMatrix (const CMatrix4x4 &matrix) override
 
void setModelMatrix (IGraphics::EMatrixModel matrixModel) override
 
void popTransformation () override
 
void pushTransformation () override
 
void resetTransformation () override
 
void defineLight (IGraphics::ELight light, IGraphics::ELightType lightType, double rColor, double gColor, double bColor) override
 
void positionLight (IGraphics::ELight light, double x, double y, double z) override
 
void viewport (int32_t x, int32_t y, uint64_t sizeX, uint64_t sizeY) override
 
void definePerspective (double fovy, double ratioXForY, double zNear, double zFar) override
 
void defineOrthogonal (double xOrg, double yOrg, double zOrg, double xMin, double yMin, double zMin, double xMax, double yMax, double zMax) override
 
void positionCamera (double eyeX, double eyeY, double eyeZ, double pointReferenceX, double pointReferenceY, double pointReferenceZ, double upX, double upY, double upZ) override
 
void rotation (double angleDegrees, double Ux, double Uy, double Uz) override
 
void setNormal (double Nx, double Ny, double Nz) override
 
void translation (double tx, double ty, double tz) override
 
void drawContours (const std::vector< std::shared_ptr< std::vector< iv::math::geometry::Point3d > > > &contours) override
 
void drawFanTriangles (const float *points, const float *normals, const float *textureOpt, const float *rgbaOpt, uint64_t numPoints, const uint32_t *indVertex, uint64_t numVertex) override
 
void drawImage (double x, double y, double width, double height, const iv::ui::resources::ImageResource &resource) override
 
void drawImageRawSize (double x, double y, const iv::ui::resources::ImageResource &resource) override
 
void drawImageWithColor (double x, double y, iv::types::color colorRGB, double width, double height, const iv::ui::resources::ImageResource &resource) override
 
void drawLine (double x1, double y1, double z1, double x2, double y2, double z2) override
 
void drawLineWithStyle (double x1, double y1, double z1, double x2, double y2, double z2, IGraphics::EDashedLineType dashedLineType) override
 
void drawArc (double radiusMark, iv::types::radian angleInitial, iv::types::radian angleFinal, float thickness, uint64_t kPrvNumPoints) override
 
void drawPolyline (const float *vertex, uint64_t numVertex) override
 
void drawPolylineFilled (const float *vertex, uint64_t numVertex) override
 
void drawPolylinesWithColors (const std::shared_ptr< std::vector< iv::math::geometry::Point2d > > &points, const std::vector< iv::math::geometry::Point3d > &rgb) override
 
void drawQuads (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3, double x4, double y4, double z4) override
 
void drawRect (double x1, double y1, double x2, double y2) override
 
void drawRectFilled (double x1, double y1, double x2, double y2) override
 
void drawStripTriangles (const float *points, const float *normals, const float *textureOpt, const float *rgbaOpt, uint64_t numPoints, const uint32_t *indVertex, uint64_t numVertex) override
 
void drawText (const std::string &text, double x, double y, double height, unsigned char justify) override
 
void drawTextWithDeviceHeight (const std::string &text, double x, double y, double height, unsigned char justify) override
 
void drawTriangle (double x1, double y1, double z1, double x2, double y2, double z2, double x3, double y3, double z3) override
 
void drawTriangles (const float *points, const float *normals, const float *textureOpt, const float *rgbaOpt, uint64_t numPoints, const uint32_t *indVertex, uint64_t numVertex) override
 
void drawUnitCone (IGraphics::EDetailLevel detailLevel) override
 
void drawUnitCube () override
 
void drawUnitCylinder (IGraphics::EDetailLevel detailLevel) override
 
void drawUnitDisk (IGraphics::EDetailLevel detailLevel) override
 
void drawUnitSphere (IGraphics::EDetailLevel detailLevel) override
 
bool hasDrawPolylineFilled () const override
 
void setModeDraw (IGraphics::EDrawSolidType drawSolidType) override
 
uint32_t blockTextWithModifiers (const std::string &text, const iv::ui::TextModifier &textModifier, double *widthText, double *heightTextOut) override
 
void drawBlockText (uint32_t idBlockText, double x, double y, double widthText, double heightText, unsigned char justify) override
 
void endBlockText (uint32_t *idBlockText) override
 
bool hasBlockText () const override
 
uint32_t beginBlock () override
 
void drawBlock (uint32_t idBlock) override
 
void endBlock (uint32_t idBlock) override
 
bool hasManagerBlocks () const override
 
void removeBlock (uint32_t *idBlock) override
 
void beginStencilBuffer () override
 
void endStencilBuffer () override
 
void offStencilBuffer () override
 
void onStencilBuffer () override
 
void getCoordTextCornerLeftDown (const std::string &text, double x, double y, double heightCharacter, unsigned char justify, double *xCornerLeftDown, double *yCornerLeftDown, double *widthTextOpt, double *heightTextOpt) override
 
void getSizePixelToWorld (double sizePixelX, double sizePixelY, double *sizeWorldXOpt, double *sizeWorldYOpt) override
 
void getSizeText (const std::string &text, double heightCharacter, double *widthText, double *heightText) override
 
void setBlend (bool isEnable) override
 
void setTestDepth (bool isEnable) override
 

Private Attributes

CLimitsm_limits {}
 
bool m_hasDelete
 
IGraphicsm_graphicsDestinyOpt {}
 
CStackTransformation m_stackTransformation {}
 

Member Enumeration Documentation

◆ EDashedLineType

enum class IGraphics::EDashedLineType
stronginherited
Enumerator
Continuous 
Dashed4_2 

◆ EDetailLevel

enum class IGraphics::EDetailLevel
stronginherited
Enumerator
Low 
Normal 
High 
VeryHigh 

◆ EDrawSolidType

enum class IGraphics::EDrawSolidType
stronginherited
Enumerator
Smooth 
Solid 
Wire 

◆ ELight

enum class IGraphics::ELight
stronginherited
Enumerator
General 
Light0 

◆ ELightType

enum class IGraphics::ELightType
stronginherited
Enumerator
Ambient 
Diffuse 
Specular 

◆ EMatrixModel

enum class IGraphics::EMatrixModel
stronginherited
Enumerator
ModelView 
Projection 

Constructor & Destructor Documentation

◆ CGraphicsRect() [1/3]

CGraphicsRect::CGraphicsRect ( )

◆ CGraphicsRect() [2/3]

CGraphicsRect::CGraphicsRect ( const CGraphicsRect & )
delete

◆ ~CGraphicsRect()

CGraphicsRect::~CGraphicsRect ( )
override

◆ CGraphicsRect() [3/3]

CGraphicsRect::CGraphicsRect ( IGraphics * graphics)
explicit

Member Function Documentation

◆ appendMatrix()

void CGraphicsRect::appendMatrix ( const CMatrix4x4 & matrix)
overrideprivatevirtual

Implements IGraphics.

◆ beginBlock()

uint32_t CGraphicsRect::beginBlock ( )
overrideprivatevirtual

Implements IGraphics.

◆ beginStencilBuffer()

void CGraphicsRect::beginStencilBuffer ( )
overrideprivatevirtual

Implements IGraphics.

◆ blockTextWithModifiers()

uint32_t CGraphicsRect::blockTextWithModifiers ( const std::string & text,
const iv::ui::TextModifier & textModifier,
double * widthText,
double * heightTextOut )
overrideprivatevirtual

Implements IGraphics.

◆ clear()

void CGraphicsRect::clear ( )
overrideprivatevirtual

Implements IGraphics.

◆ defineLight()

void CGraphicsRect::defineLight ( IGraphics::ELight light,
IGraphics::ELightType lightType,
double rColor,
double gColor,
double bColor )
overrideprivatevirtual

Implements IGraphics.

◆ defineMaterial()

void CGraphicsRect::defineMaterial ( const iv::ui::graphics::Material * material,
const bool & isChanged )
overrideprivatevirtual

Implements IGraphics.

◆ defineOrthogonal()

void CGraphicsRect::defineOrthogonal ( double xOrg,
double yOrg,
double zOrg,
double xMin,
double yMin,
double zMin,
double xMax,
double yMax,
double zMax )
overrideprivatevirtual

Implements IGraphics.

◆ definePerspective()

void CGraphicsRect::definePerspective ( double fovy,
double ratioXForY,
double zNear,
double zFar )
overrideprivatevirtual

Implements IGraphics.

◆ drawArc()

void CGraphicsRect::drawArc ( double radiusMark,
iv::types::radian angleInitial,
iv::types::radian angleFinal,
float thickness,
uint64_t kPrvNumPoints )
overrideprivatevirtual

Implements IGraphics.

◆ drawBlock()

void CGraphicsRect::drawBlock ( uint32_t idBlock)
overrideprivatevirtual

Implements IGraphics.

◆ drawBlockText()

void CGraphicsRect::drawBlockText ( uint32_t idBlockText,
double x,
double y,
double widthText,
double heightText,
unsigned char justify )
overrideprivatevirtual

Implements IGraphics.

◆ drawContours()

void CGraphicsRect::drawContours ( const std::vector< std::shared_ptr< std::vector< iv::math::geometry::Point3d > > > & contours)
overrideprivatevirtual

Implements IGraphics.

◆ drawFanTriangles()

void CGraphicsRect::drawFanTriangles ( const float * points,
const float * normals,
const float * textureOpt,
const float * rgbaOpt,
uint64_t numPoints,
const uint32_t * indVertex,
uint64_t numVertex )
overrideprivatevirtual

Implements IGraphics.

◆ drawImage()

void CGraphicsRect::drawImage ( double x,
double y,
double width,
double height,
const iv::ui::resources::ImageResource & resource )
overrideprivatevirtual

Implements IGraphics.

◆ drawImageRawSize()

void CGraphicsRect::drawImageRawSize ( double x,
double y,
const iv::ui::resources::ImageResource & resource )
overrideprivatevirtual

Implements IGraphics.

◆ drawImageWithColor()

void CGraphicsRect::drawImageWithColor ( double x,
double y,
iv::types::color colorRGB,
double width,
double height,
const iv::ui::resources::ImageResource & resource )
overrideprivatevirtual

Implements IGraphics.

◆ drawLine()

void CGraphicsRect::drawLine ( double x1,
double y1,
double z1,
double x2,
double y2,
double z2 )
overrideprivatevirtual

Implements IGraphics.

◆ drawLineWithStyle()

void CGraphicsRect::drawLineWithStyle ( double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
IGraphics::EDashedLineType dashedLineType )
overrideprivatevirtual

Implements IGraphics.

◆ drawPolyline()

void CGraphicsRect::drawPolyline ( const float * vertex,
uint64_t numVertex )
overrideprivatevirtual

Implements IGraphics.

◆ drawPolylineFilled()

void CGraphicsRect::drawPolylineFilled ( const float * vertex,
uint64_t numVertex )
overrideprivatevirtual

Implements IGraphics.

◆ drawPolylinesWithColors()

void CGraphicsRect::drawPolylinesWithColors ( const std::shared_ptr< std::vector< iv::math::geometry::Point2d > > & points,
const std::vector< iv::math::geometry::Point3d > & rgb )
overrideprivatevirtual

Implements IGraphics.

◆ drawQuads()

void CGraphicsRect::drawQuads ( double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double x3,
double y3,
double z3,
double x4,
double y4,
double z4 )
overrideprivatevirtual

Implements IGraphics.

◆ drawRect()

void CGraphicsRect::drawRect ( double x1,
double y1,
double x2,
double y2 )
overrideprivatevirtual

Implements IGraphics.

◆ drawRectFilled()

void CGraphicsRect::drawRectFilled ( double x1,
double y1,
double x2,
double y2 )
overrideprivatevirtual

Implements IGraphics.

◆ drawStripTriangles()

void CGraphicsRect::drawStripTriangles ( const float * points,
const float * normals,
const float * textureOpt,
const float * rgbaOpt,
uint64_t numPoints,
const uint32_t * indVertex,
uint64_t numVertex )
overrideprivatevirtual

Implements IGraphics.

◆ drawText()

void CGraphicsRect::drawText ( const std::string & text,
double x,
double y,
double height,
unsigned char justify )
overrideprivatevirtual

Implements IGraphics.

◆ drawTextWithDeviceHeight()

void CGraphicsRect::drawTextWithDeviceHeight ( const std::string & text,
double x,
double y,
double height,
unsigned char justify )
overrideprivatevirtual

Implements IGraphics.

◆ drawTriangle()

void CGraphicsRect::drawTriangle ( double x1,
double y1,
double z1,
double x2,
double y2,
double z2,
double x3,
double y3,
double z3 )
overrideprivatevirtual

Implements IGraphics.

◆ drawTriangles()

void CGraphicsRect::drawTriangles ( const float * points,
const float * normals,
const float * textureOpt,
const float * rgbaOpt,
uint64_t numPoints,
const uint32_t * indVertex,
uint64_t numVertex )
overrideprivatevirtual

Implements IGraphics.

◆ drawUnitCone()

void CGraphicsRect::drawUnitCone ( IGraphics::EDetailLevel detailLevel)
overrideprivatevirtual

Implements IGraphics.

◆ drawUnitCube()

void CGraphicsRect::drawUnitCube ( )
overrideprivatevirtual

Implements IGraphics.

◆ drawUnitCylinder()

void CGraphicsRect::drawUnitCylinder ( IGraphics::EDetailLevel detailLevel)
overrideprivatevirtual

Implements IGraphics.

◆ drawUnitDisk()

void CGraphicsRect::drawUnitDisk ( IGraphics::EDetailLevel detailLevel)
overrideprivatevirtual

Implements IGraphics.

◆ drawUnitSphere()

void CGraphicsRect::drawUnitSphere ( IGraphics::EDetailLevel detailLevel)
overrideprivatevirtual

Implements IGraphics.

◆ endBlock()

void CGraphicsRect::endBlock ( uint32_t idBlock)
overrideprivatevirtual

Implements IGraphics.

◆ endBlockText()

void CGraphicsRect::endBlockText ( uint32_t * idBlockText)
overrideprivatevirtual

Implements IGraphics.

◆ endStencilBuffer()

void CGraphicsRect::endStencilBuffer ( )
overrideprivatevirtual

Implements IGraphics.

◆ getCoordTextCornerLeftDown()

void CGraphicsRect::getCoordTextCornerLeftDown ( const std::string & text,
double x,
double y,
double heightCharacter,
unsigned char justify,
double * xCornerLeftDown,
double * yCornerLeftDown,
double * widthTextOpt,
double * heightTextOpt )
overrideprivatevirtual

Implements IGraphics.

◆ getLimits() [1/2]

CLimits * CGraphicsRect::getLimits ( ) const
nodiscard

◆ getLimits() [2/2]

bool CGraphicsRect::getLimits ( double * xMin,
double * yMin,
double * zMin,
double * xMax,
double * yMax,
double * zMax ) const

◆ getSizePixelToWorld()

void CGraphicsRect::getSizePixelToWorld ( double sizePixelX,
double sizePixelY,
double * sizeWorldXOpt,
double * sizeWorldYOpt )
overrideprivatevirtual

Implements IGraphics.

◆ getSizeText()

void CGraphicsRect::getSizeText ( const std::string & text,
double heightCharacter,
double * widthText,
double * heightText )
overrideprivatevirtual

Implements IGraphics.

◆ hasBlockText()

bool CGraphicsRect::hasBlockText ( ) const
nodiscardoverrideprivatevirtual

Implements IGraphics.

◆ hasDrawPolylineFilled()

bool CGraphicsRect::hasDrawPolylineFilled ( ) const
nodiscardoverrideprivatevirtual

Implements IGraphics.

◆ hasManagerBlocks()

bool CGraphicsRect::hasManagerBlocks ( ) const
nodiscardoverrideprivatevirtual

Implements IGraphics.

◆ initDevice()

void CGraphicsRect::initDevice ( )
overrideprivatevirtual

Implements IGraphics.

◆ initLight()

void CGraphicsRect::initLight ( )
overrideprivatevirtual

Implements IGraphics.

◆ isDefinedMaterial()

bool CGraphicsRect::isDefinedMaterial ( const std::string & materialName)
overrideprivatevirtual

Implements IGraphics.

◆ loadImage()

std::shared_ptr< iv::ui::graphics::Image > CGraphicsRect::loadImage ( const iv::ui::resources::ImageResource & resource)
overrideprivatevirtual

Implements IGraphics.

◆ offStencilBuffer()

void CGraphicsRect::offStencilBuffer ( )
overrideprivatevirtual

Implements IGraphics.

◆ onStencilBuffer()

void CGraphicsRect::onStencilBuffer ( )
overrideprivatevirtual

Implements IGraphics.

◆ operator=()

CGraphicsRect & CGraphicsRect::operator= ( const CGraphicsRect & )
delete

◆ popMaterial()

void CGraphicsRect::popMaterial ( )
overrideprivatevirtual

Implements IGraphics.

◆ popTransformation()

void CGraphicsRect::popTransformation ( )
overrideprivatevirtual

Implements IGraphics.

◆ positionCamera()

void CGraphicsRect::positionCamera ( double eyeX,
double eyeY,
double eyeZ,
double pointReferenceX,
double pointReferenceY,
double pointReferenceZ,
double upX,
double upY,
double upZ )
overrideprivatevirtual

Implements IGraphics.

◆ positionLight()

void CGraphicsRect::positionLight ( IGraphics::ELight light,
double x,
double y,
double z )
overrideprivatevirtual

Implements IGraphics.

◆ pushMaterial()

void CGraphicsRect::pushMaterial ( )
overrideprivatevirtual

Implements IGraphics.

◆ pushTransformation()

void CGraphicsRect::pushTransformation ( )
overrideprivatevirtual

Implements IGraphics.

◆ removeBlock()

void CGraphicsRect::removeBlock ( uint32_t * idBlock)
overrideprivatevirtual

Implements IGraphics.

◆ resetAlpha()

void CGraphicsRect::resetAlpha ( )
overrideprivatevirtual

Implements IGraphics.

◆ resetTransformation()

void CGraphicsRect::resetTransformation ( )
overrideprivatevirtual

Implements IGraphics.

◆ rotation()

void CGraphicsRect::rotation ( double angleDegrees,
double Ux,
double Uy,
double Uz )
overrideprivatevirtual

Implements IGraphics.

◆ scale()

void CGraphicsRect::scale ( double sx,
double sy,
double sz )
overridevirtual

Implements IGraphics.

◆ setAlpha()

void CGraphicsRect::setAlpha ( float alpha)
overrideprivatevirtual

Implements IGraphics.

◆ setBackGroundColor()

void CGraphicsRect::setBackGroundColor ( iv::types::color rgb)
overrideprivatevirtual

Implements IGraphics.

◆ setBlend()

void CGraphicsRect::setBlend ( bool isEnable)
overrideprivatevirtual

Implements IGraphics.

◆ setClearColor()

void CGraphicsRect::setClearColor ( )
overrideprivatevirtual

Implements IGraphics.

◆ setColorARGB()

void CGraphicsRect::setColorARGB ( iv::types::color argb)
overrideprivatevirtual

Implements IGraphics.

◆ setColorRGB()

void CGraphicsRect::setColorRGB ( iv::types::color rgb)
overrideprivatevirtual

Implements IGraphics.

◆ setLineWidth()

void CGraphicsRect::setLineWidth ( float width)
overrideprivatevirtual

Implements IGraphics.

◆ setMaterial()

void CGraphicsRect::setMaterial ( const std::string & layerName)
overrideprivatevirtual

Implements IGraphics.

◆ setModeDraw()

void CGraphicsRect::setModeDraw ( IGraphics::EDrawSolidType drawSolidType)
overrideprivatevirtual

Implements IGraphics.

◆ setModelMatrix()

void CGraphicsRect::setModelMatrix ( IGraphics::EMatrixModel matrixModel)
overrideprivatevirtual

Implements IGraphics.

◆ setNormal()

void CGraphicsRect::setNormal ( double Nx,
double Ny,
double Nz )
overrideprivatevirtual

Implements IGraphics.

◆ setOnTexture()

void CGraphicsRect::setOnTexture ( bool enableTexture)
overrideprivatevirtual

Implements IGraphics.

◆ setTestDepth()

void CGraphicsRect::setTestDepth ( bool isEnable)
overrideprivatevirtual

Implements IGraphics.

◆ translation()

void CGraphicsRect::translation ( double tx,
double ty,
double tz )
overrideprivatevirtual

Implements IGraphics.

◆ viewport()

void CGraphicsRect::viewport ( int32_t x,
int32_t y,
uint64_t sizeX,
uint64_t sizeY )
overrideprivatevirtual

Implements IGraphics.

Member Data Documentation

◆ BlockNull

uint32_t IGraphics::BlockNull = UINT_MAX
staticconstexprinherited

◆ m_graphicsDestinyOpt

IGraphics* CGraphicsRect::m_graphicsDestinyOpt {}
private

◆ m_hasDelete

bool CGraphicsRect::m_hasDelete
private

◆ m_limits

CLimits* CGraphicsRect::m_limits {}
private

◆ m_stackTransformation

CStackTransformation CGraphicsRect::m_stackTransformation {}
private

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