opynsim
Unofficial C++ Documentation
Loading...
Searching...
No Matches
scene_decoration.h
Go to the documentation of this file.
1#pragma once
2
11
12namespace osc
13{
14 // a single render-able decoration element in the scene
16
17 friend bool operator==(const SceneDecoration&, const SceneDecoration&) = default;
18
19 // returns a copy of this `SceneDecoration` with `position` set the provided position
26
27 // returns a copy of this `SceneDecoration` with `transform` set to the provided transform
34
35 // returns a copy of this `SceneDecoration` with `shading` set to the provided color
37 {
38 SceneDecoration copy{*this};
40 return copy;
41 }
42
43 // Returns `true` if this `SceneDecoration` has the given flag set in its `flags` field.
44 bool has_flag(SceneDecorationFlag flag) const { return flags.get(flag); }
45
46 // Returns the world-space bounds of this `SceneDecoration`
47 std::optional<AABB> world_space_bounds() const;
48
54 };
55}
constexpr bool get(TEnum flag) const
Definition flags.h:85
Definition mesh.h:33
Definition string_name.h:14
Definition custom_decoration_generator.h:5
std::variant< Color, Material, std::pair< Material, MaterialPropertyBlock > > SceneDecorationShading
Definition scene_decoration_shading.h:30
constexpr U to(T &&value)
Definition conversion.h:56
SceneDecorationFlag
Definition scene_decoration_flags.h:8
static constexpr Rgba white()
Definition rgba.h:31
Definition scene_decoration.h:15
std::optional< AABB > world_space_bounds() const
SceneDecoration with_transform(const Transform &transform_) const
Definition scene_decoration.h:28
SceneDecorationFlags flags
Definition scene_decoration.h:53
SceneDecorationShading shading
Definition scene_decoration.h:51
friend bool operator==(const SceneDecoration &, const SceneDecoration &)=default
SceneDecoration with_translation(const Vector3 &position_) const
Definition scene_decoration.h:20
Mesh mesh
Definition scene_decoration.h:49
bool has_flag(SceneDecorationFlag flag) const
Definition scene_decoration.h:44
Transform transform
Definition scene_decoration.h:50
SceneDecoration with_color(const Color &color_) const
Definition scene_decoration.h:36
Definition transform.h:11
Vector3 translation
Definition transform.h:37