Ocean
StripPrimitive.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_STRIP_PRIMITIVE_H
9 #define META_OCEAN_RENDERING_STRIP_PRIMITIVE_H
10 
13 
14 namespace Ocean
15 {
16 
17 namespace Rendering
18 {
19 
20 // Forward declaration
21 class StripPrimitive;
22 
23 /**
24  * Definition of a smart object reference holding a strip primitive.
25  * @see SmartObjectRef, StripPrimitive.
26  * @ingroup rendering
27  */
29 
30 /**
31  * This class is the base class for all primitive with strip organization.
32  * @ingroup rendering
33  */
34 class OCEAN_RENDERING_EXPORT StripPrimitive : virtual public Primitive
35 {
36  public:
37 
38  /**
39  * Returns the strips of this primitive object.
40  * @return Strips of primitive
41  * @exception NotSupportedException Is thrown if this function is not supported
42  */
43  virtual VertexIndexGroups strips() const;
44 
45  /**
46  * Returns the number of triangle strips defined in this primitive.
47  * @return Number of triangle strips
48  * @exception NotSupportedException Is thrown if this function is not supported
49  */
50  virtual unsigned int numberStrips() const;
51 
52  /**
53  * Sets the strips of this primitive object.
54  * @param strips The strips to set
55  * @exception NotSupportedException Is thrown if this function is not supported
56  */
57  virtual void setStrips(const VertexIndexGroups& strips);
58 
59  /**
60  * Returns the type of this object.
61  * @see Object::type().
62  */
63  ObjectType type() const override;
64 
65  protected:
66 
67  /**
68  * Creates a new strip primitive object.
69  */
71 
72  /**
73  * Destructs a strip primitive object.
74  */
75  ~StripPrimitive() override;
76 };
77 
78 }
79 
80 }
81 
82 #endif // META_OCEAN_RENDERING_STRIP_PRIMITIVE_H
ObjectType
Definition of different object type.
Definition: Object.h:63
This class is the base class for all primitive objects.
Definition: Primitive.h:42
This class implements a smart rendering object reference.
Definition: rendering/ObjectRef.h:34
This class is the base class for all primitive with strip organization.
Definition: StripPrimitive.h:35
virtual void setStrips(const VertexIndexGroups &strips)
Sets the strips of this primitive object.
StripPrimitive()
Creates a new strip primitive object.
~StripPrimitive() override
Destructs a strip primitive object.
virtual unsigned int numberStrips() const
Returns the number of triangle strips defined in this primitive.
virtual VertexIndexGroups strips() const
Returns the strips of this primitive object.
ObjectType type() const override
Returns the type of this object.
SmartObjectRef< StripPrimitive > StripPrimitiveRef
Definition of a smart object reference holding a strip primitive.
Definition: StripPrimitive.h:21
std::vector< VertexIndices > VertexIndexGroups
Definition of a vector holding vertex indices.
Definition: rendering/Rendering.h:125
The namespace covering the entire Ocean framework.
Definition: Accessor.h:15