Ocean
Loading...
Searching...
No Matches
GITransform.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_GI_TRANSFORM_H
9#define META_OCEAN_RENDERING_GI_TRANSFORM_H
10
13
15
16namespace Ocean
17{
18
19namespace Rendering
20{
21
22namespace GlobalIllumination
23{
24
25/**
26 * This class implements a Global Illumination transform object.
27 * @ingroup renderinggi
28 */
29class OCEAN_RENDERING_GI_EXPORT GITransform :
30 virtual public GIGroup,
31 virtual public Transform
32{
33 friend class GIFactory;
34
35 public:
36
37 /**
38 * Returns the transformation of this node relative to the parent node.
39 * @see Transform::transformation().
40 */
42
43 /**
44 * Returns the TransformModifier object of this transform.
45 * @see Transform::transformModifier().
46 */
48
49 /**
50 * Sets the transformation of this node relative to the parent node.
51 * @see Transform::setTransformation().
52 */
53 void setTransformation(const HomogenousMatrix4& parent_T_transform) override;
54
55 /**
56 * Sets the TransformModifier object for this transformation.
57 * @see Transform::setTransformModifier().
58 */
60
61 /**
62 * Returns the bounding box of this node.
63 * @see Node::boundingBox().
64 */
65 BoundingBox boundingBox(const bool involveLocalTransformation) const override;
66
67 /**
68 * Returns the bounding sphere of this node.
69 * @see Node::boundingSphere().
70 */
71 BoundingSphere boundingSphere(const bool involveLocalTransformation) const override;
72
73 /**
74 * Builds the tracing object for this node and adds it to an already existing group of tracing objects.
75 * @see GINode::buildTracing().
76 */
77 void buildTracing(TracingGroup& group, const HomogenousMatrix4& modelTransform, const LightSources& lightSources) const override;
78
79 protected:
80
81 /**
82 * Creates a new Global Illumination transform node.
83 */
85
86 /**
87 * Destructs a Global Illumination transform node.
88 */
89 ~GITransform() override;
90
91 private:
92
93 /// The transformation between this object and the parent.
95
96 /// The optional transform modifier.
98};
99
100}
101
102}
103
104}
105
106#endif // META_OCEAN_RENDERING_GI_TRANSFORM_H
This class implements a 3D bounding box.
Definition BoundingBox.h:23
This class implements a bounding sphere.
Definition BoundingSphere.h:23
GIGroup()
Creates a new Global Illumination group object.
BoundingBox boundingBox(const bool involveLocalTransformation) const override
Returns the bounding box of this node.
GITransform()
Creates a new Global Illumination transform node.
void buildTracing(TracingGroup &group, const HomogenousMatrix4 &modelTransform, const LightSources &lightSources) const override
Builds the tracing object for this node and adds it to an already existing group of tracing objects.
SharedTransformModifier transformModifier_
The optional transform modifier.
Definition GITransform.h:97
friend class GIFactory
Definition GITransform.h:33
void setTransformModifier(SharedTransformModifier transformModifier) override
Sets the TransformModifier object for this transformation.
void setTransformation(const HomogenousMatrix4 &parent_T_transform) override
Sets the transformation of this node relative to the parent node.
~GITransform() override
Destructs a Global Illumination transform node.
SharedTransformModifier transformModifier() const override
Returns the TransformModifier object of this transform.
HomogenousMatrix4 parent_T_object_
The transformation between this object and the parent.
Definition GITransform.h:94
HomogenousMatrix4 transformation() const override
Returns the transformation of this node relative to the parent node.
BoundingSphere boundingSphere(const bool involveLocalTransformation) const override
Returns the bounding sphere of this node.
This class implements a group of tracing objects.
Definition TracingGroup.h:28
Transform()
Creates a new transform node.
std::shared_ptr< TransformModifier > SharedTransformModifier
Definition of a shared pointer holding a TransformModifier object.
Definition rendering/Transform.h:89
HomogenousMatrixT4< Scalar > HomogenousMatrix4
Definition of the HomogenousMatrix4 object, depending on the OCEAN_MATH_USE_SINGLE_PRECISION flag eit...
Definition HomogenousMatrix4.h:44
std::vector< LightPair > LightSources
Definition of a vector holding light pairs.
Definition GILightSource.h:40
Namespace of the Rendering Global Illumination library.
Definition GIAttribute.h:23
Namespace of the Rendering library.
Definition AbsoluteTransform.h:18
The namespace covering the entire Ocean framework.
Definition Accessor.h:15