5#ifndef S_MESH_HPP_INCLUDED 
    6#define S_MESH_HPP_INCLUDED 
    8#include <duckcpp/core/engine/IMesh.hpp> 
    9#include <duckcpp/core/engine/IMeshBuffer.hpp> 
   10#include <duckcpp/core/engine/aabbox3d.hpp> 
   11#include <duckcpp/core/engine/irrArray.hpp> 
   89            bool hasMeshBufferBBox = 
false;
 
   95                    if ( !hasMeshBufferBBox )
 
   97                        hasMeshBufferBBox = 
true;
 
  108            if ( !hasMeshBufferBBox )
 
 
  127                MeshBuffers[i]->getMaterial().setFlag(flag, newvalue);
 
 
 
bool drop() const
Drops the object. Decrements the reference counter by one.
Definition IReferenceCounted.hpp:126
 
void grab() const
Grabs the object. Increments the reference counter by one.
Definition IReferenceCounted.hpp:96
 
void setDebugName(const dcpp::char_kt *newName)
Sets the debug name of the object.
Definition IReferenceCounted.hpp:163
 
Axis aligned bounding box in 3d dimensional space.
Definition aabbox3d.hpp:22
 
void addInternalBox(const aabbox3d< T > &b)
Adds another bounding box.
Definition aabbox3d.hpp:82
 
bool isEmpty() const
Check if the box is empty.
Definition aabbox3d.hpp:129
 
void reset(T x, T y, T z)
Resets the bounding box to a one-point box.
Definition aabbox3d.hpp:50
 
Class for holding a mesh with a single material.
Definition IMeshBuffer.hpp:41
 
Class which holds the geometry of an object.
Definition IMesh.hpp:72
 
Simple implementation of the IMesh interface.
Definition SMesh.hpp:19
 
virtual IMeshBuffer * getMeshBuffer(dcpp::uint32_kt nr) const override
returns pointer to a mesh buffer
Definition SMesh.hpp:56
 
virtual void setBoundingBox(const dcpp::nub::aabbox3df &box) override
set user axis aligned bounding box
Definition SMesh.hpp:81
 
virtual void clear()
clean mesh
Definition SMesh.hpp:40
 
virtual dcpp::uint32_kt getMeshBufferCount() const override
returns amount of mesh buffers.
Definition SMesh.hpp:50
 
void recalculateBoundingBox()
recalculates the bounding box
Definition SMesh.hpp:87
 
dcpp::nub::array< IMeshBuffer * > MeshBuffers
The meshbuffers of this mesh.
Definition SMesh.hpp:146
 
virtual ~SMesh()
destructor
Definition SMesh.hpp:31
 
virtual IMeshBuffer * getMeshBuffer(const dcpp::video::SMaterial &material) const override
returns a meshbuffer which fits a material
Definition SMesh.hpp:63
 
virtual void setMaterialFlag(dcpp::video::E_MATERIAL_FLAG flag, bool newvalue) override
sets a flag of all contained materials to a new value
Definition SMesh.hpp:124
 
virtual const dcpp::nub::aabbox3df & getBoundingBox() const override
returns an axis aligned bounding box
Definition SMesh.hpp:75
 
SMesh()
constructor
Definition SMesh.hpp:22
 
virtual void setDirty(E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) override
flags the meshbuffer as changed, reloads hardware buffers
Definition SMesh.hpp:138
 
dcpp::nub::aabbox3df BoundingBox
The bounding box of this mesh.
Definition SMesh.hpp:149
 
void addMeshBuffer(IMeshBuffer *buf)
adds a MeshBuffer
Definition SMesh.hpp:114
 
virtual void setHardwareMappingHint(E_HARDWARE_MAPPING newMappingHint, E_BUFFER_TYPE buffer=EBT_VERTEX_AND_INDEX) override
set the hardware mapping hint, for driver
Definition SMesh.hpp:131
 
Class for holding parameters for a material renderer.
Definition SMaterial.hpp:304
 
E_BUFFER_TYPE
Definition EHardwareBufferFlags.hpp:29
 
@ EBT_VERTEX_AND_INDEX
Change both vertex and index mapping to the same value.
Definition EHardwareBufferFlags.hpp:37
 
E_HARDWARE_MAPPING
Definition EHardwareBufferFlags.hpp:14
 
E_MATERIAL_FLAG
Material flags.
Definition EMaterialFlags.hpp:15
 
As of Duckcpp 1.6, position2d is a synonym for vector2d.
Definition vector3d.hpp:11
 
unsigned int uint32_kt
32 bit unsigned variable.
Definition irrTypes.hpp:64
 
signed int int32_kt
32 bit signed variable.
Definition irrTypes.hpp:72