aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/CBillboardSceneNode.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/CBillboardSceneNode.h198
1 files changed, 99 insertions, 99 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/CBillboardSceneNode.h b/libraries/irrlicht-1.8/source/Irrlicht/CBillboardSceneNode.h
index 416b6ff..8beadd7 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/CBillboardSceneNode.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/CBillboardSceneNode.h
@@ -1,99 +1,99 @@
1// Copyright (C) 2002-2012 Nikolaus Gebhardt 1// Copyright (C) 2002-2012 Nikolaus Gebhardt
2// This file is part of the "Irrlicht Engine". 2// This file is part of the "Irrlicht Engine".
3// For conditions of distribution and use, see copyright notice in irrlicht.h 3// For conditions of distribution and use, see copyright notice in irrlicht.h
4 4
5#ifndef __C_BILLBOARD_SCENE_NODE_H_INCLUDED__ 5#ifndef __C_BILLBOARD_SCENE_NODE_H_INCLUDED__
6#define __C_BILLBOARD_SCENE_NODE_H_INCLUDED__ 6#define __C_BILLBOARD_SCENE_NODE_H_INCLUDED__
7 7
8#include "IBillboardSceneNode.h" 8#include "IBillboardSceneNode.h"
9#include "S3DVertex.h" 9#include "S3DVertex.h"
10 10
11namespace irr 11namespace irr
12{ 12{
13namespace scene 13namespace scene
14{ 14{
15 15
16//! Scene node which is a billboard. A billboard is like a 3d sprite: A 2d element, 16//! Scene node which is a billboard. A billboard is like a 3d sprite: A 2d element,
17//! which always looks to the camera. 17//! which always looks to the camera.
18class CBillboardSceneNode : virtual public IBillboardSceneNode 18class CBillboardSceneNode : virtual public IBillboardSceneNode
19{ 19{
20public: 20public:
21 21
22 //! constructor 22 //! constructor
23 CBillboardSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id, 23 CBillboardSceneNode(ISceneNode* parent, ISceneManager* mgr, s32 id,
24 const core::vector3df& position, const core::dimension2d<f32>& size, 24 const core::vector3df& position, const core::dimension2d<f32>& size,
25 video::SColor colorTop=video::SColor(0xFFFFFFFF), 25 video::SColor colorTop=video::SColor(0xFFFFFFFF),
26 video::SColor colorBottom=video::SColor(0xFFFFFFFF)); 26 video::SColor colorBottom=video::SColor(0xFFFFFFFF));
27 27
28 //! pre render event 28 //! pre render event
29 virtual void OnRegisterSceneNode(); 29 virtual void OnRegisterSceneNode();
30 30
31 //! render 31 //! render
32 virtual void render(); 32 virtual void render();
33 33
34 //! returns the axis aligned bounding box of this node 34 //! returns the axis aligned bounding box of this node
35 virtual const core::aabbox3d<f32>& getBoundingBox() const; 35 virtual const core::aabbox3d<f32>& getBoundingBox() const;
36 36
37 //! sets the size of the billboard 37 //! sets the size of the billboard
38 virtual void setSize(const core::dimension2d<f32>& size); 38 virtual void setSize(const core::dimension2d<f32>& size);
39 39
40 //! Sets the widths of the top and bottom edges of the billboard independently. 40 //! Sets the widths of the top and bottom edges of the billboard independently.
41 virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth); 41 virtual void setSize(f32 height, f32 bottomEdgeWidth, f32 topEdgeWidth);
42 42
43 //! gets the size of the billboard 43 //! gets the size of the billboard
44 virtual const core::dimension2d<f32>& getSize() const; 44 virtual const core::dimension2d<f32>& getSize() const;
45 45
46 //! Gets the widths of the top and bottom edges of the billboard. 46 //! Gets the widths of the top and bottom edges of the billboard.
47 virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const; 47 virtual void getSize(f32& height, f32& bottomEdgeWidth, f32& topEdgeWidth) const;
48 48
49 virtual video::SMaterial& getMaterial(u32 i); 49 virtual video::SMaterial& getMaterial(u32 i);
50 50
51 //! returns amount of materials used by this scene node. 51 //! returns amount of materials used by this scene node.
52 virtual u32 getMaterialCount() const; 52 virtual u32 getMaterialCount() const;
53 53
54 //! Set the color of all vertices of the billboard 54 //! Set the color of all vertices of the billboard
55 //! \param overallColor: the color to set 55 //! \param overallColor: the color to set
56 virtual void setColor(const video::SColor& overallColor); 56 virtual void setColor(const video::SColor& overallColor);
57 57
58 //! Set the color of the top and bottom vertices of the billboard 58 //! Set the color of the top and bottom vertices of the billboard
59 //! \param topColor: the color to set the top vertices 59 //! \param topColor: the color to set the top vertices
60 //! \param bottomColor: the color to set the bottom vertices 60 //! \param bottomColor: the color to set the bottom vertices
61 virtual void setColor(const video::SColor& topColor, 61 virtual void setColor(const video::SColor& topColor,
62 const video::SColor& bottomColor); 62 const video::SColor& bottomColor);
63 63
64 //! Gets the color of the top and bottom vertices of the billboard 64 //! Gets the color of the top and bottom vertices of the billboard
65 //! \param[out] topColor: stores the color of the top vertices 65 //! \param[out] topColor: stores the color of the top vertices
66 //! \param[out] bottomColor: stores the color of the bottom vertices 66 //! \param[out] bottomColor: stores the color of the bottom vertices
67 virtual void getColor(video::SColor& topColor, 67 virtual void getColor(video::SColor& topColor,
68 video::SColor& bottomColor) const; 68 video::SColor& bottomColor) const;
69 69
70 //! Writes attributes of the scene node. 70 //! Writes attributes of the scene node.
71 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const; 71 virtual void serializeAttributes(io::IAttributes* out, io::SAttributeReadWriteOptions* options=0) const;
72 72
73 //! Reads attributes of the scene node. 73 //! Reads attributes of the scene node.
74 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0); 74 virtual void deserializeAttributes(io::IAttributes* in, io::SAttributeReadWriteOptions* options=0);
75 75
76 //! Returns type of the scene node 76 //! Returns type of the scene node
77 virtual ESCENE_NODE_TYPE getType() const { return ESNT_BILLBOARD; } 77 virtual ESCENE_NODE_TYPE getType() const { return ESNT_BILLBOARD; }
78 78
79 //! Creates a clone of this scene node and its children. 79 //! Creates a clone of this scene node and its children.
80 virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0); 80 virtual ISceneNode* clone(ISceneNode* newParent=0, ISceneManager* newManager=0);
81 81
82private: 82private:
83 83
84 //! Size.Width is the bottom edge width 84 //! Size.Width is the bottom edge width
85 core::dimension2d<f32> Size; 85 core::dimension2d<f32> Size;
86 f32 TopEdgeWidth; 86 f32 TopEdgeWidth;
87 core::aabbox3d<f32> BBox; 87 core::aabbox3d<f32> BBox;
88 video::SMaterial Material; 88 video::SMaterial Material;
89 89
90 video::S3DVertex vertices[4]; 90 video::S3DVertex vertices[4];
91 u16 indices[6]; 91 u16 indices[6];
92}; 92};
93 93
94 94
95} // end namespace scene 95} // end namespace scene
96} // end namespace irr 96} // end namespace irr
97 97
98#endif 98#endif
99 99