You.i Engine
CYIMeshFactory Class Reference

Detailed Description

Factory for the creation of meshes.

This class allows convenient creation of meshes independent of platform.

#include <renderer/YiMeshFactory.h>

Public Member Functions

virtual ~CYIMeshFactory ()
 
virtual std::shared_ptr< CYIMeshCreateQuadMesh (float fWidth, float fHeight, bool yFlip=true)
 
virtual std::shared_ptr< CYIMeshCreateQuadMesh (float fWidth, float fHeight, const glm::vec2 &vTopLeftVertex, const glm::vec2 &vBottomRightVertex, bool yFlip=true)
 

Constructor & Destructor Documentation

virtual CYIMeshFactory::~CYIMeshFactory ( )
inlinevirtual

Destructor

Member Function Documentation

virtual std::shared_ptr<CYIMesh> CYIMeshFactory::CreateQuadMesh ( float  fWidth,
float  fHeight,
bool  yFlip = true 
)
virtual

Create a quad mesh with the specified dimensions. Internally, all quad geometry is represented as a normalized unit quad. This function will return a mesh containing this unit quad but with an appropriate scaling matrix applied.

When using the After Effects workflow, the UV coordinates of the mesh should be flipped so that the textures show up correctly on screen.

For more information on this process see CYIMesh()

virtual std::shared_ptr<CYIMesh> CYIMeshFactory::CreateQuadMesh ( float  fWidth,
float  fHeight,
const glm::vec2 &  vTopLeftVertex,
const glm::vec2 &  vBottomRightVertex,
bool  yFlip = true 
)
virtual

Create a quad mesh with the specified dimensions and vertex positions. This function will return a mesh with a non-unit quad, with an appropriate scaling matrix applied.

When using the After Effects workflow, the UV coordinates of the mesh should be flipped so that the textures show up correctly on screen.

For more information on this process see CYIMesh()


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