hx3d  1
2D/3D Simple Game Framework
Public Member Functions | Protected Attributes | List of all members
hx3d::graphics::geom::BaseGeometry Class Referenceabstract

Base geometry. Must be inherited. More...

#include <base_geometry.hpp>

Public Member Functions

void addAttribute (std::string name, Attribute attribute)
 Add an attribute. More...
 
void setAttribute (std::string name, std::vector< float > values)
 Set an attribute with values. More...
 
AttributeArrayBuffergetAttribute (std::string name)
 Get an attribute array buffer. More...
 
void setIndices (std::vector< GLushort > values)
 Set the indices. More...
 
IndexArrayBuffergetIndices ()
 Get the index array buffer. More...
 
void setFaceCulling (Culling culling)
 Set the culling type. More...
 
void uploadAll ()
 Upload all the buffers to the GPU.
 
virtual void draw (Ptr< Shader > shader)=0
 Draw the geometry. More...
 

Protected Attributes

std::map< std::string, AttributeArrayBuffer_attributes
 Attributes map.
 
IndexArrayBuffer _indices
 Index array buffer.
 
Culling _cullingType
 Current culling.
 

Detailed Description

Base geometry. Must be inherited.

Definition at line 54 of file base_geometry.hpp.

Member Function Documentation

void hx3d::graphics::geom::BaseGeometry::addAttribute ( std::string  name,
Attribute  attribute 
)

Add an attribute.

Parameters
nameName
attributeAttribute definition

Definition at line 34 of file base_geometry.cpp.

virtual void hx3d::graphics::geom::BaseGeometry::draw ( Ptr< Shader shader)
pure virtual

Draw the geometry.

Parameters
shaderShader

Implemented in hx3d::graphics::geom::Geometry.

AttributeArrayBuffer & hx3d::graphics::geom::BaseGeometry::getAttribute ( std::string  name)

Get an attribute array buffer.

Parameters
nameName
Returns
Attribute array buffer

Definition at line 42 of file base_geometry.cpp.

IndexArrayBuffer & hx3d::graphics::geom::BaseGeometry::getIndices ( )

Get the index array buffer.

Returns
Index array buffer

Definition at line 50 of file base_geometry.cpp.

void hx3d::graphics::geom::BaseGeometry::setAttribute ( std::string  name,
std::vector< float >  values 
)

Set an attribute with values.

Parameters
nameName
valuesValues

Definition at line 38 of file base_geometry.cpp.

void hx3d::graphics::geom::BaseGeometry::setFaceCulling ( Culling  culling)

Set the culling type.

Parameters
cullingCulling type

Definition at line 54 of file base_geometry.cpp.

void hx3d::graphics::geom::BaseGeometry::setIndices ( std::vector< GLushort >  values)

Set the indices.

Parameters
valuesValues

Definition at line 46 of file base_geometry.cpp.


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