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 width, float height, bool yFlip=true)
 
virtual std::shared_ptr< CYIMeshCreateQuadMesh (float width, float height, const glm::vec2 &topLeftVertex, const glm::vec2 &bottomRightVertex, bool yFlip=true)
 

Constructor & Destructor Documentation

◆ ~CYIMeshFactory()

virtual CYIMeshFactory::~CYIMeshFactory ( )
inlinevirtual

Destructor

Member Function Documentation

◆ CreateQuadMesh() [1/2]

virtual std::shared_ptr<CYIMesh> CYIMeshFactory::CreateQuadMesh ( float  width,
float  height,
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()

◆ CreateQuadMesh() [2/2]

virtual std::shared_ptr<CYIMesh> CYIMeshFactory::CreateQuadMesh ( float  width,
float  height,
const glm::vec2 &  topLeftVertex,
const glm::vec2 &  bottomRightVertex,
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: