Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Nz::PrimitiveList Class Reference

TODO: Inline this. More...

#include <PrimitiveList.hpp>

Public Member Functions

 PrimitiveList (const PrimitiveList &)=default
 
 PrimitiveList (PrimitiveList &&)=default
 
void AddBox (const Vector3f &lengths, const Vector3ui &subdivision=Vector3ui(0U), const Matrix4f &transformMatrix=Matrix4f::Identity())
 Adds a box centered. More...
 
void AddBox (const Vector3f &lengths, const Vector3ui &subdivision, const Vector3f &position, const Quaternionf &rotation=Quaternionf::Identity())
 Adds a box centered. More...
 
void AddCone (float length, float radius, unsigned int subdivision=4, const Matrix4f &transformMatrix=Matrix4f::Identity())
 Adds a cone, centered in (0, 0, 0) and circle in (0, -length, 0) More...
 
void AddCone (float length, float radius, unsigned int subdivision, const Vector3f &position, const Quaternionf &rotation=Quaternionf::Identity())
 Adds a cone, centered in (0, 0, 0) and circle in (0, -length, 0) More...
 
void AddCubicSphere (float size, unsigned int subdivision=4, const Matrix4f &transformMatrix=Matrix4f::Identity())
 Adds a cubic sphere, centered in (0, 0, 0) More...
 
void AddCubicSphere (float size, unsigned int subdivision, const Vector3f &position, const Quaternionf &rotation=Quaternionf::Identity())
 Adds a cubic sphere, centered in (0, 0, 0) More...
 
void AddIcoSphere (float size, unsigned int recursionLevel=3, const Matrix4f &transformMatrix=Matrix4f::Identity())
 Adds a icosphere, centered in (0, 0, 0) More...
 
void AddIcoSphere (float size, unsigned int recursionLevel, const Vector3f &position, const Quaternionf &rotation=Quaternionf::Identity())
 Adds a icosphere, centered in (0, 0, 0) More...
 
void AddPlane (const Vector2f &size, const Vector2ui &subdivision, const Matrix4f &transformMatrix=Matrix4f::Identity())
 Adds a plane, centered in (0, 0, 0) More...
 
void AddPlane (const Vector2f &size, const Vector2ui &subdivision, const Planef &planeInfo)
 Adds a plane, centered in (0, 0, 0) More...
 
void AddPlane (const Vector2f &size, const Vector2ui &subdivision, const Vector3f &position, const Quaternionf &rotation=Quaternionf::Identity())
 Adds a plane, centered in (0, 0, 0) More...
 
void AddUVSphere (float size, unsigned int sliceCount=4, unsigned int stackCount=4, const Matrix4f &transformMatrix=Matrix4f::Identity())
 Adds a UV sphere, centered in (0, 0, 0) More...
 
void AddUVSphere (float size, unsigned int sliceCount, unsigned int stackCount, const Vector3f &position, const Quaternionf &rotation=Quaternionf::Identity())
 Adds a UV sphere, centered in (0, 0, 0) More...
 
Primitive & GetPrimitive (std::size_t i)
 Gets the ith primitive. More...
 
const Primitive & GetPrimitive (std::size_t i) const
 Gets the ith primitive. More...
 
std::size_t GetSize () const
 Gets the number of primitives. More...
 
PrimitiveListoperator= (const PrimitiveList &)=default
 
PrimitiveListoperator= (PrimitiveList &&)=default
 
Primitive & operator() (unsigned int i)
 Gets the ith primitive. More...
 
const Primitive & operator() (unsigned int i) const
 Gets the ith primitive. More...
 

Detailed Description

TODO: Inline this.

Core class that represents a list of geometric primitives.

Core class that represents a geometric primitive.

Member Function Documentation

◆ AddBox() [1/2]

void Nz::PrimitiveList::AddBox ( const Vector3f lengths,
const Vector3ui subdivision = Vector3ui(0U),
const Matrix4f transformMatrix = Matrix4f::Identity() 
)

Adds a box centered.

Parameters
lengths(Width, Height, Depht)
subdivisionNumber of subdivision for the axis
transformMatrixMatrix to apply

◆ AddBox() [2/2]

void Nz::PrimitiveList::AddBox ( const Vector3f lengths,
const Vector3ui subdivision,
const Vector3f position,
const Quaternionf rotation = Quaternionf::Identity() 
)

Adds a box centered.

Parameters
lengths(Width, Height, Depht)
subdivisionNumber of subdivision for the axis
positionPosition of the box
rotationRotation of the box

◆ AddCone() [1/2]

void Nz::PrimitiveList::AddCone ( float  length,
float  radius,
unsigned int  subdivision = 4,
const Matrix4f transformMatrix = Matrix4f::Identity() 
)

Adds a cone, centered in (0, 0, 0) and circle in (0, -length, 0)

Parameters
lengthHeight of the cone
radiusWidth of the radius
subdivisionNumber of sides for the circle
transformMatrixMatrix to apply

◆ AddCone() [2/2]

void Nz::PrimitiveList::AddCone ( float  length,
float  radius,
unsigned int  subdivision,
const Vector3f position,
const Quaternionf rotation = Quaternionf::Identity() 
)

Adds a cone, centered in (0, 0, 0) and circle in (0, -length, 0)

