Ocean
Loading...
Searching...
No Matches
rendering/Billboard.h
Go to the documentation of this file.
1/*
2 * Copyright (c) Meta Platforms, Inc. and affiliates.
3 *
4 * This source code is licensed under the MIT license found in the
5 * LICENSE file in the root directory of this source tree.
6 */
7
8#ifndef META_OCEAN_RENDERING_BILLBOARD_H
9#define META_OCEAN_RENDERING_BILLBOARD_H
10
13
14namespace Ocean
15{
16
17namespace Rendering
18{
19
20// Forward declaration
21class Billboard;
22
23/**
24 * Definition of a smart object reference holding a billboard.
25 * @see SmartObjectRef, Billboard.
26 * @ingroup rendering
27 */
29
30/**
31 * This class is the base class for all billboard objects.
32 * @ingroup rendering
33 */
34class OCEAN_RENDERING_EXPORT Billboard : virtual public Group
35{
36 public:
37
38 /**
39 * Definition of different billboard alignment types.
40 */
42 {
43 /// Invalid alignment type.
45 /// The object is aligned to specified axis.
47 /// The object is aligned to the viewer.
48 TYPE_VIEWER
49 };
50
51 public:
52
53 /**
54 * Returns the alignment type of the billboard.
55 * @return Alignment type
56 * @exception NotSupportedException Is thrown if this function is not supported
57 */
59
60 /**
61 * Returns the alignment axis of the billboard.
62 * @return Alignment axis
63 * @exception NotSupportedException Is thrown if this function is not supported
64 */
65 virtual Vector3 alignmentAxis() const;
66
67 /**
68 * Sets the alignment type of the billboard.
69 * @param type Alignment type to set
70 * @exception NotSupportedException Is thrown if this function is not supported
71 */
72 virtual void setAlignmentType(const AlignmentType type);
73
74 /**
75 * Sets the alignment axis of the billboard.
76 * @param axis Alignment axis to set
77 * @exception NotSupportedException Is thrown if this function is not supported
78 */
79 virtual void setAlignmentAxis(const Vector3& axis);
80
81 /**
82 * Returns the type of this object.
83 * @see Object::type().
84 */
85 ObjectType type() const override;
86
87 protected:
88
89 /**
90 * Creates a new billboard object.
91 */
93
94 /**
95 * Destructs a billboard object.
96 */
97 ~Billboard() override;
98};
99
100}
101
102}
103
104#endif // META_OCEAN_RENDERING_BILLBOARD_H
This class is the base class for all billboard objects.
Definition rendering/Billboard.h:35
~Billboard() override
Destructs a billboard object.
virtual AlignmentType alignmentType() const
Returns the alignment type of the billboard.
virtual void setAlignmentType(const AlignmentType type)
Sets the alignment type of the billboard.
ObjectType type() const override
Returns the type of this object.
virtual Vector3 alignmentAxis() const
Returns the alignment axis of the billboard.
AlignmentType
Definition of different billboard alignment types.
Definition rendering/Billboard.h:42
@ TYPE_AXIS
The object is aligned to specified axis.
Definition rendering/Billboard.h:46
@ TYPE_INVALID
Invalid alignment type.
Definition rendering/Billboard.h:44
virtual void setAlignmentAxis(const Vector3 &axis)
Sets the alignment axis of the billboard.
Billboard()
Creates a new billboard object.
This is the base class for all rendering groups.
Definition rendering/Group.h:40
ObjectType
Definition of different object type.
Definition Object.h:63
This class implements a smart rendering object reference.
Definition rendering/ObjectRef.h:34
SmartObjectRef< Billboard > BillboardRef
Definition of a smart object reference holding a billboard.
Definition rendering/Billboard.h:28
The namespace covering the entire Ocean framework.
Definition Accessor.h:15