mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Copy irrlichtmt to <root>/irr/
This commit is contained in:
parent
a7908da968
commit
f638482fba
349 changed files with 109124 additions and 0 deletions
44
irr/include/SVertexManipulator.h
Normal file
44
irr/include/SVertexManipulator.h
Normal file
|
@ -0,0 +1,44 @@
|
|||
// Copyright (C) 2009-2012 Christian Stehno
|
||||
// This file is part of the "Irrlicht Engine".
|
||||
// For conditions of distribution and use, see copyright notice in irrlicht.h
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "matrix4.h"
|
||||
#include "S3DVertex.h"
|
||||
#include "SColor.h"
|
||||
|
||||
namespace irr
|
||||
{
|
||||
namespace scene
|
||||
{
|
||||
|
||||
class IMesh;
|
||||
class IMeshBuffer;
|
||||
struct SMesh;
|
||||
|
||||
//! Interface for vertex manipulators.
|
||||
/** You should derive your manipulator from this class if it shall be called for every vertex, getting as parameter just the vertex.
|
||||
*/
|
||||
struct IVertexManipulator
|
||||
{
|
||||
};
|
||||
|
||||
//! Vertex manipulator which scales the position of the vertex
|
||||
class SVertexPositionScaleManipulator : public IVertexManipulator
|
||||
{
|
||||
public:
|
||||
SVertexPositionScaleManipulator(const core::vector3df &factor) :
|
||||
Factor(factor) {}
|
||||
template <typename VType>
|
||||
void operator()(VType &vertex) const
|
||||
{
|
||||
vertex.Pos *= Factor;
|
||||
}
|
||||
|
||||
private:
|
||||
core::vector3df Factor;
|
||||
};
|
||||
|
||||
} // end namespace scene
|
||||
} // end namespace irr
|
Loading…
Add table
Add a link
Reference in a new issue