Big Graphics update
Separated LightManager Added Sprite class Added View class Camera is no longer a SceneNode Fixed Material not invalidating programs Renamed CameraPosition uniform to EyePosition Renamed VisibilityTest to FrustumCull Former-commit-id: ff7fbe4d9b31a3c269baab0b48c6faa347a12161
This commit is contained in:
45
include/Nazara/Graphics/Sprite.hpp
Normal file
45
include/Nazara/Graphics/Sprite.hpp
Normal file
@@ -0,0 +1,45 @@
|
||||
// Copyright (C) 2013 Jérôme Leclercq
|
||||
// This file is part of the "Nazara Engine - Graphics module"
|
||||
// For conditions of distribution and use, see copyright notice in Config.hpp
|
||||
|
||||
#pragma once
|
||||
|
||||
#ifndef NAZARA_SPRITE_HPP
|
||||
#define NAZARA_SPRITE_HPP
|
||||
|
||||
#include <Nazara/Prerequesites.hpp>
|
||||
#include <Nazara/Graphics/SceneNode.hpp>
|
||||
#include <Nazara/Renderer/Material.hpp>
|
||||
|
||||
class NAZARA_API NzSprite : public NzSceneNode
|
||||
{
|
||||
public:
|
||||
NzSprite();
|
||||
NzSprite(const NzSprite& sprite);
|
||||
NzSprite(NzSprite&& sprite);
|
||||
~NzSprite();
|
||||
|
||||
void AddToRenderQueue(NzAbstractRenderQueue* renderQueue) const override;
|
||||
|
||||
const NzBoundingVolumef& GetBoundingVolume() const override;
|
||||
NzMaterial* GetMaterial() const;
|
||||
nzSceneNodeType GetSceneNodeType() const override;
|
||||
const NzVector2f& GetSize() const;
|
||||
const NzRectf& GetTextureCoords() const;
|
||||
|
||||
void SetMaterial(NzMaterial* material);
|
||||
void SetSize(const NzVector2f& size);
|
||||
void SetTextureCoords(const NzRectf& coords);
|
||||
void SetTextureRect(const NzRectui& rect);
|
||||
|
||||
private:
|
||||
bool FrustumCull(const NzFrustumf& frustum) override;
|
||||
void Register() override;
|
||||
void Unregister() override;
|
||||
|
||||
NzRectf m_textureCoords;
|
||||
NzVector2f m_size;
|
||||
NzMaterialRef m_material;
|
||||
};
|
||||
|
||||
#endif // NAZARA_SPRITE_HPP
|
||||
Reference in New Issue
Block a user