Raylib C++  1.0.0
Encapsulates the raylib library
Public Types | Public Member Functions | List of all members
raylib::builder::RlMeshBuilder Class Reference

Builder to create a RlMesh easily. More...

#include <RlMeshBuilder.hpp>

Inheritance diagram for raylib::builder::RlMeshBuilder:
Inheritance graph
Collaboration diagram for raylib::builder::RlMeshBuilder:
Collaboration graph

Public Types

enum  MeshType {
  MeshPoly = Sides | Radius, MeshPlane = Width | Length | ResX | ResZ, MeshCube = Width | Height | Length, MeshSphere = Radius | Rings | Slices,
  MeshHemiSphere = Radius | HemisphereRings | Slices, MeshCylinder = Radius | Height | Slices, MeshCone = Radius | Height | ConeSlices, MeshTorus = Radius | Size | RadSeg | Sides,
  MeshKnot = Radius | Size | KnotRadSeg | Sides, MeshHeightmap = Heightmap | Vec3fSize, MeshCubicmap = Cubicmap | CubeSize
}
 Type of mesh. More...
 

Public Member Functions

 RlMeshBuilder ()
 Construct a new RlMeshBuilder object. More...
 
RlMeshBuildersetMeshType (const MeshType &meshType)
 Set the mesh type. More...
 
RlMeshBuildersetRadius (const float &radius)
 Set the the radius of the sphere. More...
 
RlMeshBuildersetWidth (const float &width)
 Set the the width of the cube. More...
 
RlMeshBuildersetLength (const float &length)
 Set the the length. More...
 
RlMeshBuildersetHeight (const float &height)
 Set the the height of the cylinder. More...
 
RlMeshBuildersetResX (const int &resX)
 Set the the resolution of the plane. More...
 
RlMeshBuildersetResZ (const int &resZ)
 Set the the resolution of the plane. More...
 
RlMeshBuildersetRings (const int &rings)
 Set the number of rings for the sphere. More...
 
RlMeshBuildersetHemisphereRings (const int &rings)
 Set the number of rings for the hemisphere. More...
 
RlMeshBuildersetSlices (const int &slices)
 Set the number of slices for the sphere/hemisphere. More...
 
RlMeshBuildersetConeSlices (const int &slices)
 Set the number of slices for the cylinder. More...
 
RlMeshBuildersetSize (const float &size)
 Set the number of segments for the torus. More...
 
RlMeshBuildersetRadSeg (const int &radSeg)
 Set the number of segments for the torus. More...
 
RlMeshBuildersetKnotRadSeg (const int &radSeg)
 Set the number of segments for the knot. More...
 
RlMeshBuildersetSides (const int &sides)
 Set the sides. More...
 
RlMeshBuildersetHeightmap (const image::RlImage &heightmap)
 Set the heightmap. More...
 
RlMeshBuildersetVec3fSize (const Vector3f &size)
 Set the size. More...
 
RlMeshBuildersetCubicmap (const image::RlImage &cubicmap)
 Set the cubicmap. More...
 
RlMeshBuildersetCubeSize (const Vector3f &cubeSize)
 Set the size. More...
 
model::RlMesh build () override
 Create a mesh. More...
 

Detailed Description

Builder to create a RlMesh easily.

Member Enumeration Documentation

◆ MeshType

Type of mesh.

Enumerator
MeshPoly 

Create a polygonal mesh

MeshPlane 

Create a plane mesh

MeshCube 

Create a cube mesh

MeshSphere 

Create a sphere mesh

MeshHemiSphere 

Create a hemisphere mesh

MeshCylinder 

Create a cylinder mesh

MeshCone 

Create a cone mesh

MeshTorus 

Create a torus mesh

MeshKnot 

Create a knot mesh

MeshHeightmap 

Create a heightmap mesh

MeshCubicmap 

Create a cubicmap mesh

Constructor & Destructor Documentation

◆ RlMeshBuilder()

raylib::builder::RlMeshBuilder::RlMeshBuilder ( )

Construct a new RlMeshBuilder object.

Member Function Documentation

◆ build()

raylib::model::RlMesh raylib::builder::RlMeshBuilder::build ( )
overridevirtual

Create a mesh.

Returns
the mesh

Implements raylib::builder::IBuilder< model::RlMesh >.

Here is the call graph for this function:

◆ setConeSlices()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setConeSlices ( const int &  slices)

Set the number of slices for the cylinder.

Parameters
slicesthe number of slices for the cylinder
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setCubeSize()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setCubeSize ( const Vector3f cubeSize)

Set the size.

Parameters
cubeSizethe size
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setCubicmap()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setCubicmap ( const image::RlImage cubicmap)

Set the cubicmap.

Parameters
cubicmapthe cubicmap
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setHeight()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setHeight ( const float &  height)

Set the the height of the cylinder.

Parameters
heightthe height of the cylinder
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setHeightmap()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setHeightmap ( const image::RlImage heightmap)

Set the heightmap.

Parameters
heightmapthe heightmap
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setHemisphereRings()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setHemisphereRings ( const int &  rings)

Set the number of rings for the hemisphere.

Parameters
ringsthe number of rings for the hemisphere
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setKnotRadSeg()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setKnotRadSeg ( const int &  radSeg)

Set the number of segments for the knot.

Parameters
radSegthe number of segments for the knot
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setLength()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setLength ( const float &  length)

Set the the length.

Parameters
lengththe length
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setMeshType()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setMeshType ( const MeshType meshType)

Set the mesh type.

Parameters
meshTypetype of mesh
Returns
this

◆ setRadius()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setRadius ( const float &  radius)

Set the the radius of the sphere.

Parameters
radiusthe radius of the sphere
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setRadSeg()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setRadSeg ( const int &  radSeg)

Set the number of segments for the torus.

Parameters
radSegthe number of segments for the torus
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setResX()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setResX ( const int &  resX)

Set the the resolution of the plane.

Parameters
resXthe resolution of the plane on the X axis
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setResZ()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setResZ ( const int &  resZ)

Set the the resolution of the plane.

Parameters
resZthe resolution of the plane on the Z axis
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setRings()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setRings ( const int &  rings)

Set the number of rings for the sphere.

Parameters
ringsthe number of rings for the sphere
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setSides()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setSides ( const int &  sides)

Set the sides.

Parameters
sidesthe number of sides
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setSize()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setSize ( const float &  size)

Set the number of segments for the torus.

Parameters
sizethe number of segments for the torus
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setSlices()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setSlices ( const int &  slices)

Set the number of slices for the sphere/hemisphere.

Parameters
slicesthe number of slices for the sphere/hemisphere
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setVec3fSize()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setVec3fSize ( const Vector3f size)

Set the size.

Parameters
sizethe size
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

◆ setWidth()

raylib::builder::RlMeshBuilder & raylib::builder::RlMeshBuilder::setWidth ( const float &  width)

Set the the width of the cube.

Parameters
widththe width of the cube
Returns
this
See also
raylib::builder::RlMeshBuilder::MeshType

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