Parameters
lengthHeight of the cone
radiusWidth of the radius
subdivisionNumber of sides for the circle
positionPosition of the cone
rotationRotation of the cone

◆ AddCubicSphere() [1/2]

void Nz::PrimitiveList::AddCubicSphere ( float  size,
unsigned int  subdivision = 4,
const Matrix4f transformMatrix = Matrix4f::Identity() 
)

Adds a cubic sphere, centered in (0, 0, 0)

Parameters
sizeRadius of the cubic sphere
subdivisionNumber of subdivision for the box
transformMatrixMatrix to apply

◆ AddCubicSphere() [2/2]

void Nz::PrimitiveList::AddCubicSphere ( float  size,
unsigned int  subdivision,
const Vector3f position,
const Quaternionf rotation = Quaternionf::Identity() 
)

Adds a cubic sphere, centered in (0, 0, 0)

Parameters
sizeRadius of the cubic sphere
subdivisionNumber of subdivision for the box
positionPosition of the cubic sphere
rotationRotation of the cubic sphere

◆ AddIcoSphere() [1/2]

void Nz::PrimitiveList::AddIcoSphere ( float  size,
unsigned int  recursionLevel = 3,
const Matrix4f transformMatrix = Matrix4f::Identity() 
)

Adds a icosphere, centered in (0, 0, 0)

Parameters
sizeRadius of the icosphere
recursionLevelNumber of recursion for the icosphere
transformMatrixMatrix to apply

◆ AddIcoSphere() [2/2]

void Nz::PrimitiveList::AddIcoSphere ( float  size,
unsigned int  recursionLevel,
const Vector3f position,
const Quaternionf rotation = Quaternionf::Identity() 
)

Adds a icosphere, centered in (0, 0, 0)

Parameters
sizeRadius of the sphere
recursionLevelNumber of recursion for the icosphere
positionPosition of the icosphere
rotationRotation of the icosphere

◆ AddPlane() [1/3]

void Nz::PrimitiveList::AddPlane ( const Vector2f size,
const Vector2ui subdivision,
const Matrix4f transformMatrix = Matrix4f::Identity() 
)

Adds a plane, centered in (0, 0, 0)

Parameters
size(Width, Depth)
subdivisionNumber of subdivision for the axis
transformMatrixMatrix to apply

◆ AddPlane() [2/3]

void Nz::PrimitiveList::AddPlane ( const Vector2f size,
const Vector2ui subdivision,
const Planef planeInfo 
)

Adds a plane, centered in (0, 0, 0)

Parameters
size(Width, Depth)
subdivisionNumber of subdivision for the axis
planeInfoInformation for the plane

◆ AddPlane() [3/3]

void Nz::PrimitiveList::AddPlane ( const Vector2f size,
const Vector2ui subdivision,
const Vector3f position,
const Quaternionf rotation = Quaternionf::Identity() 
)

Adds a plane, centered in (0, 0, 0)

Parameters
size(Width, Depth)
subdivisionNumber of subdivision for the axis
positionPosition of the plane
rotationRotation of the plane

◆ AddUVSphere() [1/2]

void Nz::PrimitiveList::AddUVSphere ( float  size,
unsigned int  sliceCount = 4,
unsigned int  stackCount = 4,
const Matrix4f transformMatrix = Matrix4f::Identity() 
)

Adds a UV sphere, centered in (0, 0, 0)

Parameters
sizeRadius of the sphere
sliceCountNumber of slices
stackCountNumber of stacks
transformMatrixMatrix to apply

◆ AddUVSphere() [2/2]

void Nz::PrimitiveList::AddUVSphere ( float  size,
unsigned int  sliceCount,
unsigned int  stackCount,
const Vector3f position,
const Quaternionf rotation = Quaternionf::Identity() 
)

Adds a UV sphere, centered in (0, 0, 0)

Parameters
sizeRadius of the sphere
sliceCountNumber of slices
stackCountNumber of stacks
positionPosition of the box
rotationRotation of the box

◆ GetPrimitive() [1/2]

Primitive & Nz::PrimitiveList::GetPrimitive ( std::size_t  i)

Gets the ith primitive.

Returns
A reference to the ith primitive
Parameters
iIndex of the primitive
Remarks
Produces a NazaraAssert if index is greather than the size

◆ GetPrimitive() [2/2]

const Primitive & Nz::PrimitiveList::GetPrimitive ( std::size_t  i) const

Gets the ith primitive.

Returns
A constant reference to the ith primitive
Parameters
iIndex of the primitive
Remarks
Produces a NazaraAssert if index is greather than the size

◆ GetSize()

std::size_t Nz::PrimitiveList::GetSize ( ) const

Gets the number of primitives.

Returns
Number of primitives

◆ operator()() [1/2]

Primitive & Nz::PrimitiveList::operator() ( unsigned int  i)

Gets the ith primitive.

Returns
A reference to the ith primitive
Parameters
iIndex of the primitive
Remarks
Produces a NazaraAssert if index is greather than the size

◆ operator()() [2/2]

const Primitive & Nz::PrimitiveList::operator() ( unsigned int  i) const

Gets the ith primitive.

Returns
A constant reference to the ith primitive
Parameters
iIndex of the primitive
Remarks
Produces a NazaraAssert if index is greather than the size

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