![]() |
Jopnal Engine
alpha 0.4
Simple Component Based 2D/3D Game Engine
|
#include <ConeMesh.hpp>
Public Member Functions | |
ConeMesh (const std::string &name) | |
Constructor. More... | |
ConeMesh (const ConeMesh &other, const std::string &newName) | |
Copy constructor. More... | |
bool | load (const float radius, const float height, const unsigned int sectors, const bool dividedTexCoords=false) |
Load a Cone. More... | |
float | getRadius () const |
Get the radius. More... | |
unsigned int | getSectors () const |
Get the amount of sectors. More... | |
float | getHeight () const |
Get the size. More... | |
bool | dividedTexCoords () const |
Check if this cone uses normalized texture coordinates. More... | |
![]() | |
Mesh (const std::string &name) | |
Constructor. More... | |
Mesh (const Mesh &other, const std::string &newName) | |
Copy constructor. More... | |
bool | load (const void *vertexData, const uint32 vertexBytes, const uint32 vertexComponents, const void *indexData=nullptr, const uint16 indexSize=0, const uint32 indexAmount=0) |
Load mesh from memory. More... | |
bool | load (const std::vector< Vertex > &vertexArray, const std::vector< unsigned int > &indexArray) |
Load mesh from memory using default vertex format. More... | |
void | draw () const |
Draw this mesh. More... | |
void | destroy () |
Destroy this mesh. More... | |
const std::pair< glm::vec3, glm::vec3 > & | getBounds () const |
Get the bounds of this mesh. More... | |
unsigned int | getVertexAmount () const |
Get the vertex amount. More... | |
uint16 | getVertexSize () const |
Get the total vertex size. More... | |
void * | getVertexOffset (const VertexComponent component) const |
Get the byte offset for the given component. More... | |
bool | hasVertexComponent (const uint32 component) const |
Check if this mesh has a vertex component. More... | |
unsigned int | getElementAmount () const |
Get the element (index) amount. More... | |
uint16 | getElementSize () const |
Get the element size. More... | |
unsigned int | getElementEnum () const |
Get the element type OpenGL enum. More... | |
const VertexBuffer & | getIndexBuffer () const |
Returns index buffer. More... | |
const VertexBuffer & | getVertexBuffer () const |
Returns vertex buffer. More... | |
void | updateBounds (const glm::vec3 &min, const glm::vec3 &max) |
Manually update the bounds of this mesh. More... | |
![]() | |
Resource (const std::string &name) | |
Constructor. More... | |
virtual | ~Resource ()=0 |
Virtual destructor. More... | |
const std::string & | getName () const |
Get the name of this resource. More... | |
void | setPersistence (const unsigned short level) |
Set the persistence level. More... | |
unsigned short | getPersistence () const |
Get the persistence level. More... | |
![]() | |
WeakReference< Resource > | getReference () const |
Get a weak reference to the bound object. More... | |
![]() | |
SerializeInfo () | |
void | setSerializePackage (const uint16 package) |
uint16 | getSerializePackage () const |
void | setShouldSerialize (const bool set) |
bool | shouldSerialize () const |
void | setLightSerializeable (const bool set) |
bool | isLightSerializeable () const |
Additional Inherited Members | |
![]() | |
enum | VertexComponent : uint32 { Position = 1, TexCoords = 1 << 1, Normal = 1 << 2, Tangent = 1 << 3, BiTangent = 1 << 4, Color = 1 << 5 } |
![]() | |
static uint16 | getVertexSize (const uint32 components) |
Get the size of a vertex with the given format. More... | |
static Mesh & | getDefault () |
Get the default mesh. More... | |
![]() | |
Resource (const Resource &other, const std::string &newName) | |
Copy constructor. More... | |
![]() | |
SafeReferenceable (Resource *ref) | |
Constructor. More... | |
SafeReferenceable (SafeReferenceable< Resource > &&other) | |
Move constructor. More... | |
SafeReferenceable & | operator= (SafeReferenceable< Resource > &&other) |
Move assignment operator. More... | |
~SafeReferenceable () | |
Protected destructor. More... | |
Definition at line 34 of file ConeMesh.hpp.
jop::ConeMesh::ConeMesh | ( | const std::string & | name | ) |
Constructor.
Does not initialize any vertices.
name | Name of the resource |
jop::ConeMesh::ConeMesh | ( | const ConeMesh & | other, |
const std::string & | newName | ||
) |
Copy constructor.
other | The other mesh to be copied |
newName | Name of the new mesh |
bool jop::ConeMesh::dividedTexCoords | ( | ) | const |
Check if this cone uses normalized texture coordinates.
float jop::ConeMesh::getHeight | ( | ) | const |
Get the size.
float jop::ConeMesh::getRadius | ( | ) | const |
Get the radius.
unsigned int jop::ConeMesh::getSectors | ( | ) | const |
Get the amount of sectors.
bool jop::ConeMesh::load | ( | const float | radius, |
const float | height, | ||
const unsigned int | sectors, | ||
const bool | dividedTexCoords = false |
||
) |
Load a Cone.
radius | The radius of the Cone's lowest ring |
height | How tall will the Cone be |
sectors | How many blocks will form the exterior surface |
dividedTexCoords | If true side will use coordinates 0.25-0.1 from texture and rest is used for bottom |