Ocean
Quads.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_QUADS_H
9 #define META_OCEAN_RENDERING_QUADS_H
10 
14 
15 namespace Ocean
16 {
17 
18 namespace Rendering
19 {
20 
21 // Forward declaration
22 class Quads;
23 
24 /**
25  * Definition of a smart object reference holding a quads object.
26  * @see SmartObjectRef, Quads.
27  * @ingroup rendering
28  */
30 
31 /**
32  * This class is the base class for all rendering quads.
33  * @ingroup rendering
34  */
35 class OCEAN_RENDERING_EXPORT Quads : virtual public IndependentPrimitive
36 {
37  public:
38 
39  /**
40  * Returns the faces of this quads object.
41  * @return Quad faces
42  * @exception NotSupportedException Is thrown if this function is not supported
43  */
44  virtual QuadFaces faces() const;
45 
46  /**
47  * Returns the number of quad faces defined in this primitive.
48  * @return Number of quad faces
49  * @exception NotSupportedException Is thrown if this function is not supported
50  */
51  virtual unsigned int numberFaces() const;
52 
53  /**
54  * Sets the faces of this triangles object.
55  * @param faces Faces of the quads
56  * @exception NotSupportedException Is thrown if this function is not supported
57  */
58  virtual void setFaces(const QuadFaces& faces);
59 
60  /**
61  * Returns the type of this object.
62  * @see Object::type().
63  */
64  ObjectType type() const override;
65 
66  protected:
67 
68  /**
69  * Creates a new quads object.
70  */
71  Quads();
72 
73  /**
74  * Destructs a quads object.
75  */
76  ~Quads() override;
77 
78 };
79 
80 }
81 
82 }
83 
84 #endif // META_OCEAN_RENDERING_QUADS_H
This class is the base class for all independent primitive objects.
Definition: IndependentPrimitive.h:25
ObjectType
Definition of different object type.
Definition: Object.h:63
This class is the base class for all rendering quads.
Definition: Quads.h:36
virtual void setFaces(const QuadFaces &faces)
Sets the faces of this triangles object.
ObjectType type() const override
Returns the type of this object.
Quads()
Creates a new quads object.
~Quads() override
Destructs a quads object.
virtual unsigned int numberFaces() const
Returns the number of quad faces defined in this primitive.
virtual QuadFaces faces() const
Returns the faces of this quads object.
This class implements a smart rendering object reference.
Definition: rendering/ObjectRef.h:34
SmartObjectRef< Quads > QuadsRef
Definition of a smart object reference holding a quads object.
Definition: Quads.h:22
std::vector< QuadFace > QuadFaces
Definition of a vector holding quad faces.
Definition: QuadFace.h:22
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15