Ocean
Loading...
Searching...
No Matches
TextureProperties.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_SCENEDESCRIPTION_SDX_X3D_TEXTURE_PROPERTIES_H
9#define META_OCEAN_SCENEDESCRIPTION_SDX_X3D_TEXTURE_PROPERTIES_H
10
13
15
16namespace Ocean
17{
18
19namespace SceneDescription
20{
21
22namespace SDX
23{
24
25namespace X3D
26{
27
28/**
29 * This class implements a x3d texture properties node.
30 * @ingroup scenedescriptionsdxx3d
31 */
32class OCEAN_SCENEDESCRIPTION_SDX_X3D_EXPORT TextureProperties : virtual public X3DNode
33{
34 public:
35
36 /**
37 * Creates a new x3d texture properties node.
38 * @param environment Node environment
39 */
40 explicit TextureProperties(const SDXEnvironment* environment);
41
42 protected:
43
44 /**
45 * Specifies the node type and the fields of this node.
46 * @return Unique node specification of this node
47 */
49
50 /**
51 * Event function to inform the node that it has been initialized and can apply all internal values to corresponding rendering objects.
52 * @see SDXNode::onInitialize().
53 */
54 void onInitialize(const Rendering::SceneRef& scene, const Timestamp timestamp) override;
55
56 /**
57 * Event function to inform the node about a changed field.
58 * @see SDXNode::onFieldChanged().
59 */
60 void onFieldChanged(const std::string& fieldName) override;
61
62 /**
63 * Returns the address of the most derived object.
64 * @see Node::objectAddress().
65 */
66 size_t objectAddress() const override;
67
68 /**
69 * Translates a string holding the minification filter parameter into a rendering filter value.
70 * @param parameter Minification filter parameter to translate
71 * @return Rendering filter value
72 */
73 static Rendering::Texture::MinFilterMode translateMinification(const std::string parameter);
74
75 /**
76 * Translates a string holding the magnification filter parameter into a rendering filter value.
77 * @param parameter Magnification filter parameter to translate
78 * @return Rendering filter value
79 */
80 static Rendering::Texture::MagFilterMode translateMagnification(const std::string parameter);
81
82 protected:
83
84 /// AnisotropicDegree field.
86
87 /// BorderColor field.
89
90 /// BorderWidth field.
92
93 /// BoundaryModeS field.
95
96 /// BoundaryModeT field.
98
99 /// BoundaryModeR field.
101
102 /// MagnificsationFilter field.
104
105 /// MinificationFilter field.
107
108 /// TextureCompression field.
110
111 /// TexturePriority field.
113
114 /// GenerateMipMaps field.
116};
117
118}
119
120}
121
122}
123
124}
125
126#endif // META_OCEAN_SCENEDESCRIPTION_SDX_X3D_TEXTURE_PROPERTIES_H
MagFilterMode
Definition of possible magnification filter modes.
Definition rendering/Texture.h:83
MinFilterMode
Definition of possible minification filter modes.
Definition rendering/Texture.h:61
This class implements a node specification object.
Definition scenedescription/Node.h:77
This class implements a x3d texture properties node.
Definition TextureProperties.h:33
SingleString boundaryModeR_
BoundaryModeR field.
Definition TextureProperties.h:100
SingleColor borderColor_
BorderColor field.
Definition TextureProperties.h:88
SingleFloat texturePriority_
TexturePriority field.
Definition TextureProperties.h:112
void onInitialize(const Rendering::SceneRef &scene, const Timestamp timestamp) override
Event function to inform the node that it has been initialized and can apply all internal values to c...
SingleFloat anisotropicDegree_
AnisotropicDegree field.
Definition TextureProperties.h:85
TextureProperties(const SDXEnvironment *environment)
Creates a new x3d texture properties node.
SingleBool generateMipMaps_
GenerateMipMaps field.
Definition TextureProperties.h:115
void onFieldChanged(const std::string &fieldName) override
Event function to inform the node about a changed field.
SingleString minificationFilter_
MinificationFilter field.
Definition TextureProperties.h:106
NodeSpecification specifyNode()
Specifies the node type and the fields of this node.
SingleString boundaryModeT_
BoundaryModeT field.
Definition TextureProperties.h:97
static Rendering::Texture::MinFilterMode translateMinification(const std::string parameter)
Translates a string holding the minification filter parameter into a rendering filter value.
SingleString magnificationFilter_
MagnificsationFilter field.
Definition TextureProperties.h:103
static Rendering::Texture::MagFilterMode translateMagnification(const std::string parameter)
Translates a string holding the magnification filter parameter into a rendering filter value.
SingleInt borderWidth_
BorderWidth field.
Definition TextureProperties.h:91
SingleString boundaryModeS_
BoundaryModeS field.
Definition TextureProperties.h:94
SingleString textureCompression_
TextureCompression field.
Definition TextureProperties.h:109
size_t objectAddress() const override
Returns the address of the most derived object.
This class implements an abstract x3d node.
Definition X3DNode.h:48
This class implements a node environment container.
Definition SDXNode.h:62
This class implements a timestamp.
Definition Timestamp.h:36
The namespace covering the entire Ocean framework.
Definition Accessor.h:15